mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
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>
This commit is contained in:
@@ -228,6 +228,9 @@ static int i2c_dw_set_timings_master(struct dw_i2c_dev *dev)
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user