From: <shao.mingyin@zte.com.cn>
To: <lee@kernel.org>, <mfd@lists.linux.dev>
Cc: <tony@atomide.com>, <linux-omap@vger.kernel.org>,
<support.opensource@diasemi.com>, <patches@opensource.cirrus.com>,
<ckeepax@opensource.cirrus.com>, <linux-kernel@vger.kernel.org>
Subject: [PATCH v2 1/3] mfd: tps65219: Fix the TPS65214 main IRQ bit mapping
Date: Fri, 27 Nov 2026 12:17:36 +0800 (CST) [thread overview]
Message-ID: <202611271217367487h3LD_GuX64e0UExSRdAR@zte.com.cn> (raw)
In-Reply-To: <20261127121734430rp7P_HaHukJyZYs7OMQjx@zte.com.cn>
The TPS65214 sub-IRQ table has seven entries because INT_SOURCE bit 6
is reserved. Regmap IRQ indexes the table by bit number, so the power
button status on bit 7 accesses the table past its end.
Initialize each entry at its hardware bit index. Bit 6 is implicitly
zero-initialized, so regmap IRQ skips it without reading a status
register.
Fixes: 7947219ab1a2 ("mfd: tps65219: Add support for TI TPS65214 PMIC")
Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn>
---
Changes in v2:
- Use designated initializers for the hardware bit indices.
Previous version: https://lore.kernel.org/all/20261107162119836VR3jHjgaOF-Np7Cmm0nl3@zte.com.cn/
Build-tested on Linux-next next-20261118 with GCC 13.3.0 for x86_64.
drivers/mfd/tps65219.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/mfd/tps65219.c b/drivers/mfd/tps65219.c
index 69cf52a595d6..f65fda6acc74 100644
--- a/drivers/mfd/tps65219.c
+++ b/drivers/mfd/tps65219.c
@@ -262,13 +262,13 @@ static const struct regmap_irq_sub_irq_map tps65215_sub_irq_offsets[] = {
};
static const struct regmap_irq_sub_irq_map tps65214_sub_irq_offsets[] = {
- REGMAP_IRQ_MAIN_REG_OFFSET(tps65214_bit0_offsets),
- REGMAP_IRQ_MAIN_REG_OFFSET(tps65214_bit1_offsets),
- REGMAP_IRQ_MAIN_REG_OFFSET(tps65214_bit2_offsets),
- REGMAP_IRQ_MAIN_REG_OFFSET(tps65214_bit3_offsets),
- REGMAP_IRQ_MAIN_REG_OFFSET(tps65214_bit4_offsets),
- REGMAP_IRQ_MAIN_REG_OFFSET(tps65214_bit5_offsets),
- REGMAP_IRQ_MAIN_REG_OFFSET(tps65214_bit7_offsets),
+ [0] = REGMAP_IRQ_MAIN_REG_OFFSET(tps65214_bit0_offsets),
+ [1] = REGMAP_IRQ_MAIN_REG_OFFSET(tps65214_bit1_offsets),
+ [2] = REGMAP_IRQ_MAIN_REG_OFFSET(tps65214_bit2_offsets),
+ [3] = REGMAP_IRQ_MAIN_REG_OFFSET(tps65214_bit3_offsets),
+ [4] = REGMAP_IRQ_MAIN_REG_OFFSET(tps65214_bit4_offsets),
+ [5] = REGMAP_IRQ_MAIN_REG_OFFSET(tps65214_bit5_offsets),
+ [7] = REGMAP_IRQ_MAIN_REG_OFFSET(tps65214_bit7_offsets),
};
#define TPS65219_REGMAP_IRQ_REG(int_name, register_position) \
base-commit: e8017d29067fd1310a65c3494ce1a1b492adbac6
--
2.43.0
next prev parent reply other threads:[~2026-11-27 4:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 4:17 [PATCH v2 0/3] mfd: Fix an out-of-bounds IRQ map and error-path bugs shao.mingyin
2026-11-27 4:17 ` shao.mingyin [this message]
2026-11-27 4:17 ` [PATCH v2 2/3] mfd: arizona: Free only registered diagnostic IRQs shao.mingyin
2026-11-27 10:27 ` Charles Keepax
2026-11-27 4:17 ` [PATCH v2 3/3] mfd: da9052: Balance the parent IRQ wake reference shao.mingyin
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=202611271217367487h3LD_GuX64e0UExSRdAR@zte.com.cn \
--to=shao.mingyin@zte.com.cn \
--cc=ckeepax@opensource.cirrus.com \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=mfd@lists.linux.dev \
--cc=patches@opensource.cirrus.com \
--cc=support.opensource@diasemi.com \
--cc=tony@atomide.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
all inboxes | Powered by JetHome®