From: "Arnd Bergmann" <arnd@arndb.de>
To: "Jerome Brunet" <jbrunet@baylibre.com>
Cc: "Neil Armstrong" <neil.armstrong@linaro.org>,
"Michael Turquette" <mturquette@baylibre.com>,
"Stephen Boyd" <sboyd@kernel.org>,
"Kevin Hilman" <khilman@baylibre.com>,
"Martin Blumenstingl" <martin.blumenstingl@googlemail.com>,
linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, "Mark Brown" <broonie@kernel.org>
Subject: Re: [PATCH] clk: amlogic: axg-audio: select RESET_MESON_AUX
Date: Thu, 28 Nov 2024 15:51:28 +0100 [thread overview]
Message-ID: <c06317c6-b2b2-4b6d-96e4-0c2cfc6846de@app.fastmail.com> (raw)
In-Reply-To: <1jy1131kxz.fsf@starbuckisacylon.baylibre.com>
On Thu, Nov 28, 2024, at 15:39, Jerome Brunet wrote:
> On Thu 28 Nov 2024 at 15:11, "Arnd Bergmann" <arnd@arndb.de> wrote:
>
>>> All clk, pinctrl or regulator are used by other driver yes, this one as
>>> well, sure.
>>>
>>> What special about this on is that it is an auxiliary bus driver.
>>> It is directly instantiated by another driver. That's where
>>> it differs. The axg-audio clock driver instantiate the auxiliary reset,
>>> it does not use it, which is why it makes sense for it to select the
>>> driver.
>>
>> Can you explain the logic behind this design? It seems that the
>> entire problem here is the split into more drivers than it
>> should be. It's common for clk drivers to also act as a
>> reset driver, and my impression here is that you were trying
>> too hard to split out the reset functionality into file
>> in drivers/reset/ rather than to have it in drivers/clk/.
>>
>> Could you perhaps move the contents of
>> drivers/reset/amlogic/reset-meson-aux.c into
>> drivers/clk/meson/axg-audio.c, and change the exported
>> symbol to a static function? This would still require
>> a dependency on the exported meson_reset_toggle_ops,
>> but that feels like a more natural interface here,
>> since it's just a library module.
>
> That's what we originally had. Reset implemented in clock.
> I was specically asked to move the reset part in reset using
> aux drivers.
>
> https://lore.kernel.org/r/e3a85852b911fdf16dd9ae158f42b3ef.sboyd@kernel.org
>
> Eventually that will happen for the rest of the reset implemented
> under drivers/clk/meson.
>
> It allows to make some code common between the platform reset
> drivers and the aux ones. It also ease maintainance for both
> Stephen and Philipp.
I don't understand how this helps: the entire point of using
an auxiliary device is to separate the lifetime rules of
the different bits, but by doing the creation of the device
in the same file as the implementation, you are not taking
advantage of that at all, but instead get the complexity of
a link-time dependency in addition to a lot of extra code
for dealing with the additional device.
Arnd
next prev parent reply other threads:[~2024-11-28 14:51 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-27 18:47 [PATCH] clk: amlogic: axg-audio: select RESET_MESON_AUX Jerome Brunet
2024-11-27 19:00 ` Mark Brown
2024-11-27 19:30 ` Arnd Bergmann
2024-11-27 20:56 ` Jerome Brunet
2024-11-27 21:23 ` Arnd Bergmann
2024-11-28 13:33 ` Jerome Brunet
2024-11-28 14:11 ` Arnd Bergmann
2024-11-28 14:39 ` Jerome Brunet
2024-11-28 14:51 ` Arnd Bergmann [this message]
2024-11-28 15:06 ` Jerome Brunet
2024-11-28 15:34 ` Arnd Bergmann
2024-11-28 15:52 ` Mark Brown
2024-11-28 15:57 ` Arnd Bergmann
2024-11-28 16:02 ` Jerome Brunet
2024-11-28 15:53 ` Jerome Brunet
2024-11-28 17:21 ` Arnd Bergmann
2024-12-03 2:53 ` Stephen Boyd
2024-12-03 11:15 ` Jerome Brunet
2024-12-03 20:15 ` Stephen Boyd
2024-12-03 22:22 ` Mark Brown
2024-12-03 22:32 ` Stephen Boyd
2024-12-03 22:59 ` Mark Brown
2024-12-04 17:19 ` Jerome Brunet
2024-12-04 20:05 ` Stephen Boyd
2024-12-04 20:10 ` Arnd Bergmann
2024-12-03 12:43 ` Arnd Bergmann
2024-12-03 20:21 ` Stephen Boyd
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=c06317c6-b2b2-4b6d-96e4-0c2cfc6846de@app.fastmail.com \
--to=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=mturquette@baylibre.com \
--cc=neil.armstrong@linaro.org \
--cc=sboyd@kernel.org \
/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