public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Miles Chen <miles.chen@mediatek.com>
To: <angelogioacchino.delregno@collabora.com>
Cc: <chun-jie.chen@mediatek.com>, <jose.exposito89@gmail.com>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-clk@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-mediatek@lists.infradead.org>, <matthias.bgg@gmail.com>,
	<miles.chen@mediatek.com>, <mturquette@baylibre.com>,
	<p.zabel@pengutronix.de>, <rex-bc.chen@mediatek.com>,
	<sboyd@kernel.org>, <wenst@chromium.org>,
	<y.oudjana@protonmail.com>, <yassine.oudjana@gmail.com>,
	<~postmarketos/upstreaming@lists.sr.ht>
Subject: Re: [PATCH 3/6] clk: mediatek: reset: Return reset data pointer on register
Date: Fri, 20 May 2022 17:08:34 +0800	[thread overview]
Message-ID: <20220520090834.28515-1-miles.chen@mediatek.com> (raw)
In-Reply-To: <5b5f6656-8694-dc78-ef42-7ce301849aa4@collabora.com>

> Il 19/05/22 15:47, Yassine Oudjana ha scritto:
> > From: Yassine Oudjana <y.oudjana@protonmail.com>
> > 
> > Return a struct mtk_clk_rst_data * when registering a reset
> > controller in preparation for adding an unregister helper
> > that will take it as an argument. Make the necessary changes
> > in drivers that do not currently discard the return value
> > of register functions.
> > 
> > Signed-off-by: Yassine Oudjana <y.oudjana@protonmail.com>
> 
> Hello Yassine,
> 
> Thanks for your efforts on helping to make the MediaTek clocks better - I agree
> (and I'm not the only one..) that there's a lot of work to do on this side.
> 
> Though... I don't think that this is the right direction: you're right about
> properly unregistering (in patch 4/6) the reset controllers on rmmod/failure
> but I'm not sure that this kind of noise brings any benefit.
> 
> Explaining:
> You definitely saw that there's a new register _with_dev, which uses devm ops
> and that's going to automatically cleanup in case of removal/failure.
> This is what we should do.
> 
> Hence, my proposal is to drop patch 3/6, 4/6, 5/6 and (slowly, steadily) migrate
> all of the MediaTek clocks from CLK_OF_DECLARE() to platform drivers (which also
> means that we can eventually change them to tristate!), so that we slowly remove
> all users of all functions that are not "_with_dev", and that we finally remove
> all of these then-unused functions as well.
> 
> Making sure that I don't get misunderstood:
>       I'm not implying that this huge migration work is on your shoulders!
> 
> P.S.: Chen-Yu, Miles: do you also agree? :-)

Agreed. 3/6, 4/6, 5/6 introduce mtk_simple_clk_controller, but we just got
ChenYu's patch merged to clk-next to switch to clk_hw_onecell_data, and
hoplefully we can test them in v5.18 or v5.19.
So I think we should wait for ChenYu's cleanup.

-	struct clk_hw_onecell_data *clk_data;
+	struct mtk_simple_clk_controller *clk_ctrl;

thanks,
Miles

> 
> Cheers,
> Angelo
> 
> 

  parent reply	other threads:[~2022-05-20  9:08 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-19 13:47 [PATCH 0/6] clk: mediatek: Improvements to simple probe/remove and reset controller unregistration Yassine Oudjana
2022-05-19 13:47 ` [PATCH 1/6] clk: mediatek: gate: Export mtk_clk_register_gates_with_dev Yassine Oudjana
2022-05-20  4:52   ` Chen-Yu Tsai
2022-05-20  8:31   ` AngeloGioacchino Del Regno
2022-05-19 13:47 ` [PATCH 2/6] clk: mediatek: Use mtk_clk_register_gates_with_dev in simple probe Yassine Oudjana
2022-05-20  4:49   ` Chen-Yu Tsai
2022-05-20  4:52     ` Chen-Yu Tsai
2022-05-20  8:31   ` AngeloGioacchino Del Regno
2022-05-19 13:47 ` [PATCH 3/6] clk: mediatek: reset: Return reset data pointer on register Yassine Oudjana
2022-05-20  5:56   ` Rex-BC Chen
2022-05-20  8:42   ` AngeloGioacchino Del Regno
2022-05-20  9:02     ` Chen-Yu Tsai
2022-05-20  9:08     ` Miles Chen [this message]
2022-05-20  9:41     ` Yassine Oudjana
2022-05-19 13:47 ` [PATCH 4/6] clk: mediatek: reset: Implement mtk_unregister_reset_controller() API Yassine Oudjana
2022-05-19 13:47 ` [PATCH 5/6] clk: mediatek: Unregister reset controller on simple remove Yassine Oudjana
2022-05-19 13:47 ` [PATCH 6/6] clk: mediatek: Add support for other clock types in simple probe/remove Yassine Oudjana
2022-05-20  9:13   ` Chen-Yu Tsai
2022-05-19 14:03 ` [PATCH 0/6] clk: mediatek: Improvements to simple probe/remove and reset controller unregistration Yassine Oudjana

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=20220520090834.28515-1-miles.chen@mediatek.com \
    --to=miles.chen@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=chun-jie.chen@mediatek.com \
    --cc=jose.exposito89@gmail.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=sboyd@kernel.org \
    --cc=wenst@chromium.org \
    --cc=y.oudjana@protonmail.com \
    --cc=yassine.oudjana@gmail.com \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox