linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Yassine Oudjana <yassine.oudjana@gmail.com>
To: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Cc: "Michael Turquette" <mturquette@baylibre.com>,
	"Stephen Boyd" <sboyd@kernel.org>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"Philipp Zabel" <p.zabel@pengutronix.de>,
	"Yassine Oudjana" <y.oudjana@protonmail.com>,
	"Chen-Yu Tsai" <wenst@chromium.org>,
	"Miles Chen" <miles.chen@mediatek.com>,
	"Chun-Jie Chen" <chun-jie.chen@mediatek.com>,
	"José Expósito" <jose.exposito89@gmail.com>,
	"Rex-BC Chen" <rex-bc.chen@mediatek.com>,
	linux-mediatek@lists.infradead.org, linux-clk@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	~postmarketos/upstreaming@lists.sr.ht
Subject: Re: [PATCH 3/6] clk: mediatek: reset: Return reset data pointer on register
Date: Fri, 20 May 2022 13:41:33 +0400	[thread overview]
Message-ID: <9LD6CR.FM55IKDYS0IC2@gmail.com> (raw)
In-Reply-To: <5b5f6656-8694-dc78-ef42-7ce301849aa4@collabora.com>


On Fri, May 20 2022 at 10:42:40 +0200, AngeloGioacchino Del Regno 
<angelogioacchino.delregno@collabora.com> wrote:
> 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.

I've tried to make small (but hopefully not too small) steps with
little improvements. Originally in MT6735 clock drivers v1, I only
added reset controller unregister, and while rebasing on Rex-BC's
reset cleanup series I found mtk_clk_simple_probe/remove while
looking for references to mtk_register_reset_controller, so
I thought of using it for my drivers resulting in this series
adding support for the extra 4 clock types. I started finding
other things that could be improved such as the other clock types
not having register_*_with_dev(), but I had to avoid adding
anything else since that would only make me find more things to
improve and this series would've never been finished and sent.

With that said, if these patches could become an obstacle for
later more complete reworks, then by all means drop them.

> 
> Making sure that I don't get misunderstood:
>      I'm not implying that this huge migration work is on your 
> shoulders!
> 

Of course. I would never be able to handle such a large task.
Everyone currently helping with modernizing this common clock
framework has my full respect. You are doing amazing work.

Thanks,
Yassine




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

  parent reply	other threads:[~2022-05-20 11:02 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
2022-05-20  9:41     ` Yassine Oudjana [this message]
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=9LD6CR.FM55IKDYS0IC2@gmail.com \
    --to=yassine.oudjana@gmail.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=miles.chen@mediatek.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=~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;
as well as URLs for NNTP newsgroup(s).