[PATCH v2 2/2] ASoC: atmel: mchp-spdiftx: Mark interrupt registers as volatile
phucduc.bui at gmail.com
phucduc.bui at gmail.com
Fri Nov 20 02:46:30 PST 2026
From: bui duc phuc <phucduc.bui at gmail.com>
The interrupt handler reads ISR and IMR to determine which interrupts
are pending. Neither register is marked as volatile, causing regmap
to return cached values instead of reading the hardware.
Add a volatile_reg callback marking IMR and ISR as volatile.
Fixes: 4bf54ca60f99 ("ASoC: mchp-spdiftx: add runtime pm support")
Signed-off-by: bui duc phuc <phucduc.bui at gmail.com>
---
Change in v2:
- Update the Fixes tag based on Sashiko's review.
sound/soc/atmel/mchp-spdiftx.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/sound/soc/atmel/mchp-spdiftx.c b/sound/soc/atmel/mchp-spdiftx.c
index 658ff667439c..0406a11caf7d 100644
--- a/sound/soc/atmel/mchp-spdiftx.c
+++ b/sound/soc/atmel/mchp-spdiftx.c
@@ -165,6 +165,17 @@ static bool mchp_spdiftx_precious_reg(struct device *dev, unsigned int reg)
}
}
+static bool mchp_spdiftx_volatile_reg(struct device *dev, unsigned int reg)
+{
+ switch (reg) {
+ case SPDIFTX_IMR:
+ case SPDIFTX_ISR:
+ return true;
+ default:
+ return false;
+ }
+}
+
static const struct regmap_config mchp_spdiftx_regmap_config = {
.reg_bits = 32,
.reg_stride = 4,
@@ -173,6 +184,7 @@ static const struct regmap_config mchp_spdiftx_regmap_config = {
.readable_reg = mchp_spdiftx_readable_reg,
.writeable_reg = mchp_spdiftx_writeable_reg,
.precious_reg = mchp_spdiftx_precious_reg,
+ .volatile_reg = mchp_spdiftx_volatile_reg,
.cache_type = REGCACHE_FLAT,
};
--
2.43.0
More information about the linux-arm-kernel
mailing list