aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-5.4/950-0932-dtoverlays-Add-the-iio_hwmon-driver-to-correct-ADC-i.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/bcm27xx/patches-5.4/950-0932-dtoverlays-Add-the-iio_hwmon-driver-to-correct-ADC-i.patch')
-rw-r--r--target/linux/bcm27xx/patches-5.4/950-0932-dtoverlays-Add-the-iio_hwmon-driver-to-correct-ADC-i.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-5.4/950-0932-dtoverlays-Add-the-iio_hwmon-driver-to-correct-ADC-i.patch b/target/linux/bcm27xx/patches-5.4/950-0932-dtoverlays-Add-the-iio_hwmon-driver-to-correct-ADC-i.patch
new file mode 100644
index 0000000000..1005396340
--- /dev/null
+++ b/target/linux/bcm27xx/patches-5.4/950-0932-dtoverlays-Add-the-iio_hwmon-driver-to-correct-ADC-i.patch
@@ -0,0 +1,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>;