ARM: dts: s5pv210: Correct fuelgauge definition on Aries
authorJonathan Bakker <xc-racer2@live.ca>
Sat, 13 Jun 2020 18:44:24 +0000 (11:44 -0700)
committerKrzysztof Kozlowski <krzk@kernel.org>
Mon, 15 Jun 2020 07:00:39 +0000 (09:00 +0200)
Correct the fuelgauge definition because only the fuelgauge on
fascinate4g has interrupt support (and even then it was wrong).

Also, assign the GPIO pinctrl so the interrupt is properly configured

Signed-off-by: Jonathan Bakker <xc-racer2@live.ca>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
arch/arm/boot/dts/s5pv210-aries.dtsi
arch/arm/boot/dts/s5pv210-fascinate4g.dts

index cf858029292ed31ba50d58317eba8e08da9d7fae..d3aeafc0f650788270b8835a5b1a8bcf0ada7838 100644 (file)
                pinctrl-names = "default";
                pinctrl-0 = <&fg_i2c_pins>;
 
-               fuelgauge@36 {
+               fg: fuelgauge@36 {
                        compatible = "maxim,max17040";
-                       interrupt-parent = <&vic0>;
-                       interrupts = <7>;
                        reg = <0x36>;
                };
        };
index 5e1b81823a8db484dede4b5a7fa4fa85cc803574..65eed01cfced1a7383ba548eda35d9c7fb95f07f 100644 (file)
        };
 };
 
+&fg {
+       compatible = "maxim,max77836-battery";
+
+       interrupt-parent = <&gph3>;
+       interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
+
+       pinctrl-names = "default";
+       pinctrl-0 = <&fg_irq>;
+};
+
 &pinctrl0 {
        pinctrl-names = "default";
        pinctrl-0 = <&sleep_cfg>;
 
+       fg_irq: fg-irq {
+               samsung,pins = "gph3-3";
+               samsung,pin-function = <EXYNOS_PIN_FUNC_F>;
+               samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
+               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
+       };
+
        /* Based on vendor kernel v2.6.35.7 */
        sleep_cfg: sleep-cfg {
                PIN_SLP(gpa0-0, PREV, NONE);