i2c: stm32f7_i2c: allows for any bus frequency
authorAlain Volmat <alain.volmat@st.com>
Fri, 6 Mar 2020 10:09:14 +0000 (11:09 +0100)
committerPatrick Delaunay <patrick.delaunay@st.com>
Tue, 24 Mar 2020 13:23:32 +0000 (14:23 +0100)
commitc32446557627699cd17c93d1077b9d0466a81589
tree0ba8515f1ea11a8b658d7b1cad2da9fe7c75c844
parent9368bdfebde16368cdb642adbb12f9c871c94d63
i2c: stm32f7_i2c: allows for any bus frequency

Do not limit to 3 (100KHz, 400KHz, 1MHz) bus frequencies, but
instead allow for any frequency. Depending on the requested
frequency (via the clock-frequency DT entry), use the spec
data from either Standard, Fast or Fast Plus mode.

In order to do so, the driver do not use anymore spec identifier
by directly handle the requested frequency and from it retrieve
the corresponding spec data to be used for the computation
of the timing register.

Signed-off-by: Alain Volmat <alain.volmat@st.com>
Reviewed-by: Patrick DELAUNAY <patrick.delaunay@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Acked-by: Patrice Chotard <patrice.chotard@st.com>
drivers/i2c/stm32f7_i2c.c