aboutsummaryrefslogtreecommitdiff
path: root/target/linux/bcm27xx/patches-6.1/950-0467-overlays-i2c-sensor-Make-smbus-timeout-disable-optio.patch
blob: 83663a2f023cb32f6096ee5e5cd87c2ead995922 (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
41
42
43
44
45
46
47
48
From ef6a692bf0e076c905a912fbb8e65481c354a7ca Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.com>
Date: Wed, 23 Nov 2022 11:51:38 +0000
Subject: [PATCH] overlays: i2c-sensor: Make smbus-timeout-disable
 optional

Although disabling the SMBUS timeout may be useful, not all chips
support it. The driver treats attempting to disable the timeout on a
non-supporting chip as an error, so make it an option enabled using the
no_timeout parameter.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
---
 arch/arm/boot/dts/overlays/README                 | 5 +++++
 arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -1999,6 +1999,11 @@ Params: addr                    Set the
                                 use the "jc42" option.
                                 Valid addresses are 0x18-0x1f (default 0x18)
 
+        no_timeout              Disable the SMBUS timeout. N.B. Only supported
+                                by some jc42 devices - using with an
+                                incompatible device can stop it from being
+                                activated.
+
         sht3x                   Select the Sensiron SHT3x temperature and
                                 humidity sensor. Valid addresses 0x44-0x45,
                                 default 0x44
--- a/arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi
+++ b/arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi
@@ -347,7 +347,6 @@
 			jc42: jc42@18 {
 				compatible = "jedec,jc-42.4-temp";
 				reg = <0x18>;
-				smbus-timeout-disable;
 			};
 		};
 	};
@@ -383,5 +382,6 @@
 			<&ds1621>,"reg:0", <&bme680>,"reg:0", <&ccs811>,"reg:0",
 			<&bh1750>,"reg:0", <&mcp980x>,"reg:0", <&jc42>,"reg:0";
 		int_pin = <&max30102>, "interrupts:0";
+		no_timeout = <&jc42>, "smbus-timeout-disable?";
 	};
 };