mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Richard Fitzgerald <rf@opensource.cirrus.com>
To: Bard Liao <yung-chuan.liao@linux.intel.com>,
	linux-sound@vger.kernel.org, vkoul@kernel.org
Cc: vinod.koul@linaro.org, linux-kernel@vger.kernel.org,
	pierre-louis.bossart@linux.dev, peter.ujfalusi@linux.intel.com,
	bard.liao@intel.com
Subject: Re: [PATCH 1/2] soundwire: bus: add CLOCK_STOP_MODE1 support back
Date: Wed, 29 Jul 2026 16:39:13 +0100	[thread overview]
Message-ID: <8c3ce954-2dad-40be-ac14-3af6525f74bd@opensource.cirrus.com> (raw)
In-Reply-To: <20260629144450.2096823-2-yung-chuan.liao@linux.intel.com>

On 29/06/2026 3:44 pm, Bard Liao wrote:
> CLOCK_STOP_MODE1 is used when the Peripheral might have entered a deeper
> power-saving mode that does not retain state while the Clock is stopped.
> It is useful when the device is more power consumption sensitive. Add it
> back to allow the Peripheral use CLOCK_STOP_MODE1.
> 
> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>

<SNIP>

> +static enum sdw_clk_stop_mode sdw_get_clk_stop_mode(struct sdw_slave *slave)
> +{
> +	struct device *dev = &slave->dev;
> +	struct sdw_driver *drv = drv_to_sdw_driver(dev->driver);

dev->driver will be NULL if a driver hasn't probed for this peripheral.
It should check slave->probed, like in sdw_slave_clk_stop_callback().

> +
> +	/*
> +	 * Query for clock stop mode if Slave implements
> +	 * ops->get_clk_stop_mode, else read from property.
> +	 */
> +	if (drv->ops && drv->ops->get_clk_stop_mode)
> +		return drv->ops->get_clk_stop_mode(slave);

It should be holding sdw_dev_lock when checking ops and calling
the callback .


  parent reply	other threads:[~2026-07-29 15:39 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-29 14:44 [PATCH 0/2] soundwire: bus: re-enable CLOCK_STOP_MODE1 support Bard Liao
2026-06-29 14:44 ` [PATCH 1/2] soundwire: bus: add CLOCK_STOP_MODE1 support back Bard Liao
2026-06-30  9:42   ` Pierre-Louis Bossart
2026-07-29 15:39   ` Richard Fitzgerald [this message]
2026-06-29 14:44 ` [PATCH 2/2] soundwire: Intel: stop sdw clock in system suspend Bard Liao
2026-06-30  9:33   ` Pierre-Louis Bossart
2026-06-30 10:35     ` Liao, Bard
2026-06-30 10:51       ` Richard Fitzgerald
2026-06-30 12:36         ` Pierre-Louis Bossart
2026-06-30 12:50           ` Richard Fitzgerald
2026-07-01 11:55             ` Pierre-Louis Bossart
2026-07-01 12:00               ` Pierre-Louis Bossart
2026-07-01 12:30                 ` Liao, Bard
2026-07-01 12:36                 ` Richard Fitzgerald
2026-07-01 12:15               ` Richard Fitzgerald
2026-07-01 14:09                 ` Pierre-Louis Bossart
2026-07-01 14:59                   ` Richard Fitzgerald
2026-07-02 10:09                     ` 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=8c3ce954-2dad-40be-ac14-3af6525f74bd@opensource.cirrus.com \
    --to=rf@opensource.cirrus.com \
    --cc=bard.liao@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=peter.ujfalusi@linux.intel.com \
    --cc=pierre-louis.bossart@linux.dev \
    --cc=vinod.koul@linaro.org \
    --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

all inboxes | Powered by JetHome®