]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ARM: dts: aspeed: wspoon: Enable iio-hwmon battery
authorMatt Spinler <mspinler@linux.vnet.ibm.com>
Fri, 12 Oct 2018 15:29:15 +0000 (10:29 -0500)
committerJoel Stanley <joel@jms.id.au>
Sun, 2 Dec 2018 22:44:10 +0000 (09:14 +1030)
The BMC can read the RTC battery voltage via ADC
channel 12.

Signed-off-by: Matt Spinler <spinler@linux.vnet.ibm.com>
Reviewed-by: Lei YU <mine260309@gmail.com>
Signed-off-by: Joel Stanley <joel@jms.id.au>
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts

index 656036106001ae9adddab3d710fd54d934c60e77..ad54117c075e994e00f17fcbcbe05e0785e359cd 100644 (file)
@@ -56,6 +56,11 @@ ps1-presence {
                };
        };
 
+       iio-hwmon-battery {
+               compatible = "iio-hwmon";
+               io-channels = <&adc 12>;
+       };
+
        gpio-keys-polled {
                compatible = "gpio-keys-polled";
                #address-cells = <1>;
@@ -583,3 +588,7 @@ &wdt2 {
 &ibt {
        status = "okay";
 };
+
+&adc {
+       status = "okay";
+};