Skip to contentSkip to conversation

ARM: dts: aspeed: wspoon: Enable iio-hwmon battery

PATCH Applied Matt Spinler 3 participants 3 messages Oct 12, 2018 – Oct 21, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dts: aspeed: wspoon: Enable iio-hwmon battery

The BMC can read the RTC battery voltage via ADC
channel 12.

---
 arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +9 -0
index f4739ec..b933ced 100644
@@ -63,6 +63,11 @@
 		};
 	};
 
+	iio-hwmon-battery {
+		compatible = "iio-hwmon";
+		io-channels = <&adc 12>;
+	};
+
 	gpio-keys-polled {
 		compatible = "gpio-keys-polled";
 		#address-cells = <1>;
@@ -651,4 +656,8 @@
 	status = "okay";
 };
 
+&adc {
+	status = "okay";
+};
+
 #include "ibm-power9-dual.dtsi"
Signature · 1 line
1.8.3.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 35 lines · Matt Spinler

The BMC can read the RTC battery voltage via ADC
channel 12.

---
 arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +9 -1
index f4739ec..b933ced 100644
@@ -63,6 +63,11 @@
                };
        };
 
+       iio-hwmon-battery {
+               compatible = "iio-hwmon";
+               io-channels = <&adc 12>;
+       };
+
        gpio-keys-polled {
                compatible = "gpio-keys-polled";
                #address-cells = <1>;
@@ -651,4 +656,8 @@
        status = "okay";
 };
 
+&adc {
+       status = "okay";
+};
+
 #include "ibm-power9-dual.dtsi"
--
Quoted 1 line

1.8.3.1