Replace driver internally coded enabling/disabling of the
analog-filter with the DT binding "i2c-analog-filter".
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
#define STM32_I2C_DNF_DEFAULT 0
#define STM32_I2C_DNF_MAX 16
-#define STM32_I2C_ANALOG_FILTER_ENABLE 1
#define STM32_I2C_ANALOG_FILTER_DELAY_MIN 50 /* ns */
#define STM32_I2C_ANALOG_FILTER_DELAY_MAX 260 /* ns */
STM32_I2C_FALL_TIME_DEFAULT);
i2c_priv->setup.dnf = STM32_I2C_DNF_DEFAULT;
- i2c_priv->setup.analog_filter = STM32_I2C_ANALOG_FILTER_ENABLE;
+ i2c_priv->setup.analog_filter = dev_read_bool(dev, "i2c-analog-filter");
/* Optional */
i2c_priv->regmap = syscon_regmap_lookup_by_phandle(dev,