Skip to content
Commit 1fd9eb68 authored by Patrick Delaunay's avatar Patrick Delaunay Committed by Patrice Chotard
Browse files

i2c: stm32f7: move driver data of each instance in a privdata



Today all the I2C instance point on the same global
variable stm32_i2c_setup according the compatible: i2c_priv->setup =
pointer to the same driver data.

This patch changes this driver data (stm32f7_setup and stm32mp15_setup)
to a const struct and move the timing struct 'setup' as element of i2c
privdata, initialized in stm32_ofdata_to_platdata() with the driver
configuration data.

This patch solves issues when several I2C instance have not the same
clock source or not the same configuration: each timing setup is saved
is the I2C privdata.

Signed-off-by: default avatarPatrick Delaunay <patrick.delaunay@foss.st.com>
Signed-off-by: default avatarPatrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: default avatarPatrice Chotard <patrice.chotard@foss.st.com>
parent 81b2445a
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