arm64: zynqmp: Enable iio-hwmon for ina226 on zcu100
authorMichal Simek <michal.simek@xilinx.com>
Mon, 26 Aug 2019 07:30:34 +0000 (09:30 +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-zcu100-revC.dts

index 5285f62d1a30f6c21f6311e3dab8f14f2db4a4dc..14aa98de73fee55b77ba36bd8b7b977980929b81 100644 (file)
                compatible = "mmc-pwrseq-simple";
                reset-gpios = <&gpio 7 GPIO_ACTIVE_LOW>; /* WIFI_EN */
        };
+
+       ina226 {
+               compatible = "iio-hwmon";
+               io-channels = <&u35 0>, <&u35 1>, <&u35 2>, <&u35 3>;
+       };
 };
 
 &dcc {
                        #size-cells = <0>;
                        reg = <5>;
                        /* PS_PMBUS */
-                       ina226@40 { /* u35 */
+                       u35: ina226@40 { /* u35 */
                                compatible = "ti,ina226";
+                               #io-channel-cells = <1>;
                                reg = <0x40>;
                                shunt-resistor = <10000>;
                                /* MIO31 is alert which should be routed to PMUFW */