Openwrt/target/linux/bcm27xx/patches-5.4/950-0932-dtoverlays-Add-the-iio_hwmon-driver-to-correct-ADC-i.patch
Álvaro Fernández Rojas f07e572f64 bcm27xx: import latest patches from the RPi foundation
bcm2708: boot tested on RPi B+ v1.2
bcm2709: boot tested on RPi 3B v1.2 and RPi 4B v1.1 4G
bcm2710: boot tested on RPi 3B v1.2
bcm2711: boot tested on RPi 4B v1.1 4G

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2021-02-18 23:42:32 +01:00

41 lines
1.3 KiB
Diff

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>;