From: "Kaustabh Chakraborty" <kauschluss@disroot.org>
To: <sashiko-reviews@lists.linux.dev>,
"Kaustabh Chakraborty" <kauschluss@disroot.org>
Cc: <robh@kernel.org>, <krzk+dt@kernel.org>, <conor+dt@kernel.org>,
<devicetree@vger.kernel.org>
Subject: Re: [PATCH v7 04/10] mfd: sec: add support for S2MU005 PMIC
Date: Sat, 16 May 2026 16:07:05 +0530 [thread overview]
Message-ID: <DIK1A93ZZZY5.3HB73O465YR3S@disroot.org> (raw)
In-Reply-To: <20260515222508.BF4ADC2BCB0@smtp.kernel.org>
On 2026-05-15 22:25 +00:00, sashiko-bot wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [High] Missing `.use_ack = true` in `s2mu005_irq_chip` causes an infinite interrupt storm.
> --
>
> commit 6e3b1141ae78b94854e84436a682b1574f6933ac
> Author: Kaustabh Chakraborty <kauschluss@disroot.org>
>
> mfd: sec: add support for S2MU005 PMIC
>
> This commit adds support for Samsung's S2MU005 PMIC. It introduces a new
> device type and handles its specific revision register fetching, as well
> as providing its interrupt chips and child cell definitions.
>
>> diff --git a/drivers/mfd/sec-irq.c b/drivers/mfd/sec-irq.c
>> index 133188391f7c2..42862807be1a0 100644
>> --- a/drivers/mfd/sec-irq.c
>> +++ b/drivers/mfd/sec-irq.c
>
> [ ... ]
>
>> @@ -337,6 +397,16 @@ static const struct regmap_irq_chip s2mpu05_irq_chip = {
>> .ack_base = S2MPU05_REG_INT1,
>> };
>>
>> +static const struct regmap_irq_chip s2mu005_irq_chip = {
>> + .name = "s2mu005",
>> + .irqs = s2mu005_irqs,
>> + .num_irqs = ARRAY_SIZE(s2mu005_irqs),
>> + .num_regs = 4,
>> + .status_base = S2MU005_REG_CHGR_INT1,
>> + .mask_base = S2MU005_REG_CHGR_INT1M,
>> + .get_irq_reg = s2mu005_irq_get_reg,
>> +};
>
> Does this structure need .use_ack = true?
>
> In s2mu005_irq_chip, .ack_base is not explicitly set, so it implicitly
> initializes to 0. The .status_base is set to S2MU005_REG_CHGR_INT1, which is
> the first enumerator in s2mu005_reg and thus equals 0.
>
> The regmap-irq core framework relies on the condition if (chip->ack_base ||
> chip->use_ack) to determine if it should write back to the hardware registers
> to acknowledge and clear the interrupts. Because both evaluate to 0 (false),
> regmap-irq assumes the chip is clear-on-read and completely skips the ACK
> execution.
>
> Since Samsung PMICs require a Write-1-to-Clear sequence to clear interrupt
> status registers, without the ACK write, the hardware PMIC continuously
> asserts the physical IRQ line.
>
> As the interrupt uses IRQF_ONESHOT, the moment the threaded handler completes
> and unmasks the interrupt at the controller, the still-asserted hardware line
> will immediately re-trigger the interrupt.
>
> Could this loop cause an infinite interrupt storm, starving the CPU and
> leading to a hard lockup?
This actually does not happen, this PMIC device doesn't require ack.
There's no interrupt storm when testing, and neither does the downstream
driver implement ack-ing code.
next prev parent reply other threads:[~2026-05-16 10:37 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-15 21:38 [PATCH v7 00/10] Support for Samsung S2MU005 PMIC and its sub-devices Kaustabh Chakraborty
2026-05-15 21:38 ` [PATCH v7 01/10] dt-bindings: leds: document Samsung S2M series PMIC flash LED device Kaustabh Chakraborty
2026-05-15 21:38 ` [PATCH v7 02/10] dt-bindings: extcon: document Samsung S2M series PMIC extcon device Kaustabh Chakraborty
2026-05-15 21:38 ` [PATCH v7 03/10] dt-bindings: mfd: add documentation for S2MU005 PMIC Kaustabh Chakraborty
2026-05-15 21:38 ` [PATCH v7 04/10] mfd: sec: add support " Kaustabh Chakraborty
2026-05-15 22:25 ` sashiko-bot
2026-05-16 10:37 ` Kaustabh Chakraborty [this message]
2026-05-15 21:38 ` [PATCH v7 05/10] mfd: sec: set DMA coherent mask Kaustabh Chakraborty
2026-05-15 22:24 ` sashiko-bot
2026-05-16 12:18 ` Kaustabh Chakraborty
2026-05-15 21:38 ` [PATCH v7 06/10] leds: flash: add support for Samsung S2M series PMIC flash LED device Kaustabh Chakraborty
2026-05-15 22:15 ` sashiko-bot
2026-05-16 12:43 ` Kaustabh Chakraborty
2026-05-15 21:38 ` [PATCH v7 07/10] leds: rgb: add support for Samsung S2M series PMIC RGB " Kaustabh Chakraborty
2026-05-15 22:10 ` sashiko-bot
2026-05-15 21:38 ` [PATCH v7 08/10] Documentation: leds: document pattern behavior of Samsung S2M series PMIC RGB LEDs Kaustabh Chakraborty
2026-05-15 21:38 ` [PATCH v7 09/10] extcon: add support for Samsung S2M series PMIC extcon devices Kaustabh Chakraborty
2026-05-15 22:10 ` sashiko-bot
2026-05-15 21:38 ` [PATCH v7 10/10] power: supply: add support for Samsung S2M series PMIC charger device Kaustabh Chakraborty
2026-05-15 22:22 ` sashiko-bot
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=DIK1A93ZZZY5.3HB73O465YR3S@disroot.org \
--to=kauschluss@disroot.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.