aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-5.4/950-0932-dtoverlays-Add-the-iio_hwmon-driver-to-correct-ADC-i.patch
blob: 10053963403c905ddbdb4fe2bba65c852c86243d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
From 8bfdbba339bd363633e2232777fd749000011a41 Mon Sep 17 00:00:00 2001
From: Annaliese McDermond <nh6z@nh6z.net>
Date: Sun, 2 Aug 2020 18:25:07 +0000
Subject: [PATCH] dtoverlays: Add the iio_hwmon driver to correct ADC
 issues

The Linux kernel maintainers removed the hwmon driver for the
ads1015 used on this board.  They deprecated it in favor of using
the IIO version of the driver with the iio_hwmon bridge.  This
patch updates the DRAWS dtoverlay to support that usage.

Signed-off-by: Annaliese McDermond <nh6z@nh6z.net>
---
 arch/arm/boot/dts/overlays/draws-overlay.dts | 8 ++++++++
 1 file changed, 8 insertions(+)

--- a/arch/arm/boot/dts/overlays/draws-overlay.dts
+++ b/arch/arm/boot/dts/overlays/draws-overlay.dts
@@ -45,6 +45,13 @@
                 gpios = <&gpio 7 0>;
                 status = "okay";
             };
+
+            iio-hwmon {
+                compatible = "iio-hwmon";
+                status = "okay";
+                io-channels = <&tla2024 4>, <&tla2024 5>, <&tla2024 6>,
+                              <&tla2024 7>;
+            };
         };
     };
 
@@ -91,6 +98,7 @@
                 reg = <0x48>;
                 #address-cells = <1>;
                 #size-cells = <0>;
+                #io-channel-cells = <1>;
 
                 adc_ch4: channel@4 {
                     reg = <4>;