From ae7677edb713f030daeab9a96ce07cb8664d49f3 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Mon, 26 Aug 2019 11:09:42 +0200 Subject: [PATCH] arm64: zynqmp: Enable iio-hwmon for ina226 on g-a2197-00 ina226 hwmon driver is deprecated and it is recommended to use new iio based driver. The patch is enabling iio-hwmon driver to export functionality from IIO to hwmon interface to be able to use lm-sensors package. Signed-off-by: Michal Simek --- arch/arm/dts/zynqmp-g-a2197-00-revA.dts | 43 +++++++++++++++++++++---- 1 file changed, 37 insertions(+), 6 deletions(-) diff --git a/arch/arm/dts/zynqmp-g-a2197-00-revA.dts b/arch/arm/dts/zynqmp-g-a2197-00-revA.dts index 6e5a0d2c5b..56d23b2b08 100644 --- a/arch/arm/dts/zynqmp-g-a2197-00-revA.dts +++ b/arch/arm/dts/zynqmp-g-a2197-00-revA.dts @@ -38,6 +38,31 @@ device_type = "memory"; reg = <0x0 0x0 0x0 0x80000000>; }; + + ina226-u74 { + compatible = "iio-hwmon"; + io-channels = <&u74 0>, <&u74 1>, <&u74 2>, <&u74 3>; + }; + ina226-u75 { + compatible = "iio-hwmon"; + io-channels = <&u75 0>, <&u75 1>, <&u75 2>, <&u75 3>; + }; + ina226-u78 { + compatible = "iio-hwmon"; + io-channels = <&u78 0>, <&u78 1>, <&u78 2>, <&u78 3>; + }; + ina226-u79 { + compatible = "iio-hwmon"; + io-channels = <&u79 0>, <&u79 1>, <&u79 2>, <&u79 3>; + }; + ina226-u82 { + compatible = "iio-hwmon"; + io-channels = <&u82 0>, <&u82 1>, <&u82 2>, <&u82 3>; + }; + ina226-u84 { + compatible = "iio-hwmon"; + io-channels = <&u84 0>, <&u84 1>, <&u84 2>, <&u84 3>; + }; }; &sdhci0 { /* emmc MIO 13-23 16GB */ @@ -198,33 +223,39 @@ compatible = "ti,tps544b25"; reg = <0x20>; }; - ina226@40 { /* u74 */ + u74: ina226@40 { /* u74 */ compatible = "ti,ina226"; + #io-channel-cells = <1>; reg = <0x40>; shunt-resistor = <1000>; }; - ina226@41 { /* u75 */ + u75: ina226@41 { /* u75 */ compatible = "ti,ina226"; + #io-channel-cells = <1>; reg = <0x41>; shunt-resistor = <1000>; }; - ina226@42 { /* u78 */ + u78: ina226@42 { /* u78 */ compatible = "ti,ina226"; + #io-channel-cells = <1>; reg = <0x42>; shunt-resistor = <5000>; }; - ina226@43 { /* u79 */ + u79: ina226@43 { /* u79 */ compatible = "ti,ina226"; + #io-channel-cells = <1>; reg = <0x43>; shunt-resistor = <1000>; }; - ina226@44 { /* u82 */ + u82: ina226@44 { /* u82 */ compatible = "ti,ina226"; + #io-channel-cells = <1>; reg = <0x44>; shunt-resistor = <1000>; }; - ina226@45 { /* u84 */ + u84: ina226@45 { /* u84 */ compatible = "ti,ina226"; + #io-channel-cells = <1>; reg = <0x45>; shunt-resistor = <5000>; }; -- 2.39.5