Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ilia Snezhkov via B4 Relay <devnull+iasnezhkov.gmail.com@kernel.org>
To: lee@kernel.org
Cc: matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com,
	 linux-mediatek@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	 linux-kernel@vger.kernel.org
Subject: [PATCH] mfd: mt6358: fix MT6358_AUD_TOP and MT6358_MISC_TOP interrupt status bit shifts
Date: Wed, 25 Nov 2026 23:48:20 +0000	[thread overview]
Message-ID: <20261125234820.94635-1-iasnezhkov@gmail.com> (raw)

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)





                 reply	other threads:[~2026-11-25 23:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20261125234820.94635-1-iasnezhkov@gmail.com \
    --to=devnull+iasnezhkov.gmail.com@kernel.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=iasnezhkov@gmail.com \
    --cc=lee@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.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