From: Frank Li <Frank.li@oss.nxp.com>
To: Prasanth R <ragaprasanth@gmail.com>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>,
linux-rtc@vger.kernel.org, Frank Li <Frank.Li@nxp.com>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
Support Opensource <support.opensource@diasemi.com>,
Paul Cercueil <paul@crapouillou.net>,
CL Wang <cl634@andestech.com>,
imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
linux-mips@vger.kernel.org, Prasanth R <prasanth.r@lineo.co.jp>
Subject: Re: [PATCH 04/12] rtc: mxc_v2: clear the wake IRQ on unbind
Date: Wed, 25 Nov 2026 15:52:10 -0600 [thread overview]
Message-ID: <awdYin-gfFlMzm5K@SMW015318> (raw)
In-Reply-To: <20261125072026.2997493-5-prasanth.r@lineo.co.jp>
On Wed, Nov 25, 2026 at 04:20:18PM +0900, Prasanth R wrote:
> [You don't often get email from ragaprasanth@gmail.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> From: Prasanth R <ragaprasanth@gmail.com>
>
> mxc_rtc_remove() and the probe error paths do not release the wake IRQ
> set with dev_pm_set_wake_irq() or the wakeup source enabled with
> device_init_wakeup().
>
> When the driver is bound again, dev_pm_set_wake_irq() finds the old wake
> IRQ, warns "wake irq already initialized" and returns -EEXIST, so the
> driver prints "failed to enable irq wake".
>
> Use the device-managed variants so both are released on unbind.
>
> Compile-tested only.
>
> I used an AI assistant (Claude) to find this and write the change.
Needn't it at commit message, you can move it after --- to tell maintainer
you use AI help.
>
> Fixes: fbc5ee9a6955 ("rtc: mxc_v2: use dev_pm_set_wake_irq() to simplify code")
> Signed-off-by: Prasanth R <prasanth.r@lineo.co.jp>
> ---
> drivers/rtc/rtc-mxc_v2.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/rtc/rtc-mxc_v2.c b/drivers/rtc/rtc-mxc_v2.c
> index 35a18b75c..fe3a55b00 100644
> --- a/drivers/rtc/rtc-mxc_v2.c
> +++ b/drivers/rtc/rtc-mxc_v2.c
> @@ -301,8 +301,8 @@ static int mxc_rtc_probe(struct platform_device *pdev)
> if (pdata->irq < 0)
> return pdata->irq;
>
> - device_init_wakeup(&pdev->dev, true);
> - ret = dev_pm_set_wake_irq(&pdev->dev, pdata->irq);
> + devm_device_init_wakeup(&pdev->dev);
all devm_*() API need check return value.
Frank
> + ret = devm_pm_set_wake_irq(&pdev->dev, pdata->irq);
> if (ret)
> dev_err(&pdev->dev, "failed to enable irq wake\n");
>
> --
> 2.43.0
>
>
next prev parent reply other threads:[~2026-11-25 21:52 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 7:20 [PATCH 00/12] rtc: clear the wake IRQ on unbind Prasanth R
2026-11-25 7:20 ` [PATCH 01/12] rtc: snvs: " Prasanth R
2026-11-25 9:18 ` Marco Felsch
2026-11-26 0:13 ` Prasanth Ramesh
2026-11-25 7:20 ` [PATCH 02/12] rtc: mxc: " Prasanth R
2026-11-25 7:20 ` [PATCH 03/12] rtc: mxc_v2: fix unbalanced clock disable on remove Prasanth R
2026-11-25 7:20 ` [PATCH 04/12] rtc: mxc_v2: clear the wake IRQ on unbind Prasanth R
2026-11-25 7:25 ` sashiko-bot
2026-11-25 21:52 ` Frank Li [this message]
2026-11-26 0:28 ` Prasanth Ramesh
2026-11-25 7:20 ` [PATCH 05/12] rtc: imxdi: clear the wake IRQ on removal Prasanth R
2026-11-25 7:20 ` [PATCH 06/12] rtc: da9063: clear the wake IRQ on unbind Prasanth R
2026-11-25 7:20 ` [PATCH 07/12] rtc: fsl-ftm-alarm: " Prasanth R
2026-11-25 7:20 ` [PATCH 08/12] rtc: jz4740: " Prasanth R
2026-11-25 14:38 ` Paul Cercueil
2026-11-26 0:18 ` Prasanth Ramesh
2026-11-25 7:20 ` [PATCH 09/12] rtc: atcrtc100: " Prasanth R
2026-11-25 7:20 ` [PATCH 10/12] rtc: pcf8523: " Prasanth R
2026-11-25 7:33 ` sashiko-bot
2026-11-25 7:20 ` [PATCH 11/12] rtc: pcf85063: " Prasanth R
2026-11-25 7:29 ` sashiko-bot
2026-11-25 7:20 ` [PATCH 12/12] rtc: rv8803: " Prasanth R
2026-11-25 7:32 ` sashiko-bot
2026-11-25 7:33 ` [PATCH 00/12] rtc: " sashiko-bot
2026-11-25 7:58 ` Prasanth Ramesh
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=awdYin-gfFlMzm5K@SMW015318 \
--to=frank.li@oss.nxp.com \
--cc=Frank.Li@nxp.com \
--cc=alexandre.belloni@bootlin.com \
--cc=cl634@andestech.com \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=paul@crapouillou.net \
--cc=prasanth.r@lineo.co.jp \
--cc=ragaprasanth@gmail.com \
--cc=s.hauer@pengutronix.de \
--cc=support.opensource@diasemi.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