All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tzung-Bi Shih <tzungbi@google.com>
To: Kewei Xu <kewei.xu@mediatek.com>
Cc: wsa@the-dreams.de, matthias.bgg@gmail.com, robh+dt@kernel.org,
	linux-i2c@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,
	srv_heupstream@mediatek.com, leilk.liu@mediatek.com,
	qii.wang@mediatek.com, qiangming.xia@mediatek.com,
	ot_daolong.zhu@mediatek.com
Subject: Re: [PATCH 8/8] i2c: mediatek: modify bus speed calculation formula
Date: Thu, 15 Jul 2021 15:09:25 +0800	[thread overview]
Message-ID: <CA+Px+wWNcSkxvsEoUrgBN73+jhq8qjFJodYjQnY1zW2d0a5yRA@mail.gmail.com> (raw)
In-Reply-To: <1626316157-24935-9-git-send-email-kewei.xu@mediatek.com>

On Thu, Jul 15, 2021 at 10:32 AM Kewei Xu <kewei.xu@mediatek.com> wrote:
> When clock-div is 0 or greater than 1, the bus speed
> calculated by the old speed calculation formula will be
> larger than the target speed. So we update the formula.
The patch sounds like a fix up.  Need a "Fixes" tag.

>         for (clk_div = 1; clk_div <= max_clk_div; clk_div++) {
>                 clk_src = parent_clk / clk_div;
> +               i2c->ac_timing.inter_clk_div = clk_div - 1;
Using the way to pass the parameter "inter_clk_div" to
mtk_i2c_calculate_speed() looks like a hack.  inter_clk_div is set
again[1] next to the for loop.

[1]: https://elixir.bootlin.com/linux/v5.14-rc1/source/drivers/i2c/busses/i2c-mt65xx.c#L831



I have no domain knowledge of what/how the patch fixes.  But if this
is a standalone fixup patch, suggest separating to an independent
patch.

WARNING: multiple messages have this Message-ID (diff)
From: Tzung-Bi Shih <tzungbi@google.com>
To: Kewei Xu <kewei.xu@mediatek.com>
Cc: wsa@the-dreams.de, matthias.bgg@gmail.com, robh+dt@kernel.org,
	 linux-i2c@vger.kernel.org, devicetree@vger.kernel.org,
	 linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	 linux-mediatek@lists.infradead.org, srv_heupstream@mediatek.com,
	 leilk.liu@mediatek.com, qii.wang@mediatek.com,
	qiangming.xia@mediatek.com,  ot_daolong.zhu@mediatek.com
Subject: Re: [PATCH 8/8] i2c: mediatek: modify bus speed calculation formula
Date: Thu, 15 Jul 2021 15:09:25 +0800	[thread overview]
Message-ID: <CA+Px+wWNcSkxvsEoUrgBN73+jhq8qjFJodYjQnY1zW2d0a5yRA@mail.gmail.com> (raw)
In-Reply-To: <1626316157-24935-9-git-send-email-kewei.xu@mediatek.com>

On Thu, Jul 15, 2021 at 10:32 AM Kewei Xu <kewei.xu@mediatek.com> wrote:
> When clock-div is 0 or greater than 1, the bus speed
> calculated by the old speed calculation formula will be
> larger than the target speed. So we update the formula.
The patch sounds like a fix up.  Need a "Fixes" tag.

>         for (clk_div = 1; clk_div <= max_clk_div; clk_div++) {
>                 clk_src = parent_clk / clk_div;
> +               i2c->ac_timing.inter_clk_div = clk_div - 1;
Using the way to pass the parameter "inter_clk_div" to
mtk_i2c_calculate_speed() looks like a hack.  inter_clk_div is set
again[1] next to the for loop.

[1]: https://elixir.bootlin.com/linux/v5.14-rc1/source/drivers/i2c/busses/i2c-mt65xx.c#L831



I have no domain knowledge of what/how the patch fixes.  But if this
is a standalone fixup patch, suggest separating to an independent
patch.

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID (diff)
From: Tzung-Bi Shih <tzungbi@google.com>
To: Kewei Xu <kewei.xu@mediatek.com>
Cc: wsa@the-dreams.de, matthias.bgg@gmail.com, robh+dt@kernel.org,
	 linux-i2c@vger.kernel.org, devicetree@vger.kernel.org,
	 linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	 linux-mediatek@lists.infradead.org, srv_heupstream@mediatek.com,
	 leilk.liu@mediatek.com, qii.wang@mediatek.com,
	qiangming.xia@mediatek.com,  ot_daolong.zhu@mediatek.com
Subject: Re: [PATCH 8/8] i2c: mediatek: modify bus speed calculation formula
Date: Thu, 15 Jul 2021 15:09:25 +0800	[thread overview]
Message-ID: <CA+Px+wWNcSkxvsEoUrgBN73+jhq8qjFJodYjQnY1zW2d0a5yRA@mail.gmail.com> (raw)
In-Reply-To: <1626316157-24935-9-git-send-email-kewei.xu@mediatek.com>

On Thu, Jul 15, 2021 at 10:32 AM Kewei Xu <kewei.xu@mediatek.com> wrote:
> When clock-div is 0 or greater than 1, the bus speed
> calculated by the old speed calculation formula will be
> larger than the target speed. So we update the formula.
The patch sounds like a fix up.  Need a "Fixes" tag.

>         for (clk_div = 1; clk_div <= max_clk_div; clk_div++) {
>                 clk_src = parent_clk / clk_div;
> +               i2c->ac_timing.inter_clk_div = clk_div - 1;
Using the way to pass the parameter "inter_clk_div" to
mtk_i2c_calculate_speed() looks like a hack.  inter_clk_div is set
again[1] next to the for loop.

[1]: https://elixir.bootlin.com/linux/v5.14-rc1/source/drivers/i2c/busses/i2c-mt65xx.c#L831



I have no domain knowledge of what/how the patch fixes.  But if this
is a standalone fixup patch, suggest separating to an independent
patch.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-07-15  7:09 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-15  2:29 [PATCH 0/8] Due to changes in hardware design, add patch to Kewei Xu
2021-07-15  2:29 ` Kewei Xu
2021-07-15  2:29 ` Kewei Xu
2021-07-15  2:29 ` [PATCH 1/8] dt-bindings: i2c: update bindings for MT8195 SoC Kewei Xu
2021-07-15  2:29   ` Kewei Xu
2021-07-15  2:29   ` Kewei Xu
2021-07-15  4:09   ` Chen-Yu Tsai
2021-07-15  4:09     ` Chen-Yu Tsai
2021-07-15  4:09     ` Chen-Yu Tsai
2021-07-15  2:29 ` [PATCH 2/8] i2c: mediatek: Dump i2c/dma register when a timeout occurs Kewei Xu
2021-07-15  2:29   ` Kewei Xu
2021-07-15  2:29   ` Kewei Xu
2021-07-15  6:21   ` Chen-Yu Tsai
2021-07-15  6:21     ` Chen-Yu Tsai
2021-07-15  6:21     ` Chen-Yu Tsai
2021-07-15  2:29 ` [PATCH 3/8] i2c: mediatek: fixing the incorrect register offset Kewei Xu
2021-07-15  2:29   ` Kewei Xu
2021-07-15  2:29   ` Kewei Xu
2021-07-15  5:23   ` Chen-Yu Tsai
2021-07-15  5:23     ` Chen-Yu Tsai
2021-07-15  5:23     ` Chen-Yu Tsai
2021-07-16  9:09     ` Kewei Xu
2021-07-16  9:09       ` Kewei Xu
2021-07-16  9:09       ` Kewei Xu
2021-07-15  2:29 ` [PATCH 4/8] i2c: mediatek: Reset the handshake signal between i2c and dma Kewei Xu
2021-07-15  2:29   ` Kewei Xu
2021-07-15  2:29   ` Kewei Xu
2021-07-15  2:29 ` [PATCH 5/8] i2c: mediatek: Add OFFSET_EXT_CONF setting back Kewei Xu
2021-07-15  2:29   ` Kewei Xu
2021-07-15  2:29   ` Kewei Xu
2021-07-15  2:29 ` [PATCH 6/8] dt-bindings: i2c: add attribute default-timing-adjust Kewei Xu
2021-07-15  2:29   ` Kewei Xu
2021-07-15  2:29   ` Kewei Xu
2021-07-15  2:29 ` [PATCH 7/8] i2c: mediatek: Isolate speed setting via dts for special devices Kewei Xu
2021-07-15  2:29   ` Kewei Xu
2021-07-15  2:29   ` Kewei Xu
2021-07-15  2:29 ` [PATCH 8/8] i2c: mediatek: modify bus speed calculation formula Kewei Xu
2021-07-15  2:29   ` Kewei Xu
2021-07-15  2:29   ` Kewei Xu
2021-07-15  7:09   ` Tzung-Bi Shih [this message]
2021-07-15  7:09     ` Tzung-Bi Shih
2021-07-15  7:09     ` Tzung-Bi Shih
2021-07-16  9:53     ` Kewei Xu
2021-07-16  9:53       ` Kewei Xu
2021-07-16  9:53       ` Kewei Xu
2021-07-15  3:03 ` [PATCH 0/8] Due to changes in hardware design, add patch to Chen-Yu Tsai
2021-07-15  3:03   ` Chen-Yu Tsai
2021-07-15  3:03   ` Chen-Yu Tsai
2021-07-17  9:05   ` Kewei Xu
2021-07-17  9:05     ` Kewei Xu
2021-07-17  9:05     ` Kewei Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+Px+wWNcSkxvsEoUrgBN73+jhq8qjFJodYjQnY1zW2d0a5yRA@mail.gmail.com \
    --to=tzungbi@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=kewei.xu@mediatek.com \
    --cc=leilk.liu@mediatek.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=ot_daolong.zhu@mediatek.com \
    --cc=qiangming.xia@mediatek.com \
    --cc=qii.wang@mediatek.com \
    --cc=robh+dt@kernel.org \
    --cc=srv_heupstream@mediatek.com \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.