Re: [PATCH v15 2/4] ASoC: tac5xx2-sdw: add soundwire based codec driver
From: Mark Brown
Date: Mon May 04 2026 - 09:56:31 EST
On Mon, May 04, 2026 at 06:27:14PM +0530, Niranjan H Y wrote:
> Add codec driver for tac5xx2 family of devices.
> +static s32 tac5xx2_sdca_dev_resume(struct device *dev)
> +{
> + struct tac5xx2_prv *tac_dev = dev_get_drvdata(dev);
> + struct sdw_slave *slave = dev_to_sdw_dev(dev);
> + unsigned long t;
> + int ret;
> +
> + /* Detect and set jack type for UAJ path before playback.
> + * This is required as jack detection does not trigger interrupt
> + * when device is in runtime_pm suspend with bus in clock stop mode.
> + */
> + if (tac_has_uaj_support(tac_dev))
> + tac5xx2_sdca_headset_detect(tac_dev);
> +
> +regmap_sync:
> + regcache_cache_only(tac_dev->regmap, false);
> + regcache_mark_dirty(tac_dev->regmap);
> + ret = regcache_sync(tac_dev->regmap);
> + if (ret < 0)
> + dev_warn(dev, "Failed to sync regcache: %d\n", ret);
We do the jack detect before we reinitialise the registers, meaning the
device is still in cache only mode and volatile reads will all return
-EBUSY.
Attachment:
signature.asc
Description: PGP signature