arm64: zynqmp: Enable iio-hwmon for ina226 on g-a2197-00
authorMichal Simek <michal.simek@xilinx.com>
Mon, 26 Aug 2019 09:09:42 +0000 (11:09 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Thu, 24 Oct 2019 11:37:01 +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-g-a2197-00-revA.dts

index 6e5a0d2c5be6083880eea78ae4d7b8ab09340d85..56d23b2b0894f30e8f881cd7a1c0293efd5a5e46 100644 (file)
                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 */
                                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>;
                        };