Re: [PATCH v4 2/4] ASoC: tac5xx2-sdw: add soundwire based codec driver

Holalu Yogendra, Niranjan
2026-04-06T12:57:47Z

On 18:56-20260403, Mark Brown wrote:
Subject: Re: [PATCH v4 2/4] ASoC: tac5xx2-sdw: add soundwire based codec driver
> On Wed, Apr 01, 2026 at 06:51:46PM +0530, Niranjan H Y wrote:
>
> > +static int tac_interrupt_callback(struct sdw_slave *slave,
> > + struct sdw_slave_intr_status *status)
> > +{
> > + struct tac5xx2_prv *tac_dev = dev_get_drvdata(&slave->dev);
> > + struct device *dev = &slave->dev;
> > + int ret = 0;
> > + int btn_type = 0;
> > + unsigned int sdca_int3;
> > +
>
> > + ret = regmap_read(tac_dev->regmap, SDW_SCP_SDCA_INT3,
> &sdca_int3);
> > + if (ret) {
> > + dev_err(dev, "Failed to read SDCA_INT3: %d", ret);
> > + return ret;
> > + }
>
> Can an interrupt be generated during runtime suspend (or race with
> another thread doing a runtime suspend)?
sdw_handle_slave_alerts in drivers/soundwire/bus.c calls pm_runtime_get_sync before
processing interrupts and only calls pm_runtime_put_autosuspend after the
.interrupt_callback completes. So device should be in resumed state before handling the alerts.

I will add protection here in next version.

Regards
Niranjan