overlays: i2c-sensor: Make smbus-timeout-disable optional
authorPhil Elwell <phil@raspberrypi.com>
Wed, 23 Nov 2022 11:51:38 +0000 (11:51 +0000)
committerPhil Elwell <phil@raspberrypi.com>
Wed, 23 Nov 2022 12:10:57 +0000 (12:10 +0000)
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
arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi

index 04ba527..41f101b 100644 (file)
@@ -1999,6 +1999,11 @@ Params: addr                    Set the address for the BH1750, BME280, BME680,
                                 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
index baac806..c81d8e5 100755 (executable)
                        jc42: jc42@18 {
                                compatible = "jedec,jc-42.4-temp";
                                reg = <0x18>;
-                               smbus-timeout-disable;
                        };
                };
        };
                        <&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?";
        };
 };