Re: [PATCH] ASoC: cs35l56: Share common SoundWire interrupt enable/disable code

From: Mark Brown

Date: Thu May 28 2026 - 13:56:16 EST


On Thu, May 28, 2026 at 03:58:27PM +0100, Richard Fitzgerald wrote:
> Move the duplicated SoundWire interrupt enable/disable code into shared
> functions. These functions must be in cs35l56-shared module to prevent
> circular dependency between cs35l56.c and cs35l56-sdw.c

> #include "cs35l56.h"
>
> +void cs35l56_mask_soundwire_interrupts(struct sdw_slave *peripheral)
> +{
> + /*
> + * The read of GEN_INT_STAT_1 is required as per the SoundWire spec
> + * for interrupt status bits to clear.
> + * GEN_INT_MASK_1 masks the _inputs_ to GEN_INT_STAT1.
> + */
> + sdw_write_no_pm(peripheral, CS35L56_SDW_GEN_INT_MASK_1, 0);
> + sdw_read_no_pm(peripheral, CS35L56_SDW_GEN_INT_STAT_1);
> + sdw_write_no_pm(peripheral, CS35L56_SDW_GEN_INT_STAT_1, 0xFF);
> +}
> +EXPORT_SYMBOL_NS_GPL(cs35l56_mask_soundwire_interrupts, "SND_SOC_CS35L56_SHARED");
> +

This adds SoundWire usage to cs35l56-shared.c - we either need ifdefs
for the !SOUNDWIRE case or more dependencies in Kconfig. I guess the
former?

Attachment: signature.asc
Description: PGP signature