83663a2f023cb32f6096ee5e5cd87c2ead995922
[openwrt/staging/ldir.git] /
1 From ef6a692bf0e076c905a912fbb8e65481c354a7ca Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.com>
3 Date: Wed, 23 Nov 2022 11:51:38 +0000
4 Subject: [PATCH] overlays: i2c-sensor: Make smbus-timeout-disable
5 optional
6
7 Although disabling the SMBUS timeout may be useful, not all chips
8 support it. The driver treats attempting to disable the timeout on a
9 non-supporting chip as an error, so make it an option enabled using the
10 no_timeout parameter.
11
12 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
13 ---
14 arch/arm/boot/dts/overlays/README | 5 +++++
15 arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi | 2 +-
16 2 files changed, 6 insertions(+), 1 deletion(-)
17
18 --- a/arch/arm/boot/dts/overlays/README
19 +++ b/arch/arm/boot/dts/overlays/README
20 @@ -1999,6 +1999,11 @@ Params: addr Set the
21 use the "jc42" option.
22 Valid addresses are 0x18-0x1f (default 0x18)
23
24 + no_timeout Disable the SMBUS timeout. N.B. Only supported
25 + by some jc42 devices - using with an
26 + incompatible device can stop it from being
27 + activated.
28 +
29 sht3x Select the Sensiron SHT3x temperature and
30 humidity sensor. Valid addresses 0x44-0x45,
31 default 0x44
32 --- a/arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi
33 +++ b/arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi
34 @@ -347,7 +347,6 @@
35 jc42: jc42@18 {
36 compatible = "jedec,jc-42.4-temp";
37 reg = <0x18>;
38 - smbus-timeout-disable;
39 };
40 };
41 };
42 @@ -383,5 +382,6 @@
43 <&ds1621>,"reg:0", <&bme680>,"reg:0", <&ccs811>,"reg:0",
44 <&bh1750>,"reg:0", <&mcp980x>,"reg:0", <&jc42>,"reg:0";
45 int_pin = <&max30102>, "interrupts:0";
46 + no_timeout = <&jc42>, "smbus-timeout-disable?";
47 };
48 };