[PATCH v1 2/2] dt-bindings: i2c: add force-set-sda property

Jie Li posted 2 patches 3 weeks, 5 days ago
[PATCH v1 2/2] dt-bindings: i2c: add force-set-sda property
Posted by Jie Li 3 weeks, 5 days ago
Document the new "force-set-sda" optional property.
This property is used for hardware where the SDA line is open-drain
but the standard driver-level check (like gpiod_get_direction) might
not correctly reflect the ability to drive the line for bus recovery.

Signed-off-by: Jie Li <jie.i.li@nokia.com>
---
 Documentation/devicetree/bindings/i2c/i2c-gpio.yaml | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Documentation/devicetree/bindings/i2c/i2c-gpio.yaml b/Documentation/devicetree/bindings/i2c/i2c-gpio.yaml
index afd4925c2a7d..82713fcf87e4 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-gpio.yaml
+++ b/Documentation/devicetree/bindings/i2c/i2c-gpio.yaml
@@ -37,6 +37,13 @@ properties:
     description: sda as output only
     type: boolean
 
+  force-set-sda:
+    type: boolean
+    description:
+      Force the use of the SDA output toggle during I2C bus recovery.
+      This is needed for some hardware where the SDA pin is open-drain
+      but the GPIO subsystem cannot automatically detect its output capability.
+
   i2c-gpio,scl-output-only:
     description: scl as output only
     type: boolean
-- 
2.43.0
Re: [PATCH v1 2/2] dt-bindings: i2c: add force-set-sda property
Posted by Krzysztof Kozlowski 3 weeks, 3 days ago
On 14/01/2026 15:13, Jie Li wrote:
> Document the new "force-set-sda" optional property.
> This property is used for hardware where the SDA line is open-drain
> but the standard driver-level check (like gpiod_get_direction) might
> not correctly reflect the ability to drive the line for bus recovery.

I think Linus explained well why this does not fit DT, so also formally
responding here - use proper GPIO flags, when SDA is open-drain.

> 
> Signed-off-by: Jie Li <jie.i.li@nokia.com>

This does not match From address. You need to always check your patches
with checkpatch.


Best regards,
Krzysztof