lede/target/linux/bcm27xx/patches-6.12/950-0447-i2c-designware-Make-the-SDA-hold-time-half-LCNT.patch
=?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= d81c03f05e bcm27xx: add 6.12 patches from RPi repo
These patches were generated from:
https://github.com/raspberrypi/linux/commits/rpi-6.12.y
With the following command:
git format-patch -N v6.12.27..HEAD
(HEAD -> 8d3206ee456a5ecdf9ddbfd8e5e231e4f0cd716e)

Exceptions:
- (def)configs patches
- github workflows patches
- applied & reverted patches
- readme patches
- wireless patches

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-06-20 17:01:06 +08:00

26 lines
769 B
Diff

From d8ea27e70802e9cc37eada66a9ef0c3bd396dc55 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.com>
Date: Thu, 4 Apr 2024 17:03:33 +0100
Subject: [PATCH] i2c: designware: Make the SDA hold time half LCNT
In the absence of a value in Device Tree, set the SDA hold time to half
the SCL low time.
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
---
drivers/i2c/busses/i2c-designware-master.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/i2c/busses/i2c-designware-master.c
+++ b/drivers/i2c/busses/i2c-designware-master.c
@@ -213,6 +213,9 @@ static int i2c_dw_set_timings_master(str
dev->hs_hcnt, dev->hs_lcnt);
}
+ if (!dev->sda_hold_time)
+ dev->sda_hold_time = lcnt / 2;
+
ret = i2c_dw_set_sda_hold(dev);
if (ret)
return ret;