From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: Yassine Oudjana <yassine.oudjana@gmail.com>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
Philipp Zabel <p.zabel@pengutronix.de>
Cc: "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 10:42:40 +0200 [thread overview]
Message-ID: <5b5f6656-8694-dc78-ef42-7ce301849aa4@collabora.com> (raw)
In-Reply-To: <20220519134728.456643-4-y.oudjana@protonmail.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? :-)
Cheers,
Angelo
next prev parent reply other threads:[~2022-05-20 8:42 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 [this message]
2022-05-20 9:02 ` Chen-Yu Tsai
2022-05-20 9:08 ` Miles Chen
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=5b5f6656-8694-dc78-ef42-7ce301849aa4@collabora.com \
--to=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=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