i2c: i2c-stm32f7: improve loopback in timing algorithm
Subsystems (3)
PATCH 1/1 i2c: i2c-stm32f7: improve loopback in timing algorithm
From: Nicolas Le Bayon <[email protected]>
This avoids useless loops inside the I2C timing algorithm. Actually, we support only one possible solution per prescaler value. So after finding a solution with a prescaler, the algorithm can switch directly to the next prescaler value.
--- drivers/i2c/busses/i2c-stm32f7.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/i2c/busses/i2c-stm32f7.c +4 -0
@@ -476,8 +476,12 @@ static int stm32f7_i2c_compute_timing(struct stm32f7_i2c_dev *i2c_dev,list_add_tail (&v->node, &solutions); +break ; } } + +if (p_prev == p) +break ; } }
Signature · 1 line
1.9.1
Hi
Thanks
Quoted 31 lines · Bich HEMON
From: Nicolas Le Bayon <[email protected]>
This avoids useless loops inside the I2C timing algorithm. Actually, we support only one possible solution per prescaler value. So after finding a solution with a prescaler, the algorithm can switch directly to the next prescaler value.
Signed-off-by Nicolas Le Bayon <[email protected]>Signed-off-by Bich Hemon <[email protected]>--- drivers/i2c/busses/i2c-stm32f7.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/i2c/busses/i2c-stm32f7.c +4
-0@@ -476,8 +476,12 @@ static int stm32f7_i2c_compute_timing(struct stm32f7_i2c_dev *i2c_dev,list_add_tail (&v->node, &solutions); +break ; } } + +if (p_prev == p) +break ; } }
Wolfram Sang
AppliedQuoted 9 lines · Bich HEMON
From: Nicolas Le Bayon <[email protected]>
This avoids useless loops inside the I2C timing algorithm. Actually, we support only one possible solution per prescaler value. So after finding a solution with a prescaler, the algorithm can switch directly to the next prescaler value.
Signed-off-by Nicolas Le Bayon <[email protected]>Signed-off-by Bich Hemon <[email protected]>
Applied to for-next, thanks!
Pierre-Yves, there are two binding patches for stm32 still open, if you have some time for it...