arm64: zynqmp: Enable iio-hwmon for ina226 on zcu104
authorMichal Simek <michal.simek@xilinx.com>
Mon, 26 Aug 2019 07:40:23 +0000 (09:40 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Thu, 24 Oct 2019 11:37:02 +0000 (13:37 +0200)
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 <michal.simek@xilinx.com>
arch/arm/dts/zynqmp-zcu104-revC.dts

index 8d8cabfcb280619649a3b3978fe7179623d121d0..4044eea1271199b6abcb148b76cfc6f9c82b2339 100644 (file)
                device_type = "memory";
                reg = <0x0 0x0 0x0 0x80000000>;
        };
+
+       ina226 {
+               compatible = "iio-hwmon";
+               io-channels = <&u183 0>, <&u183 1>, <&u183 2>, <&u183 3>;
+       };
 };
 
 &can1 {
                        #address-cells = <1>;
                        #size-cells = <0>;
                        reg = <3>;
-                       ina226@40 { /* u183 */
+                       u183: ina226@40 { /* u183 */
                                compatible = "ti,ina226";
+                               #io-channel-cells = <1>;
                                reg = <0x40>;
                                shunt-resistor = <5000>;
                        };