]> rtime.felk.cvut.cz Git - vajnamar/linux-xlnx.git/commitdiff
arm64: zynqmp: Enable IIO hwmon sensors
authorMichal Simek <michal.simek@xilinx.com>
Thu, 25 May 2017 13:08:36 +0000 (15:08 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 20 Jun 2017 12:13:50 +0000 (14:13 +0200)
Wire PS ams sensors with hwmon sensors to have quick way how to read
information about chip from sensors tools and others(gkrellm).
Using iio-hwmon is deprecated but still valid option how to do it.
When iio framework is better integrated in standard tools this should be
changed.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revB.dts
arch/arm64/boot/dts/xilinx/zynqmp.dtsi
arch/arm64/configs/xilinx_zynqmp_defconfig

index 07687688e4dd52de629b42d20b498e654219e535..33c57775dafcfb6aded5eefce6ede94d9a844c4c 100644 (file)
                };
        };
 
+       iio-hwmon {
+               compatible = "iio-hwmon";
+               io-channels = <&xilinx_ams 0>, <&xilinx_ams 1>, <&xilinx_ams 2>,
+                             <&xilinx_ams 3>, <&xilinx_ams 4>, <&xilinx_ams 5>,
+                             <&xilinx_ams 6>, <&xilinx_ams 7>, <&xilinx_ams 8>,
+                             <&xilinx_ams 9>, <&xilinx_ams 10>,
+                             <&xilinx_ams 11>, <&xilinx_ams 12>;
+       };
+
        leds {
                compatible = "gpio-leds";
                ds2 {
index e6af9f11dc434e93dd8659aa428eba04d50916c8..6720d553c12e96fd93201296a7fec74a41036c19 100644 (file)
                        reg-names = "ams-base";
                        #address-cells = <2>;
                        #size-cells = <2>;
+                       #io-channel-cells = <1>;
                        ranges;
 
                        ams_ps: ams_ps@ffa50800 {
index 6a6f631d5f6d965a3a3267278e16238be2c2c3ec..5ace245887ff20783c8a1f2ffa88515f91f76b56 100644 (file)
@@ -213,6 +213,7 @@ CONFIG_GPIO_ZYNQ=y
 CONFIG_GPIO_PCA953X=y
 CONFIG_GPIO_TPS65086=y
 CONFIG_POWER_RESET_LTC2952=y
+CONFIG_SENSORS_IIO_HWMON=y
 CONFIG_PMBUS=y
 CONFIG_SENSORS_MAX20751=y
 CONFIG_SENSORS_INA2XX=y