i2c: stm32f7: allows for any bus frequency
authorAlain Volmat <alain.volmat@st.com>
Mon, 20 Apr 2020 14:57:57 +0000 (16:57 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Sun, 26 Apr 2020 07:53:06 +0000 (09:53 +0200)
commit09cc9a3bce914d363a0f481b6603f2943fde9227
treee8ba93010e3acda4b242eeb9a60bea340ef70e05
parentdd16163ea24b986136e0d11b9ebd861cef9d308d
i2c: stm32f7: allows for any bus frequency

Do not limitate to the 3 (100KHz, 400KHz, 1MHz) bus frequency but
instead allows any frequency (if it matches timing requirements).
Depending on the requested frequency, use the spec data from either
Standard, Fast or Fast Plus mode.

Hardcoding of min/max bus frequencies is removed and is instead computed.

The driver do not use anymore speed identifier but instead handle
directly the frequency and figure out the spec data (necessary
for the computation of the timing register) based on the frequency.

Signed-off-by: Alain Volmat <alain.volmat@st.com>
Reviewed-by: Pierre-Yves MORDRET <pierre-yves.mordret@st.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-stm32f7.c