mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] mfd: mt6358: fix MT6358_AUD_TOP and MT6358_MISC_TOP interrupt status bit shifts
@ 2026-11-25 23:48 Ilia Snezhkov via B4 Relay
  0 siblings, 0 replies; only message in thread
From: Ilia Snezhkov via B4 Relay @ 2026-11-25 23:48 UTC (permalink / raw)
  To: lee
  Cc: matthias.bgg, angelogioacchino.delregno, linux-mediatek,
	linux-arm-kernel, linux-kernel

From: Ilia Snezhkov <iasnezhkov@gmail.com>

In enum mt6358_irq_top_status_shift, MT6358_AUD_TOP immediately follows
MT6358_HK_TOP (5), assigning it bit 6 and MT6358_MISC_TOP bit 7.

On MT6358 and MT6366 hardware, TOP_INT_STATUS0 leaves bit 6 reserved
(corresponding to XPP_TOP on MT6357); AUD_TOP is bit 7 and MISC_TOP is
bit 8, matching MT6359_AUD_TOP = 7 in include/linux/mfd/mt6359/core.h,
MT6357_AUD_TOP (7) in include/linux/mfd/mt6357/core.h, and MediaTek's
downstream MT6358/MT6366 MFD headers.

Because mt6358_irq_handler() tests BIT(irqd->pmic_ints[i].top_offset)
against TOP_INT_STATUS0, audio, ACCDET, and SPI_CMD_ALERT interrupts
are never dispatched on MT6358/MT6366.

Set MT6358_AUD_TOP = 7 so MT6358_AUD_TOP is 7 and MT6358_MISC_TOP is 8.

Found and drafted with an AI coding assistant while auditing MT6366.

Fixes: 2b91c28f2abd ("mfd: Add support for the MediaTek MT6358 PMIC")
Signed-off-by: Ilia Snezhkov <iasnezhkov@gmail.com>
---
 include/linux/mfd/mt6358/core.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/mfd/mt6358/core.h b/include/linux/mfd/mt6358/core.h
index 68578e2..5c96607 100644
--- a/include/linux/mfd/mt6358/core.h
+++ b/include/linux/mfd/mt6358/core.h
@@ -32,7 +32,7 @@ enum mt6358_irq_top_status_shift {
 	MT6358_SCK_TOP,
 	MT6358_BM_TOP,
 	MT6358_HK_TOP,
-	MT6358_AUD_TOP,
+	MT6358_AUD_TOP = 7,
 	MT6358_MISC_TOP,
 };
 
-- 
2.54.0 (Apple Git-157)




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-25 23:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-25 23:48 [PATCH] mfd: mt6358: fix MT6358_AUD_TOP and MT6358_MISC_TOP interrupt status bit shifts Ilia Snezhkov via B4 Relay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®