From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Cc: Richard Fitzgerald <rf@opensource.cirrus.com>, <vkoul@kernel.org>,
<peter.ujfalusi@linux.intel.com>,
<yung-chuan.liao@linux.intel.com>, <sanyog.r.kale@intel.com>,
<linux-sound@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<patches@opensource.cirrus.com>
Subject: Re: [PATCH] soundwire: intel_auxdevice: Don't disable IRQs before removing children
Date: Wed, 18 Dec 2024 09:51:12 +0000 [thread overview]
Message-ID: <Z2KbELGGjeH3NQdY@opensource.cirrus.com> (raw)
In-Reply-To: <e6dd9fc3-de55-47d2-a1b5-10884418a66d@linux.dev>
On Tue, Dec 17, 2024 at 05:49:17PM -0600, Pierre-Louis Bossart wrote:
> On 12/17/24 4:49 AM, Richard Fitzgerald wrote:
> > On 16/12/2024 5:35 pm, Pierre-Louis Bossart wrote:
> >> On 12/12/24 5:02 AM, Charles Keepax wrote:
> > For example, if the bus driver module is unloaded, the kernel will call
> > remove() on all the child drivers. The bus should remain functional
> > while the child drivers deal with this unexpected unload. This could
> > for example be writing some registers to put the peripheral into a
> > low-power state. On ACPI systems the drivers don't have control of
> > regulators so can't just pull power from the peripheral.
>
> Answering to the two replies at once:
>
> If the bus driver is unloaded, then the SoundWire clock will stop
> toggling. That's a rather large piece of information for the device
> to change states -
The clock should only stop toggling after the drivers have been
removed, anything else is a bug.
> I am pretty sure the SDCA spec even mandates that
> the state changes to at least PS_2.
This code applies to more than just SDCA devices.
> But to some extent one could argue that a remove() should be more
> aggressive than a suspend() and the driver could use PS_4 as the
> lower power state - there is no real requirement to restart
> interaction with the device with a simple procedure.
>
Not really sure I follow this bit, none of this has anything to do
with when one restarts interacting with the device. It is about
leaving the device in a nice state when you stop interacting with
it.
> The other problem I have with the notion of 'link_lock' is that
> we already have a notion of 'bus_lock'. And in everything we did so
> far the terms manager, link and bus are interoperable. So adding a
> new concept that looks very similar to the existing one shouldn't
> be done with an explanation of what lock is used for what.
I don't see much confusion here, the two locks are at different
levels in the stack. If is fairly normal for a framework to have
a lock and drivers to have individual locks under that. And the
comment with the lock states it is protecting the list.
That said I am not attached to this way of solving the problem
either, all I am attached to is allowing devices to communicate in
their remove functions. I think perhaps the important questions
here are do you object to my assertion that a device should be
able to communicate in its remove function? Or do you object to
the way I have solved that problem? I am certainly open to other
solutions, if you have any suggestions?
Thanks,
Charles
next prev parent reply other threads:[~2024-12-18 9:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-12 11:02 [PATCH] soundwire: intel_auxdevice: Don't disable IRQs before removing children Charles Keepax
2024-12-16 17:35 ` Pierre-Louis Bossart
2024-12-17 10:24 ` Charles Keepax
2024-12-17 10:49 ` Richard Fitzgerald
2024-12-17 23:49 ` Pierre-Louis Bossart
2024-12-18 9:51 ` Charles Keepax [this message]
2024-12-18 20:45 ` Pierre-Louis Bossart
2024-12-18 21:40 ` Pierre-Louis Bossart
2024-12-19 10:27 ` Charles Keepax
2024-12-20 17:59 ` Charles Keepax
2025-01-02 22:14 ` Pierre-Louis Bossart
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=Z2KbELGGjeH3NQdY@opensource.cirrus.com \
--to=ckeepax@opensource.cirrus.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=peter.ujfalusi@linux.intel.com \
--cc=pierre-louis.bossart@linux.dev \
--cc=rf@opensource.cirrus.com \
--cc=sanyog.r.kale@intel.com \
--cc=vkoul@kernel.org \
--cc=yung-chuan.liao@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox