[PATCH] mfd: mt6358: fix MT6358_AUD_TOP and MT6358_MISC_TOP interrupt status bit shifts
From: Ilia Snezhkov via B4 Relay
Date: Wed Nov 25 2026 - 18:48:28 EST
From: Ilia Snezhkov <iasnezhkov@xxxxxxxxx>
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@xxxxxxxxx>
---
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)