All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chen-Yu Tsai <wenst@chromium.org>
To: Rex-BC Chen <rex-bc.chen@mediatek.com>
Cc: mturquette@baylibre.com, sboyd@kernel.org,
	matthias.bgg@gmail.com, p.zabel@pengutronix.de,
	angelogioacchino.delregno@collabora.com,
	chun-jie.chen@mediatek.com, yong.liang@mediatek.com,
	runyang.chen@mediatek.com, linux-kernel@vger.kernel.org,
	allen-kh.cheng@mediatek.com, linux-clk@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org,
	Project_Global_Chrome_Upstream_Group@mediatek.com
Subject: Re: [PATCH 2/7] clk: mediatek: reset: Rename reset function
Date: Tue, 19 Apr 2022 13:57:35 +0800	[thread overview]
Message-ID: <CAGXv+5F027EsJCG4zQarcoqCR8S4tew1n1DjeqU7_+HOzmZs2Q@mail.gmail.com> (raw)
In-Reply-To: <20220418132154.7401-3-rex-bc.chen@mediatek.com>

On Mon, Apr 18, 2022 at 9:22 PM Rex-BC Chen <rex-bc.chen@mediatek.com> wrote:
>
> There are two version for clock reset register control of MediaTek SoCs.
> Since MT8183, the version 2 is adopted.
>
> To make the driver more readable,
> - Rename them to v2 for MT8183 and v1 for previous SoCs.
> - Adjust the fuinction order in reset.c.

I'm not sure that the renaming actually helps, since it is not given that
people outside of MediaTek would know which chip use which version. The
original name of "_set_clr" at least relays how the hardware works, which
coupled with the register naming in the datasheets make it quite obvious
if the hardware is using the "set/clr" variant.

On a different note, the v1 hardware, where a hardware bit represents the
state, is quite common, and there is a common reset driver that handles it.
Perhaps that could be reused instead of code duplicated?
See drivers/reset/reset-simple.c.


Thanks
ChenYu

WARNING: multiple messages have this Message-ID (diff)
From: Chen-Yu Tsai <wenst@chromium.org>
To: Rex-BC Chen <rex-bc.chen@mediatek.com>
Cc: mturquette@baylibre.com, sboyd@kernel.org,
	matthias.bgg@gmail.com,  p.zabel@pengutronix.de,
	angelogioacchino.delregno@collabora.com,
	 chun-jie.chen@mediatek.com, yong.liang@mediatek.com,
	 runyang.chen@mediatek.com, linux-kernel@vger.kernel.org,
	 allen-kh.cheng@mediatek.com, linux-clk@vger.kernel.org,
	 linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org,
	 Project_Global_Chrome_Upstream_Group@mediatek.com
Subject: Re: [PATCH 2/7] clk: mediatek: reset: Rename reset function
Date: Tue, 19 Apr 2022 13:57:35 +0800	[thread overview]
Message-ID: <CAGXv+5F027EsJCG4zQarcoqCR8S4tew1n1DjeqU7_+HOzmZs2Q@mail.gmail.com> (raw)
In-Reply-To: <20220418132154.7401-3-rex-bc.chen@mediatek.com>

On Mon, Apr 18, 2022 at 9:22 PM Rex-BC Chen <rex-bc.chen@mediatek.com> wrote:
>
> There are two version for clock reset register control of MediaTek SoCs.
> Since MT8183, the version 2 is adopted.
>
> To make the driver more readable,
> - Rename them to v2 for MT8183 and v1 for previous SoCs.
> - Adjust the fuinction order in reset.c.

I'm not sure that the renaming actually helps, since it is not given that
people outside of MediaTek would know which chip use which version. The
original name of "_set_clr" at least relays how the hardware works, which
coupled with the register naming in the datasheets make it quite obvious
if the hardware is using the "set/clr" variant.

On a different note, the v1 hardware, where a hardware bit represents the
state, is quite common, and there is a common reset driver that handles it.
Perhaps that could be reused instead of code duplicated?
See drivers/reset/reset-simple.c.


Thanks
ChenYu

_______________________________________________
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: Chen-Yu Tsai <wenst@chromium.org>
To: Rex-BC Chen <rex-bc.chen@mediatek.com>
Cc: mturquette@baylibre.com, sboyd@kernel.org,
	matthias.bgg@gmail.com,  p.zabel@pengutronix.de,
	angelogioacchino.delregno@collabora.com,
	 chun-jie.chen@mediatek.com, yong.liang@mediatek.com,
	 runyang.chen@mediatek.com, linux-kernel@vger.kernel.org,
	 allen-kh.cheng@mediatek.com, linux-clk@vger.kernel.org,
	 linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org,
	 Project_Global_Chrome_Upstream_Group@mediatek.com
Subject: Re: [PATCH 2/7] clk: mediatek: reset: Rename reset function
Date: Tue, 19 Apr 2022 13:57:35 +0800	[thread overview]
Message-ID: <CAGXv+5F027EsJCG4zQarcoqCR8S4tew1n1DjeqU7_+HOzmZs2Q@mail.gmail.com> (raw)
In-Reply-To: <20220418132154.7401-3-rex-bc.chen@mediatek.com>

On Mon, Apr 18, 2022 at 9:22 PM Rex-BC Chen <rex-bc.chen@mediatek.com> wrote:
>
> There are two version for clock reset register control of MediaTek SoCs.
> Since MT8183, the version 2 is adopted.
>
> To make the driver more readable,
> - Rename them to v2 for MT8183 and v1 for previous SoCs.
> - Adjust the fuinction order in reset.c.

I'm not sure that the renaming actually helps, since it is not given that
people outside of MediaTek would know which chip use which version. The
original name of "_set_clr" at least relays how the hardware works, which
coupled with the register naming in the datasheets make it quite obvious
if the hardware is using the "set/clr" variant.

On a different note, the v1 hardware, where a hardware bit represents the
state, is quite common, and there is a common reset driver that handles it.
Perhaps that could be reused instead of code duplicated?
See drivers/reset/reset-simple.c.


Thanks
ChenYu

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

  reply	other threads:[~2022-04-19  5:57 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-18 13:21 [PATCH 0/7] Cleanup MediaTek clk reset drivers Rex-BC Chen
2022-04-18 13:21 ` Rex-BC Chen
2022-04-18 13:21 ` Rex-BC Chen
2022-04-18 13:21 ` [PATCH 1/7] clk: mediatek: reset: Correct the logic of setting register Rex-BC Chen
2022-04-18 13:21   ` Rex-BC Chen
2022-04-18 13:21   ` Rex-BC Chen
2022-04-19  5:48   ` Chen-Yu Tsai
2022-04-19  5:48     ` Chen-Yu Tsai
2022-04-19  5:48     ` Chen-Yu Tsai
2022-04-19  6:38     ` Rex-BC Chen
2022-04-19  6:38       ` Rex-BC Chen
2022-04-19  6:38       ` Rex-BC Chen
2022-04-18 13:21 ` [PATCH 2/7] clk: mediatek: reset: Rename reset function Rex-BC Chen
2022-04-18 13:21   ` Rex-BC Chen
2022-04-18 13:21   ` Rex-BC Chen
2022-04-19  5:57   ` Chen-Yu Tsai [this message]
2022-04-19  5:57     ` Chen-Yu Tsai
2022-04-19  5:57     ` Chen-Yu Tsai
2022-04-19  6:37     ` Rex-BC Chen
2022-04-19  6:37       ` Rex-BC Chen
2022-04-19  6:37       ` Rex-BC Chen
2022-04-19  6:59       ` Chen-Yu Tsai
2022-04-19  6:59         ` Chen-Yu Tsai
2022-04-19  6:59         ` Chen-Yu Tsai
2022-04-18 13:21 ` [PATCH 3/7] clk: mediatek: reset: Merge and revise reset register function Rex-BC Chen
2022-04-18 13:21   ` Rex-BC Chen
2022-04-18 13:21   ` Rex-BC Chen
2022-04-19  7:26   ` Chen-Yu Tsai
2022-04-19  7:26     ` Chen-Yu Tsai
2022-04-19  7:26     ` Chen-Yu Tsai
2022-04-19  8:15     ` Rex-BC Chen
2022-04-19  8:15       ` Rex-BC Chen
2022-04-19  8:15       ` Rex-BC Chen
2022-04-18 13:21 ` [PATCH 4/7] clk: mediatek: reset: Add reset.h Rex-BC Chen
2022-04-18 13:21   ` Rex-BC Chen
2022-04-18 13:21   ` Rex-BC Chen
2022-04-19 10:46   ` AngeloGioacchino Del Regno
2022-04-19 10:46     ` AngeloGioacchino Del Regno
2022-04-19 10:46     ` AngeloGioacchino Del Regno
2022-04-20  2:16     ` Rex-BC Chen
2022-04-20  2:16       ` Rex-BC Chen
2022-04-20  2:16       ` Rex-BC Chen
2022-04-18 13:21 ` [PATCH 5/7] clk: mediatek: reset: Revise structure to control reset register Rex-BC Chen
2022-04-18 13:21   ` Rex-BC Chen
2022-04-18 13:21   ` Rex-BC Chen
2022-04-19 10:46   ` AngeloGioacchino Del Regno
2022-04-19 10:46     ` AngeloGioacchino Del Regno
2022-04-19 10:46     ` AngeloGioacchino Del Regno
2022-04-20  2:20     ` Rex-BC Chen
2022-04-20  2:20       ` Rex-BC Chen
2022-04-20  2:20       ` Rex-BC Chen
2022-04-18 13:21 ` [PATCH 6/7] clk: mediatek: reset: Add support for unregister reset controller Rex-BC Chen
2022-04-18 13:21   ` Rex-BC Chen
2022-04-18 13:21   ` Rex-BC Chen
2022-04-18 13:21 ` [PATCH 7/7] clk: mediatek: reset: Add reset support for simple probe/remove Rex-BC Chen
2022-04-18 13:21   ` Rex-BC Chen
2022-04-18 13:21   ` Rex-BC Chen

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=CAGXv+5F027EsJCG4zQarcoqCR8S4tew1n1DjeqU7_+HOzmZs2Q@mail.gmail.com \
    --to=wenst@chromium.org \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=allen-kh.cheng@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=chun-jie.chen@mediatek.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=mturquette@baylibre.com \
    --cc=p.zabel@pengutronix.de \
    --cc=rex-bc.chen@mediatek.com \
    --cc=runyang.chen@mediatek.com \
    --cc=sboyd@kernel.org \
    --cc=yong.liang@mediatek.com \
    /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.