Hi Andy On 2/27/20 1:21 PM, Andy Shevchenko wrote: > Since we have generic definitions for bus frequencies, let's use them. > > Cc: Thor Thayer <thor.thayer@xxxxxxxxxxxxxxx> > Acked-by: Elie Morisse <syniurge@xxxxxxxxx> > Acked-by: Nehal Shah <nehal-bakulchandra.shah@xxxxxxx> > Cc: Shyam Sundar S K <shyam-sundar.s-k@xxxxxxx> > Reviewed-by: Brendan Higgins <brendanhiggins@xxxxxxxxxx> > Cc: Krzysztof Adamski <krzysztof.adamski@xxxxxxxxx> > Cc: Florian Fainelli <f.fainelli@xxxxxxxxx> > Cc: Ray Jui <rjui@xxxxxxxxxxxx> > Acked-by: Scott Branden <scott.branden@xxxxxxxxxxxx> > Cc: Michal Simek <michal.simek@xxxxxxxxxx> > Reviewed-by: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx> > Acked-by: Jarkko Nikula <jarkko.nikula@xxxxxxxxxxxxxxx> > Acked-by: Baruch Siach <baruch@xxxxxxxxxx> > Reviewed-by: Guenter Roeck <linux@xxxxxxxxxxxx> > Cc: Kukjin Kim <kgene@xxxxxxxxxx> > Cc: Krzysztof Kozlowski <krzk@xxxxxxxxxx> > Cc: Dong Aisheng <aisheng.dong@xxxxxxx> > Cc: Shawn Guo <shawnguo@xxxxxxxxxx> > Cc: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> > Acked-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx> > Acked-by: Vladimir Zapolskiy <vz@xxxxxxxxx> > Cc: Matthias Brugger <matthias.bgg@xxxxxxxxx> > Cc: Gregory CLEMENT <gregory.clement@xxxxxxxxxxx> > Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx> > Cc: "Andreas Färber" <afaerber@xxxxxxx> > Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx> > Cc: Andy Gross <agross@xxxxxxxxxx> > Cc: Bjorn Andersson <bjorn.andersson@xxxxxxxxxx> > Reviewed-by: Chris Brandt <chris.brandt@xxxxxxxxxxx> > Cc: Heiko Stuebner <heiko@xxxxxxxxx> > Cc: Barry Song <baohua@xxxxxxxxxx> > Cc: Orson Zhai <orsonzhai@xxxxxxxxx> > Reviewed-by: Baolin Wang <baolin.wang7@xxxxxxxxx> > Cc: Chunyan Zhang <zhang.lyra@xxxxxxxxx> > Cc: Pierre-Yves MORDRET <pierre-yves.mordret@xxxxxx> > Cc: Maxime Coquelin <mcoquelin.stm32@xxxxxxxxx> > Cc: Alexandre Torgue <alexandre.torgue@xxxxxx> > Cc: Patrice Chotard <patrice.chotard@xxxxxx> > Acked-by: Ard Biesheuvel <ardb@xxxxxxxxxx> > Cc: Laxman Dewangan <ldewangan@xxxxxxxxxx> > Cc: Dmitry Osipenko <digetx@xxxxxxxxx> > Cc: Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx> > --- > v2: > squash to one patch (Wolfram) > used MAX in the definition names (Wolfram) > dropped HZ_PER_* > added collected tags > > drivers/i2c/busses/i2c-altera.c | 6 ++-- > drivers/i2c/busses/i2c-amd-mp2-plat.c | 27 +++++++++------ > drivers/i2c/busses/i2c-aspeed.c | 2 +- > drivers/i2c/busses/i2c-axxia.c | 4 +-- > drivers/i2c/busses/i2c-bcm-iproc.c | 14 ++++---- > drivers/i2c/busses/i2c-bcm-kona.c | 8 ++--- > drivers/i2c/busses/i2c-cadence.c | 7 ++-- > drivers/i2c/busses/i2c-designware-platdrv.c | 37 ++++++++++++--------- > drivers/i2c/busses/i2c-digicolor.c | 3 +- > drivers/i2c/busses/i2c-diolan-u2c.c | 12 +++---- > drivers/i2c/busses/i2c-exynos5.c | 18 ++++------ > drivers/i2c/busses/i2c-hix5hd2.c | 10 +++--- > drivers/i2c/busses/i2c-img-scb.c | 4 +-- > drivers/i2c/busses/i2c-imx-lpi2c.c | 16 +++------ > drivers/i2c/busses/i2c-imx.c | 5 +-- > drivers/i2c/busses/i2c-lpc2k.c | 6 ++-- > drivers/i2c/busses/i2c-mt65xx.c | 21 +++++------- > drivers/i2c/busses/i2c-mv64xxx.c | 6 ++-- > drivers/i2c/busses/i2c-mxs.c | 4 +-- > drivers/i2c/busses/i2c-nomadik.c | 8 ++--- > drivers/i2c/busses/i2c-owl.c | 9 ++--- > drivers/i2c/busses/i2c-qup.c | 11 ++---- > drivers/i2c/busses/i2c-rcar.c | 2 +- > drivers/i2c/busses/i2c-riic.c | 6 ++-- > drivers/i2c/busses/i2c-rk3x.c | 12 +++---- > drivers/i2c/busses/i2c-s3c2410.c | 4 +-- > drivers/i2c/busses/i2c-sh_mobile.c | 9 ++--- > drivers/i2c/busses/i2c-sirf.c | 3 +- > drivers/i2c/busses/i2c-sprd.c | 9 ++--- > drivers/i2c/busses/i2c-st.c | 6 ++-- > drivers/i2c/busses/i2c-stm32f4.c | 6 ++-- > drivers/i2c/busses/i2c-stm32f7.c | 24 ++++++------- > drivers/i2c/busses/i2c-stu300.c | 6 ++-- > drivers/i2c/busses/i2c-synquacer.c | 6 ++-- > drivers/i2c/busses/i2c-tegra.c | 18 ++++------ > drivers/i2c/busses/i2c-uniphier-f.c | 6 ++-- > drivers/i2c/busses/i2c-uniphier.c | 7 ++-- > drivers/i2c/busses/i2c-xlp9xx.c | 8 ++--- > 38 files changed, 168 insertions(+), 202 deletions(-) > [...] > diff --git a/drivers/i2c/busses/i2c-st.c b/drivers/i2c/busses/i2c-st.c > index 54e1fc8a495e..49794e8ec839 100644 > --- a/drivers/i2c/busses/i2c-st.c > +++ b/drivers/i2c/busses/i2c-st.c > @@ -213,7 +213,7 @@ static inline void st_i2c_clr_bits(void __iomem *reg, u32 mask) > */ > static struct st_i2c_timings i2c_timings[] = { > [I2C_MODE_STANDARD] = { > - .rate = 100000, > + .rate = I2C_MAX_STANDARD_MODE_FREQ, > .rep_start_hold = 4400, > .rep_start_setup = 5170, > .start_hold = 4400, > @@ -222,7 +222,7 @@ static struct st_i2c_timings i2c_timings[] = { > .bus_free_time = 5170, > }, > [I2C_MODE_FAST] = { > - .rate = 400000, > + .rate = I2C_MAX_FAST_MODE_FREQ, > .rep_start_hold = 660, > .rep_start_setup = 660, > .start_hold = 660, > @@ -835,7 +835,7 @@ static int st_i2c_probe(struct platform_device *pdev) > > i2c_dev->mode = I2C_MODE_STANDARD; > ret = of_property_read_u32(np, "clock-frequency", &clk_rate); > - if ((!ret) && (clk_rate == 400000)) > + if (!ret && (clk_rate == I2C_MAX_FAST_MODE_FREQ)) > i2c_dev->mode = I2C_MODE_FAST; > > i2c_dev->dev = &pdev->dev; For i2c-st.c Acked-by: Patrice Chotard <patrice.chotard@xxxxxx> Thanks