]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
arm64: dts: sprd: sc2731: move fuel-gauge monitored-battery to device DTS
authorStanislav Jakubek <stano.jakubek@gmail.com>
Wed, 6 Nov 2024 19:05:45 +0000 (20:05 +0100)
committerKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Thu, 5 Dec 2024 10:33:38 +0000 (11:33 +0100)
The monitored-battery property is a property of the board, not the PMIC.
Move this property to the DTS of its only user, sp9860g-1h10.
While at it, disable the fuel-gauge node by default and enable it only
for its users, as it requires board-specific properties to work correctly.

Signed-off-by: Stanislav Jakubek <stano.jakubek@gmail.com>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Link: https://lore.kernel.org/r/2959aa8567afbef17337829072adce01158f00bb.1730918663.git.stano.jakubek@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
arch/arm64/boot/dts/sprd/sc2731.dtsi
arch/arm64/boot/dts/sprd/sp9860g-1h10.dts

index 12136e68dada6771eb0a6720dbf549ca4f1d035f..2d27427c41a274779795c76d1878e54e2022d859 100644 (file)
                        nvmem-cells = <&adc_big_scale>, <&adc_small_scale>;
                };
 
-               fuel-gauge@a00 {
+               pmic_fgu: fuel-gauge@a00 {
                        compatible = "sprd,sc2731-fgu";
                        reg = <0xa00>;
                        bat-detect-gpio = <&pmic_eic 9 GPIO_ACTIVE_HIGH>;
                        io-channels = <&pmic_adc 3>, <&pmic_adc 6>;
                        io-channel-names = "bat-temp", "charge-vol";
-                       monitored-battery = <&bat>;
                        nvmem-cell-names = "fgu_calib";
                        nvmem-cells = <&fgu_calib>;
                        interrupt-parent = <&sc2731_pmic>;
                        interrupts = <4>;
+                       status = "disabled";
                };
 
                vibrator@ec8 {
index 94af7700f3e2bc7671bf85657217a353df37cc78..b1fa817ece1e5d03876c9fff1024899d4e7b0bd2 100644 (file)
        };
 };
 
+&pmic_fgu {
+       monitored-battery = <&bat>;
+       status = "okay";
+};
+
 &uart0 {
        status = "okay";
 };