Re: [PATCH 2/2] soundwire: Intel: stop sdw clock in system suspend
From: Pierre-Louis Bossart
Date: Wed Jul 01 2026 - 07:58:47 EST
> If the Manager doesn't send a clock-stop, the peripherals don't get a
> notification that they can enter a lower-power mode. The clock suddenly
> disappears without warning and without the peripherals being notified
> why, so they don't have any information to know what is happening.
that's not quite right, see below.
> The Manager should send a clock-stop notification before stopping the
> clock.
That's exactly the existing logic in drivers/soundwire/bus.c, the core does notify all peripheral drivers of a clock stop transition.
sdw_slave_clk_stop_callback(slave, SDW_CLK_PRE_PREPARE);
sdw_slave_clk_stop_callback(slave, SDW_CLK_POST_PREPARE);
These pre- and post callback that can be used by the peripheral for imp-def actions.
I am not sure if the POST_PREPARE makes sense, since the clock is already stopped the peripheral cannot be programmed. IIRC it was added for symmetry.
The PRE_PREPARE is most likely what you are looking for in the implementation of the drv->ops->clk_stop callback.
Hope this helps!