ARM: dts: aspeed: zaius: Add iio-hwmon ADC bridge
Subsystems (2)
PATCH 1/1 ARM: dts: aspeed: zaius: Add iio-hwmon ADC bridge
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 <[email protected]>
--- arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts +8 -0
@@ -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 {
Signature · 1 line
2.12.2.564.g063fe858b8-goog
Acked-by Rick Altherr <[email protected]>
Quoted 36 lines · Xo Wang
Add instantiation for iio-hwmon bridge that exports the ADC (an iio device) channels to hwmon as a device.
This requires
CONFIG_SENSORS_IIO_HWMONto 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 <[email protected]>--- arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts | 8 ++++++++ 1 file changed, 8 insertions(+)arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts +8
-1@@ -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