Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: mfd: Correct interrupt flags in examples

GPIO_ACTIVE_x flags are not correct in the context of interrupt flags.
These are simple defines so they could be used in DTS but they will not
have the same meaning:
1. GPIO_ACTIVE_HIGH = 0 = IRQ_TYPE_NONE
2. GPIO_ACTIVE_LOW = 1 = IRQ_TYPE_EDGE_RISING

Correct the interrupt flags, assuming the author of the code wanted same
logical behavior behind the name "ACTIVE_xxx", this is:
ACTIVE_LOW => IRQ_TYPE_LEVEL_LOW

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> # for BD70528
Acked-by: Tim Harvey <tharvey@gateworks.com> # for gateworks-gsc.yaml
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

Krzysztof Kozlowski and committed by
Lee Jones
b727db94 e8299c73

+4 -3
+1 -1
Documentation/devicetree/bindings/mfd/act8945a.txt
··· 71 71 pinctrl-names = "default"; 72 72 pinctrl-0 = <&pinctrl_charger_chglev &pinctrl_charger_lbo &pinctrl_charger_irq>; 73 73 interrupt-parent = <&pioA>; 74 - interrupts = <45 GPIO_ACTIVE_LOW>; 74 + interrupts = <45 IRQ_TYPE_LEVEL_LOW>; 75 75 76 76 active-semi,chglev-gpios = <&pioA 12 GPIO_ACTIVE_HIGH>; 77 77 active-semi,lbo-gpios = <&pioA 72 GPIO_ACTIVE_LOW>;
+2 -1
Documentation/devicetree/bindings/mfd/gateworks-gsc.yaml
··· 147 147 examples: 148 148 - | 149 149 #include <dt-bindings/gpio/gpio.h> 150 + #include <dt-bindings/interrupt-controller/irq.h> 150 151 i2c { 151 152 #address-cells = <1>; 152 153 #size-cells = <0>; ··· 156 155 compatible = "gw,gsc"; 157 156 reg = <0x20>; 158 157 interrupt-parent = <&gpio1>; 159 - interrupts = <4 GPIO_ACTIVE_LOW>; 158 + interrupts = <4 IRQ_TYPE_LEVEL_LOW>; 160 159 interrupt-controller; 161 160 #interrupt-cells = <1>; 162 161 #address-cells = <1>;
+1 -1
Documentation/devicetree/bindings/mfd/rohm,bd70528-pmic.txt
··· 39 39 compatible = "rohm,bd70528"; 40 40 reg = <0x4b>; 41 41 interrupt-parent = <&gpio1>; 42 - interrupts = <29 GPIO_ACTIVE_LOW>; 42 + interrupts = <29 IRQ_TYPE_LEVEL_LOW>; 43 43 clocks = <&osc 0>; 44 44 #clock-cells = <0>; 45 45 clock-output-names = "bd70528-32k-out";