* [PATCH 0/2] ASoC: atmel: Mark interrupt registers as volatile
@ 2026-11-20 10:04 phucduc.bui
2026-11-20 10:04 ` [PATCH 1/2] ASoC: atmel: mchp-pdmc: Mark IMR " phucduc.bui
2026-11-20 10:04 ` [PATCH 2/2] ASoC: atmel: mchp-spdiftx: Mark interrupt registers " phucduc.bui
0 siblings, 2 replies; 8+ messages in thread
From: phucduc.bui @ 2026-11-20 10:04 UTC (permalink / raw)
To: Mark Brown, Claudiu Beznea, Andrei Simion, Nicolas Ferre,
Alexandre Belloni
Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Codrin Ciubotariu,
linux-sound, linux-arm-kernel, linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
Hi all,
This series marks the interrupt mask and status registers as volatile
in the PDMC and SPDIFTX drivers to ensure they are read from hardware.
Compile-tested only.
Best regards,
Phuc
bui duc phuc (2):
ASoC: atmel: mchp-pdmc: Mark IMR as volatile
ASoC: atmel: mchp-spdiftx: Mark interrupt registers as volatile
sound/soc/atmel/mchp-pdmc.c | 1 +
sound/soc/atmel/mchp-spdiftx.c | 12 ++++++++++++
2 files changed, 13 insertions(+)
--
2.43.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] ASoC: atmel: mchp-pdmc: Mark IMR as volatile
2026-11-20 10:04 [PATCH 0/2] ASoC: atmel: Mark interrupt registers as volatile phucduc.bui
@ 2026-11-20 10:04 ` phucduc.bui
2026-11-20 10:16 ` sashiko-bot
2026-11-20 10:04 ` [PATCH 2/2] ASoC: atmel: mchp-spdiftx: Mark interrupt registers " phucduc.bui
1 sibling, 1 reply; 8+ messages in thread
From: phucduc.bui @ 2026-11-20 10:04 UTC (permalink / raw)
To: Mark Brown, Claudiu Beznea, Andrei Simion, Nicolas Ferre,
Alexandre Belloni
Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Codrin Ciubotariu,
linux-sound, linux-arm-kernel, linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
The interrupt handler reads ISR and IMR to determine which interrupts
are pending. While ISR is marked as volatile, IMR is not, causing
regmap to return its cached value instead of reading the hardware.
Add IMR to the volatile registers.
Fixes: c5682e2ba132 ("ASoC: mchp-pdmc: fix poc noise at capture startup")
Fixes: 50291652af52 ("ASoC: atmel: mchp-pdmc: add PDMC driver")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/atmel/mchp-pdmc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/atmel/mchp-pdmc.c b/sound/soc/atmel/mchp-pdmc.c
index 8b55d864f3d5..4b380dc8b6cf 100644
--- a/sound/soc/atmel/mchp-pdmc.c
+++ b/sound/soc/atmel/mchp-pdmc.c
@@ -842,6 +842,7 @@ static bool mchp_pdmc_volatile_reg(struct device *dev, unsigned int reg)
{
switch (reg) {
case MCHP_PDMC_ISR:
+ case MCHP_PDMC_IMR:
case MCHP_PDMC_RHR:
return true;
default:
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] ASoC: atmel: mchp-spdiftx: Mark interrupt registers as volatile
2026-11-20 10:04 [PATCH 0/2] ASoC: atmel: Mark interrupt registers as volatile phucduc.bui
2026-11-20 10:04 ` [PATCH 1/2] ASoC: atmel: mchp-pdmc: Mark IMR " phucduc.bui
@ 2026-11-20 10:04 ` phucduc.bui
2026-11-20 10:10 ` sashiko-bot
1 sibling, 1 reply; 8+ messages in thread
From: phucduc.bui @ 2026-11-20 10:04 UTC (permalink / raw)
To: Mark Brown, Claudiu Beznea, Andrei Simion, Nicolas Ferre,
Alexandre Belloni
Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Codrin Ciubotariu,
linux-sound, linux-arm-kernel, linux-kernel, bui duc phuc
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: 06ca24e98e6b ("ASoC: mchp-spdiftx: add driver for S/PDIF TX Controller")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] ASoC: atmel: mchp-spdiftx: Mark interrupt registers as volatile
2026-11-20 10:04 ` [PATCH 2/2] ASoC: atmel: mchp-spdiftx: Mark interrupt registers " phucduc.bui
@ 2026-11-20 10:10 ` sashiko-bot
2026-11-20 10:22 ` Bui Duc Phuc
0 siblings, 1 reply; 8+ messages in thread
From: sashiko-bot @ 2026-11-20 10:10 UTC (permalink / raw)
To: phucduc.bui; +Cc: linux-sound
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] ASoC: atmel: mchp-spdiftx: inaccurate Fixes trailer
--
commit 8b049b6663dc075bd7b0f48f483d1e20b6fe30c6
Author: bui duc phuc <phucduc.bui@gmail.com>
> ASoC: atmel: mchp-spdiftx: Mark interrupt registers as volatile
>
> 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: 06ca24e98e6b ("ASoC: mchp-spdiftx: add driver for S/PDIF TX Controller")
> Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
[Severity: Low]
In commit 06ca24e98e6b ("ASoC: mchp-spdiftx: add driver for S/PDIF TX
Controller"), mchp_spdiftx_regmap_config left .cache_type unset
(REGCACHE_NONE), so regmap_read() read SPDIFTX_ISR and SPDIFTX_IMR
directly from hardware. Regmap caching was enabled later in commit
4bf54ca60f99 ("ASoC: mchp-spdiftx: add runtime pm support"), which added
.cache_type = REGCACHE_FLAT without a .volatile_reg callback.
Should the Fixes tag reference that commit instead?
Fixes: 4bf54ca60f99 ("ASoC: mchp-spdiftx: add runtime pm support")
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261120100408.8053-1-phucduc.bui@gmail.com?part=2
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] ASoC: atmel: mchp-pdmc: Mark IMR as volatile
2026-11-20 10:04 ` [PATCH 1/2] ASoC: atmel: mchp-pdmc: Mark IMR " phucduc.bui
@ 2026-11-20 10:16 ` sashiko-bot
2026-11-20 10:28 ` Bui Duc Phuc
0 siblings, 1 reply; 8+ messages in thread
From: sashiko-bot @ 2026-11-20 10:16 UTC (permalink / raw)
To: phucduc.bui; +Cc: linux-sound
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] ASoC: atmel: mchp-pdmc: inaccurate Fixes trailer citing
50291652af52
--
commit 2524e29a52dc348922861fcb11ff3299de1fc52e
Author: bui duc phuc <phucduc.bui@gmail.com>
> ASoC: atmel: mchp-pdmc: Mark IMR as volatile
>
> The interrupt handler reads ISR and IMR to determine which interrupts
> are pending. While ISR is marked as volatile, IMR is not, causing
> regmap to return its cached value instead of reading the hardware.
>
> Add IMR to the volatile registers.
>
> Fixes: c5682e2ba132 ("ASoC: mchp-pdmc: fix poc noise at capture startup")
> Fixes: 50291652af52 ("ASoC: atmel: mchp-pdmc: add PDMC driver")
> Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
[Severity: Low]
In 50291652af52 ("ASoC: atmel: mchp-pdmc: add PDMC driver"),
mchp_pdmc_regmap_config did not enable regmap caching, so regmap_read()
on MCHP_PDMC_IMR always read from hardware. Regmap caching
(.cache_type = REGCACHE_FLAT) was enabled in e8c8e9de4ee3 ("ASoC:
mchp-pdmc: use runtime pm for clock power saving") without marking
MCHP_PDMC_IMR volatile.
Should the second Fixes: tag reference e8c8e9de4ee3 ("ASoC: mchp-pdmc:
use runtime pm for clock power saving") instead of 50291652af52 ("ASoC:
atmel: mchp-pdmc: add PDMC driver")?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261120100408.8053-1-phucduc.bui@gmail.com?part=1
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] ASoC: atmel: mchp-spdiftx: Mark interrupt registers as volatile
2026-11-20 10:10 ` sashiko-bot
@ 2026-11-20 10:22 ` Bui Duc Phuc
2026-11-20 10:26 ` Bui Duc Phuc
0 siblings, 1 reply; 8+ messages in thread
From: Bui Duc Phuc @ 2026-11-20 10:22 UTC (permalink / raw)
To: sashiko-reviews; +Cc: linux-sound
> [Severity: Low]
> In commit 06ca24e98e6b ("ASoC: mchp-spdiftx: add driver for S/PDIF TX
> Controller"), mchp_spdiftx_regmap_config left .cache_type unset
> (REGCACHE_NONE), so regmap_read() read SPDIFTX_ISR and SPDIFTX_IMR
> directly from hardware. Regmap caching was enabled later in commit
> 4bf54ca60f99 ("ASoC: mchp-spdiftx: add runtime pm support"), which added
> .cache_type = REGCACHE_FLAT without a .volatile_reg callback.
>
> Should the Fixes tag reference that commit instead?
>
> Fixes: 4bf54ca60f99 ("ASoC: mchp-spdiftx: add runtime pm support")
Commit 06ca24e98e6b already fixes 4bf54ca60f99, so I included both
commits in the Fixes tags.
I don't think this is a critical issue, so I'll wait for the
maintainer's opinion.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] ASoC: atmel: mchp-spdiftx: Mark interrupt registers as volatile
2026-11-20 10:22 ` Bui Duc Phuc
@ 2026-11-20 10:26 ` Bui Duc Phuc
0 siblings, 0 replies; 8+ messages in thread
From: Bui Duc Phuc @ 2026-11-20 10:26 UTC (permalink / raw)
To: sashiko-reviews; +Cc: linux-sound
On Fri, Nov 20, 2026 at 5:22 PM Bui Duc Phuc <phucduc.bui@gmail.com> wrote:
>
> > [Severity: Low]
> > In commit 06ca24e98e6b ("ASoC: mchp-spdiftx: add driver for S/PDIF TX
> > Controller"), mchp_spdiftx_regmap_config left .cache_type unset
> > (REGCACHE_NONE), so regmap_read() read SPDIFTX_ISR and SPDIFTX_IMR
> > directly from hardware. Regmap caching was enabled later in commit
> > 4bf54ca60f99 ("ASoC: mchp-spdiftx: add runtime pm support"), which added
> > .cache_type = REGCACHE_FLAT without a .volatile_reg callback.
> >
> > Should the Fixes tag reference that commit instead?
> >
> > Fixes: 4bf54ca60f99 ("ASoC: mchp-spdiftx: add runtime pm support")
>
> Commit 06ca24e98e6b already fixes 4bf54ca60f99, so I included both
> commits in the Fixes tags.
> I don't think this is a critical issue, so I'll wait for the
> maintainer's opinion.
Sorry, I got that wrong. You're right. I'll update the Fixes tag to:
> Fixes: 4bf54ca60f99 ("ASoC: mchp-spdiftx: add runtime pm support")
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] ASoC: atmel: mchp-pdmc: Mark IMR as volatile
2026-11-20 10:16 ` sashiko-bot
@ 2026-11-20 10:28 ` Bui Duc Phuc
0 siblings, 0 replies; 8+ messages in thread
From: Bui Duc Phuc @ 2026-11-20 10:28 UTC (permalink / raw)
To: sashiko-reviews; +Cc: linux-sound
>
> [Severity: Low]
> In 50291652af52 ("ASoC: atmel: mchp-pdmc: add PDMC driver"),
> mchp_pdmc_regmap_config did not enable regmap caching, so regmap_read()
> on MCHP_PDMC_IMR always read from hardware. Regmap caching
> (.cache_type = REGCACHE_FLAT) was enabled in e8c8e9de4ee3 ("ASoC:
> mchp-pdmc: use runtime pm for clock power saving") without marking
> MCHP_PDMC_IMR volatile.
>
> Should the second Fixes: tag reference e8c8e9de4ee3 ("ASoC: mchp-pdmc:
> use runtime pm for clock power saving") instead of 50291652af52 ("ASoC:
> atmel: mchp-pdmc: add PDMC driver")?
>
Agreed. I'll update the second Fixes tag to reference `e8c8e9de4ee3`.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-11-20 10:29 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-20 10:04 [PATCH 0/2] ASoC: atmel: Mark interrupt registers as volatile phucduc.bui
2026-11-20 10:04 ` [PATCH 1/2] ASoC: atmel: mchp-pdmc: Mark IMR " phucduc.bui
2026-11-20 10:16 ` sashiko-bot
2026-11-20 10:28 ` Bui Duc Phuc
2026-11-20 10:04 ` [PATCH 2/2] ASoC: atmel: mchp-spdiftx: Mark interrupt registers " phucduc.bui
2026-11-20 10:10 ` sashiko-bot
2026-11-20 10:22 ` Bui Duc Phuc
2026-11-20 10:26 ` Bui Duc Phuc
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.