Skip to content
Commit 6a38c69c authored by Phil Elwell's avatar Phil Elwell Committed by Phil Elwell
Browse files

fixup! i2c: designware: Support non-standard bus speeds



[1] calculates timings for arbitrary clock speeds, but it does so aiming
for a 50% SCL duty cycle. This is the wrong goal, particularly for high
clock speeds, because it doesn't allow the device sufficient time to
pull the bus low to issue an ACK.

Change the algorithm to aim for the minimum SCL high time (tHIGH) for
the requested speed according to the I2C Specification, using linear
interpolation between the values for the standard speeds.

Signed-off-by: default avatarPhil Elwell <phil@raspberrypi.com>

[1] commit cea76e58 ("i2c: designware: Support non-standard bus speeds")
parent 5b432b8d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment