[PATCH linux dev-4.17 v2] ARM: dts: aspeed: romulus: Enable iio-hwmon-battery

Joel Stanley joel at jms.id.au
Tue Aug 21 10:35:09 AEST 2018


Hi Lei,

On Fri, 17 Aug 2018 at 15:35, Lei YU <mine260309 at gmail.com> wrote:
>
> 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

>
> 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 <mine260309 at gmail.com>
> ---
>  arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts b/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
> index 852b552..a910bc8 100644
> --- a/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
> +++ b/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
> @@ -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
>


More information about the openbmc mailing list