From: phucduc.bui@gmail.com
To: Mark Brown <broonie@kernel.org>,
Claudiu Beznea <claudiu.beznea@tuxon.dev>,
Andrei Simion <andrei.simion@microchip.com>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Codrin Ciubotariu <codrin.ciubotariu@microchip.com>,
linux-sound@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
bui duc phuc <phucduc.bui@gmail.com>
Subject: [PATCH v2 2/2] ASoC: atmel: mchp-spdiftx: Mark interrupt registers as volatile
Date: Fri, 20 Nov 2026 17:46:30 +0700 [thread overview]
Message-ID: <20261120104630.10240-3-phucduc.bui@gmail.com> (raw)
In-Reply-To: <20261120104630.10240-1-phucduc.bui@gmail.com>
From: bui duc phuc <phucduc.bui@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@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
prev parent reply other threads:[~2026-11-20 10:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 10:46 [PATCH v2 0/2] ASoC: atmel: Mark interrupt registers as volatile phucduc.bui
2026-11-20 10:46 ` [PATCH v2 1/2] ASoC: atmel: mchp-pdmc: Mark IMR " phucduc.bui
2026-11-20 10:46 ` phucduc.bui [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261120104630.10240-3-phucduc.bui@gmail.com \
--to=phucduc.bui@gmail.com \
--cc=alexandre.belloni@bootlin.com \
--cc=andrei.simion@microchip.com \
--cc=broonie@kernel.org \
--cc=claudiu.beznea@tuxon.dev \
--cc=codrin.ciubotariu@microchip.com \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=nicolas.ferre@microchip.com \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox