Skip to content

SoundWire: Perform clock stop in system suspend - #5875

Open
bardliao wants to merge 3 commits into
thesofproject:topic/sof-devfrom
bardliao:sdw_clk_stop
Open

SoundWire: Perform clock stop in system suspend#5875
bardliao wants to merge 3 commits into
thesofproject:topic/sof-devfrom
bardliao:sdw_clk_stop

Conversation

@bardliao

Copy link
Copy Markdown
Collaborator

To get lower power consumption when the Peripheral supports clock stop mode 1. And we keep the bus unwakeable because there is no need to wake up the bus in system suspend.

Will add a wake_enable paramter to bus_clock ops first.

This reverts commit cce6989.
Currently, we assume the bus is wakeable when the bus clock stops. But
in some case like system suspend, we want to stop the bus but keep the
bus unwakeable.
No function change in this commit.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Perform clock stop with proper mode so that the Peripherals can enter
the deserved power state. And keep the bus unwakeable because there is
no need to wake up the bus in system suspend.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Intel SoundWire suspend flow to explicitly control whether in-band wake is enabled when stopping the bus, with the goal of reducing power by performing clock stop during system suspend and keeping the bus unwakeable in that state.

Changes:

  • Extends the Intel SoundWire stop_bus hardware op and wrapper APIs to include a wake_enable parameter.
  • Updates intel_stop_bus() and suspend/runtime-suspend call sites to pass an explicit wake policy (wake disabled for system suspend; enabled for runtime clock-stop path).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
include/linux/soundwire/sdw_intel.h Extends the stop_bus hw op signature with wake_enable.
drivers/soundwire/intel.h Updates inline wrapper and prototype for sdw_intel_stop_bus()/intel_stop_bus().
drivers/soundwire/intel_bus_common.c Updates intel_stop_bus() signature and removes implicit wake-enable derivation.
drivers/soundwire/intel_auxdevice.c Updates suspend/runtime-suspend call sites to pass explicit wake_enable values.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 213 to 217
if (clock_stop) {
ret = sdw_cdns_clock_stop(cdns, true);
if (ret < 0)
dev_err(dev, "%s: cannot stop clock: %d\n", __func__, ret);
else
wake_enable = true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants