aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Le Bayon2019-04-18 17:32:42 +0200
committerPatrice Chotard2019-05-23 11:36:47 +0200
commite87da7521f922e3d0f6aaa6b162e872f8f39c649 (patch)
tree128a95f4c29f8d3dc554b345f699cad21877f783
parent3351768ef9297fa9af89d704effeb1ca1508905b (diff)
i2c: stm32f7: Fix SDADEL minimum formula
It conforms with Reference Manual I2C timing section. Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com> Reviewed-by: Patrick DELAUNAY <patrick.delaunay@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
-rw-r--r--drivers/i2c/stm32f7_i2c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/stm32f7_i2c.c b/drivers/i2c/stm32f7_i2c.c
index 3872364d6bf..e7e0268ebeb 100644
--- a/drivers/i2c/stm32f7_i2c.c
+++ b/drivers/i2c/stm32f7_i2c.c
@@ -500,7 +500,7 @@ static int stm32_i2c_compute_solutions(struct stm32_i2c_setup *setup,
af_delay_max = setup->analog_filter ?
STM32_I2C_ANALOG_FILTER_DELAY_MAX : 0;
- sdadel_min = setup->fall_time - i2c_specs[setup->speed].hddat_min -
+ sdadel_min = i2c_specs[setup->speed].hddat_min + setup->fall_time -
af_delay_min - (setup->dnf + 3) * i2cclk;
sdadel_max = i2c_specs[setup->speed].vddat_max - setup->rise_time -