[PATCH] i2c: mediatek: Isolate speed setting via dts for special devices

Tzung-Bi Shih tzungbi at google.com
Sun Jun 20 19:17:49 PDT 2021

On Sat, Jun 19, 2021 at 5:23 PM <kewei.xu at mediatek.com> wrote:
> In the commit be5ce0e97cc7 ("i2c: mediatek: Add i2c ac-timing adjust
> support"), the I2C timing calculation has been revised to support
> ac-timing, revised to support ac-timing adjustment, however that will
> break on some I2C components. As a result we want to introduce a new
> setting "default-adjust-timing" so those components can choose to use the
> old (default) timing algorithm.
Could you provide a proper "Fixes" tag.

> @@ -544,6 +558,7 @@ static void mtk_i2c_init_hw(struct mtk_i2c *i2c)
>                                        OFFSET_HS_STA_STO_AC_TIMING);
>                 }
>         }
> +       mtk_i2c_writew(i2c, ext_conf_val, OFFSET_EXT_CONF);
This looks like another fix.  Could you separate this into another
patch or explain more why it needs to be in the patch?

> @@ -1284,6 +1355,8 @@ static int mtk_i2c_parse_dt(struct device_node *np, struct mtk_i2c *i2c)
>         i2c->have_pmic = of_property_read_bool(np, "mediatek,have-pmic");
>         i2c->use_push_pull =
>                 of_property_read_bool(np, "mediatek,use-push-pull");
> +       i2c->default_timing_adjust =
> +               of_property_read_bool(np, "mediatek,default-timing-adjust");
Need a DT-binding document patch for the newly added property.

More information about the Linux-mediatek mailing list