Message ID | 20170331235727.78354-1-xow@google.com |
---|---|
State | Accepted, archived |
Headers | show |
Acked-by: Rick Altherr <raltherr@google.com> On Fri, Mar 31, 2017 at 4:57 PM, Xo Wang <xow@google.com> wrote: > Add instantiation for iio-hwmon bridge that exports the ADC (an iio > device) channels to hwmon as a device. > > This requires CONFIG_SENSORS_IIO_HWMON to function. Note that the hwmon > input numbering is one-indexed, so each input will be numbered one > greater than their corresponding ADC channel. > > Signed-off-by: Xo Wang <xow@google.com> > --- > arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts > b/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts > index dfd0dd7c16e4..7ea66de051d4 100644 > --- a/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts > +++ b/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts > @@ -86,6 +86,14 @@ > enable-gpios = <&gpio ASPEED_GPIO(D, 0) GPIO_ACTIVE_HIGH>; > mux-gpios = <&gpio ASPEED_GPIO(P, 6) GPIO_ACTIVE_HIGH>; > }; > + > + iio-hwmon { > + compatible = "iio-hwmon"; > + io-channels = <&adc 0>, <&adc 1>, <&adc 2>, <&adc 3>, > + <&adc 4>, <&adc 5>, <&adc 6>, <&adc 7>, > + <&adc 8>, <&adc 9>, <&adc 10>, <&adc 11>, > + <&adc 12>, <&adc 13>, <&adc 14>, <&adc 15>; > + }; > }; > > &fmc { > -- > 2.12.2.564.g063fe858b8-goog > >
diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts b/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts index dfd0dd7c16e4..7ea66de051d4 100644 --- a/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts +++ b/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts @@ -86,6 +86,14 @@ enable-gpios = <&gpio ASPEED_GPIO(D, 0) GPIO_ACTIVE_HIGH>; mux-gpios = <&gpio ASPEED_GPIO(P, 6) GPIO_ACTIVE_HIGH>; }; + + iio-hwmon { + compatible = "iio-hwmon"; + io-channels = <&adc 0>, <&adc 1>, <&adc 2>, <&adc 3>, + <&adc 4>, <&adc 5>, <&adc 6>, <&adc 7>, + <&adc 8>, <&adc 9>, <&adc 10>, <&adc 11>, + <&adc 12>, <&adc 13>, <&adc 14>, <&adc 15>; + }; }; &fmc {
Add instantiation for iio-hwmon bridge that exports the ADC (an iio device) channels to hwmon as a device. This requires CONFIG_SENSORS_IIO_HWMON to function. Note that the hwmon input numbering is one-indexed, so each input will be numbered one greater than their corresponding ADC channel. Signed-off-by: Xo Wang <xow@google.com> --- arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts | 8 ++++++++ 1 file changed, 8 insertions(+)