803-gpio-ralink-Add-support-for-GPIO-as-interrupt-contro.patch 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. From 57fa7f2f4ef6f78ce1d30509c0d111aa3791b524 Mon Sep 17 00:00:00 2001
  2. From: Daniel Santos <[email protected]>
  3. Date: Sun, 4 Nov 2018 20:24:32 -0600
  4. Subject: gpio-ralink: Add support for GPIO as interrupt-controller
  5. Signed-off-by: Daniel Santos <[email protected]>
  6. ---
  7. Documentation/devicetree/bindings/gpio/gpio-ralink.txt | 6 ++++++
  8. drivers/gpio/gpio-ralink.c | 2 +-
  9. 2 files changed, 7 insertions(+), 1 deletion(-)
  10. --- a/Documentation/devicetree/bindings/gpio/gpio-ralink.txt
  11. +++ b/Documentation/devicetree/bindings/gpio/gpio-ralink.txt
  12. @@ -17,6 +17,9 @@ Required properties:
  13. Optional properties:
  14. - ralink,gpio-base : Specify the GPIO chips base number
  15. +- interrupt-controller : marks this as an interrupt controller
  16. +- #interrupt-cells : a standard two-cell interrupt flag, see
  17. + interrupt-controller/interrupts.txt
  18. Example:
  19. @@ -28,6 +31,9 @@ Example:
  20. reg = <0x600 0x34>;
  21. + interrupt-controller;
  22. + #interrupt-cells = <2>;
  23. +
  24. interrupt-parent = <&intc>;
  25. interrupts = <6>;
  26. --- a/drivers/gpio/gpio-ralink.c
  27. +++ b/drivers/gpio/gpio-ralink.c
  28. @@ -220,7 +220,7 @@ static int gpio_map(struct irq_domain *d
  29. }
  30. static const struct irq_domain_ops irq_domain_ops = {
  31. - .xlate = irq_domain_xlate_onecell,
  32. + .xlate = irq_domain_xlate_twocell,
  33. .map = gpio_map,
  34. };