* [PATCH] rtc: pcf8563: pass the driver data to the alarm interrupt handler
@ 2026-10-04 23:56 ` Igor Velkov
0 siblings, 0 replies; 4+ messages in thread
From: Igor Velkov via B4 Relay @ 2026-10-04 23:56 UTC (permalink / raw)
To: Alexandre Belloni
Cc: Nobuhiro Iwamatsu, linux-rtc, linux-kernel, stable, Igor Velkov
From: Igor Velkov <iav@iav.lv>
pcf8563_irq() takes its dev_id as struct pcf8563, but probe still
registers the interrupt with the i2c client. The handler then takes the
regmap pointer from the wrong structure: the first alarm oopses, the
level-low INT is never acknowledged, and the interrupt gets disabled as
spurious.
Only an RTC that has an interrupt (client->irq > 0) reaches this path.
Fixes: 00f1bb9b8486 ("rtc: pcf8563: Switch to regmap")
Cc: stable@vger.kernel.org
Assisted-by: LLM
Signed-off-by: Igor Velkov <iav@iav.lv>
---
Tested on ODROID-HC4, 7.3-rc5, with the INT line wired to GPIOX_5 in the
device tree: the alarm interrupt fires once, the alarm flag is cleared,
no oops.
---
drivers/rtc/rtc-pcf8563.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/rtc/rtc-pcf8563.c b/drivers/rtc/rtc-pcf8563.c
index 7eebdb058067..0767331a2cc7 100644
--- a/drivers/rtc/rtc-pcf8563.c
+++ b/drivers/rtc/rtc-pcf8563.c
@@ -531,7 +531,7 @@ static int pcf8563_probe(struct i2c_client *client)
err = devm_request_threaded_irq(&client->dev, client->irq,
NULL, pcf8563_irq,
IRQF_SHARED | IRQF_ONESHOT | irqflags,
- pcf8563_driver.driver.name, client);
+ pcf8563_driver.driver.name, pcf8563);
if (err) {
dev_err(&client->dev, "unable to request IRQ %d\n",
client->irq);
---
base-commit: 8ef8e9839a23ca7f5dda6a69b670633de5a23716
change-id: 20261005-pcf8563-irq-data-6b4092927750
Best regards,
--
Igor Velkov <iav@iav.lv>
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] rtc: pcf8563: pass the driver data to the alarm interrupt handler
@ 2026-10-04 23:56 ` Igor Velkov
0 siblings, 0 replies; 4+ messages in thread
From: Igor Velkov @ 2026-10-04 23:56 UTC (permalink / raw)
To: Alexandre Belloni
Cc: Nobuhiro Iwamatsu, linux-rtc, linux-kernel, stable, Igor Velkov
pcf8563_irq() takes its dev_id as struct pcf8563, but probe still
registers the interrupt with the i2c client. The handler then takes the
regmap pointer from the wrong structure: the first alarm oopses, the
level-low INT is never acknowledged, and the interrupt gets disabled as
spurious.
Only an RTC that has an interrupt (client->irq > 0) reaches this path.
Fixes: 00f1bb9b8486 ("rtc: pcf8563: Switch to regmap")
Cc: stable@vger.kernel.org
Assisted-by: LLM
Signed-off-by: Igor Velkov <iav@iav.lv>
---
Tested on ODROID-HC4, 7.3-rc5, with the INT line wired to GPIOX_5 in the
device tree: the alarm interrupt fires once, the alarm flag is cleared,
no oops.
---
drivers/rtc/rtc-pcf8563.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/rtc/rtc-pcf8563.c b/drivers/rtc/rtc-pcf8563.c
index 7eebdb058067..0767331a2cc7 100644
--- a/drivers/rtc/rtc-pcf8563.c
+++ b/drivers/rtc/rtc-pcf8563.c
@@ -531,7 +531,7 @@ static int pcf8563_probe(struct i2c_client *client)
err = devm_request_threaded_irq(&client->dev, client->irq,
NULL, pcf8563_irq,
IRQF_SHARED | IRQF_ONESHOT | irqflags,
- pcf8563_driver.driver.name, client);
+ pcf8563_driver.driver.name, pcf8563);
if (err) {
dev_err(&client->dev, "unable to request IRQ %d\n",
client->irq);
---
base-commit: 8ef8e9839a23ca7f5dda6a69b670633de5a23716
change-id: 20261005-pcf8563-irq-data-6b4092927750
Best regards,
--
Igor Velkov <iav@iav.lv>
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] rtc: pcf8563: pass the driver data to the alarm interrupt handler
2026-10-04 23:56 ` Igor Velkov
(?)
@ 2026-10-05 0:04 ` sashiko-bot
-1 siblings, 0 replies; 4+ messages in thread
From: sashiko-bot @ 2026-10-05 0:04 UTC (permalink / raw)
To: Igor Velkov; +Cc: linux-rtc, Alexandre Belloni
> From: Igor Velkov <iav@iav.lv>
>
> pcf8563_irq() takes its dev_id as struct pcf8563, but probe still
> registers the interrupt with the i2c client. The handler then takes the
> regmap pointer from the wrong structure: the first alarm oopses, the
> level-low INT is never acknowledged, and the interrupt gets disabled as
> spurious.
>
> Only an RTC that has an interrupt (client->irq > 0) reaches this path.
>
> Fixes: 00f1bb9b8486 ("rtc: pcf8563: Switch to regmap")
> Cc: stable@vger.kernel.org
> Assisted-by: LLM
> Signed-off-by: Igor Velkov <iav@iav.lv>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261004-pcf8563-irq-data-v1-1-f176763ddf2f@iav.lv?part=1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] rtc: pcf8563: pass the driver data to the alarm interrupt handler
2026-10-04 23:56 ` Igor Velkov
(?)
(?)
@ 2026-10-09 11:21 ` Nobuhiro Iwamatsu
-1 siblings, 0 replies; 4+ messages in thread
From: Nobuhiro Iwamatsu @ 2026-10-09 11:21 UTC (permalink / raw)
To: iav; +Cc: Alexandre Belloni, linux-rtc, linux-kernel, stable
Hi,
Thanks for your patch.
2026年10月5日(月) 8:57 Igor Velkov via B4 Relay <devnull+iav.iav.lv@kernel.org>:
>
> From: Igor Velkov <iav@iav.lv>
>
> pcf8563_irq() takes its dev_id as struct pcf8563, but probe still
> registers the interrupt with the i2c client. The handler then takes the
> regmap pointer from the wrong structure: the first alarm oopses, the
> level-low INT is never acknowledged, and the interrupt gets disabled as
> spurious.
>
> Only an RTC that has an interrupt (client->irq > 0) reaches this path.
>
> Fixes: 00f1bb9b8486 ("rtc: pcf8563: Switch to regmap")
> Cc: stable@vger.kernel.org
> Assisted-by: LLM
> Signed-off-by: Igor Velkov <iav@iav.lv>
> ---
> Tested on ODROID-HC4, 7.3-rc5, with the INT line wired to GPIOX_5 in the
> device tree: the alarm interrupt fires once, the alarm flag is cleared,
> no oops.
> ---
> drivers/rtc/rtc-pcf8563.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Reviewed-by: Nobuhiro Iwamtasu <iwamatsu@nigauri.org>
Best regards
Nobuhiro
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-10-09 11:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-04 23:56 [PATCH] rtc: pcf8563: pass the driver data to the alarm interrupt handler Igor Velkov via B4 Relay
2026-10-04 23:56 ` Igor Velkov
2026-10-05 0:04 ` sashiko-bot
2026-10-09 11:21 ` Nobuhiro Iwamatsu
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.