Skip to content

soundwire: Intel: only handle alert events during suspended#5793

Draft
bardliao wants to merge 2 commits into
thesofproject:topic/sof-devfrom
bardliao:only-handle-alert-in-suspend
Draft

soundwire: Intel: only handle alert events during suspended#5793
bardliao wants to merge 2 commits into
thesofproject:topic/sof-devfrom
bardliao:only-handle-alert-in-suspend

Conversation

@bardliao
Copy link
Copy Markdown
Collaborator

Currently we handle all peripheral interrupts during suspended. But only alert events should be handled.

bardliao added 2 commits May 28, 2026 21:43
Currently we always enable all peripheral interrupts mask when enabling
the peripheral interrupts. But we only want to handle the alert
interrupt in runtime suspended. The peripheral_int_mask variable will be
handled in the follow up commit.
No function change in this commit.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Only alert events should be handled during suspended.

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

Copilot AI left a comment

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 restricts the SoundWire peripheral interrupts that are unmasked while the controller is runtime/system-suspended. Previously all slave interrupt sources (attach/detach/alert/reserved) remained unmasked, but only ALERT events are meaningful while suspended. A new peripheral_int_mask field on struct sdw_cdns is introduced and toggled between CDNS_MCP_INT_SLAVE_ALERT (suspend) and CDNS_MCP_INT_SLAVE_MASK (resume/probe). The slave bit defines are also moved to the header so the Intel auxdevice can reference them.

Changes:

  • Add peripheral_int_mask to struct sdw_cdns and initialize it to the full slave mask in sdw_cdns_probe(); use it where slave interrupts are unmasked (cdns_update_slave_status_work, cdns_enable_slave_interrupts, sdw_cdns_enable_interrupt).
  • Move CDNS_MCP_INT_SLAVE_* / CDNS_MCP_INT_SLAVE_MASK defines from cadence_master.c to cadence_master.h.
  • In intel_auxdevice.c, set peripheral_int_mask to CDNS_MCP_INT_SLAVE_ALERT on suspend/runtime suspend and back to CDNS_MCP_INT_SLAVE_MASK on resume/runtime resume.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
drivers/soundwire/cadence_master.h Adds slave INT bit defines (moved from .c) and the new peripheral_int_mask field with kerneldoc entry.
drivers/soundwire/cadence_master.c Removes duplicate defines, initializes peripheral_int_mask at probe, and substitutes it for CDNS_MCP_INT_SLAVE_MASK in unmask paths.
drivers/soundwire/intel_auxdevice.c Toggles peripheral_int_mask between ALERT-only on suspend paths and the full mask on resume paths.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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