aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@foss.st.com>2021-08-03 12:05:12 +0200
committerPatrice Chotard <patrice.chotard@foss.st.com>2021-10-08 08:42:40 +0200
commit09599998919c6eab26c3dfd0fcd2f8a6a07cf75d (patch)
treefed3ff3c2170cce866d1b1aff2733ed1e1532368 /drivers
parent2aaac1787a6a13e087bb75254d6430a4e1c947bf (diff)
downloadu-boot-09599998919c6eab26c3dfd0fcd2f8a6a07cf75d.zip
u-boot-09599998919c6eab26c3dfd0fcd2f8a6a07cf75d.tar.gz
u-boot-09599998919c6eab26c3dfd0fcd2f8a6a07cf75d.tar.bz2
i2c: stm32f7: support DT binding i2c-analog-filter
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/i2c/stm32f7_i2c.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/i2c/stm32f7_i2c.c b/drivers/i2c/stm32f7_i2c.c
index b449084..e71a0e0 100644
--- a/drivers/i2c/stm32f7_i2c.c
+++ b/drivers/i2c/stm32f7_i2c.c
@@ -108,7 +108,6 @@ struct stm32_i2c_regs {
#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 */
@@ -919,7 +918,7 @@ static int stm32_of_to_plat(struct udevice *dev)
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,