Skip to contentSkip to conversation

mfd: mt6358: fix MT6358_AUD_TOP and MT6358_MISC_TOP interrupt status bit shifts

PATCH New Ilia Snezhkov 1 participant 1 message Nov 25

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mfd: mt6358: fix MT6358_AUD_TOP and MT6358_MISC_TOP interrupt status bit shifts

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")
---
 include/linux/mfd/mt6358/core.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/mfd/mt6358/core.h +1 -1
index 68578e2..5c96607 100644
@@ -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,
 };
 
Signature · 1 line
2.54.0 (Apple Git-157)