ARM: dts: aspeed: romulus: Enable iio-hwmon-battery
Subsystems (2)
PATCH v2 1/1 ARM: dts: aspeed: romulus: Enable iio-hwmon-battery
Add iio-hwmon-battery using adc channel 12;
Enable adc to make adc running.
Note it requires GPIOR3 to be pulled high to read the voltage, and this is left for user space to toggle the GPIO to save the battery usage.
--- arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts +8 -0
@@ -83,6 +83,11 @@ linux,code = <ASPEED_GPIO(Q, 7)>; }; }; + + iio-hwmon-battery { + compatible = "iio-hwmon"; + io-channels = <&adc 12>; + }; }; #include "ibm-power9-cfam.dtsi"
@@ -304,3 +309,6 @@ status = "okay"; }; +&adc { + status = "okay"; +};
Signature · 1 line
2.7.4
Joel Stanley
maintainerHi Lei,
Quoted 3 lines · Lei YU
Add iio-hwmon-battery using adc channel 12;
Enable adc to make adc running.
I assume we're doing this to read a battery voltage of some kind (was it the RTC)? The commit message should describe why the change is being made (as we can read the patch to see what is being done).
This patch does not apply to dev-4.17. Can you rebase and test on top of the latest?
Cheers,
Joel
Quoted 35 lines
Note it requires GPIOR3 to be pulled high to read the voltage, and this is left for user space to toggle the GPIO to save the battery usage.
Signed-off-by Lei YU <[email protected]>--- arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts | 8 ++++++++ 1 file changed, 8 insertions(+)arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts +8
-1@@ -83,6 +83,11 @@ linux,code = <ASPEED_GPIO(Q, 7)>; }; }; + + iio-hwmon-battery { + compatible = "iio-hwmon"; + io-channels = <&adc 12>; + }; }; #include "ibm-power9-cfam.dtsi"@@ -304,3 +309,6 @@ status = "okay"; }; +&adc { + status = "okay"; +}; --2.7.4
Quoted 12 lines · Joel Stanley
Hi Lei,
Quoted 3 lines · Lei YU
Add iio-hwmon-battery using adc channel 12;
Enable adc to make adc running.I assume we're doing this to read a battery voltage of some kind (was it the RTC)? The commit message should describe why the change is being made (as we can read the patch to see what is being done).
Yes, the commit message will be updated.
Quoted 2 lines
This patch does not apply to dev-4.17. Can you rebase and test on top of the latest?
Will check and submit a new version.