Re: [PATCH 1/2] soundwire: bus: add CLOCK_STOP_MODE1 support back
From: Richard Fitzgerald
Date: Wed Jul 29 2026 - 11:58:13 EST
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@xxxxxxxxxxxxxxx>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@xxxxxxxxxxxxxxx>
<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 .