soundwire: Intel: only handle alert events during suspended#5793
soundwire: Intel: only handle alert events during suspended#5793bardliao wants to merge 2 commits into
Conversation
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>
There was a problem hiding this comment.
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_masktostruct sdw_cdnsand initialize it to the full slave mask insdw_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_MASKdefines fromcadence_master.ctocadence_master.h. - In
intel_auxdevice.c, setperipheral_int_masktoCDNS_MCP_INT_SLAVE_ALERTon suspend/runtime suspend and back toCDNS_MCP_INT_SLAVE_MASKon 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.
Currently we handle all peripheral interrupts during suspended. But only alert events should be handled.