From: "Christophe Leroy (CS GROUP)" <chleroy@kernel.org>
To: Rosen Penev <rosenp@gmail.com>, linux-i2c@vger.kernel.org
Cc: Jochen Friedrich <jochen@scram.de>,
Andi Shyti <andi.shyti@kernel.org>,
"open list:FREESCALE I2C CPM DRIVER"
<linuxppc-dev@lists.ozlabs.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] i2c: cpm: Use platform_get_irq() to retrieve interrupt
Date: Wed, 3 Jun 2026 10:15:27 +0200 [thread overview]
Message-ID: <63476872-b3be-4564-a748-74757130c50a@kernel.org> (raw)
In-Reply-To: <20260603005455.226882-1-rosenp@gmail.com>
Le 03/06/2026 à 02:54, Rosen Penev a écrit :
> Replace irq_of_parse_and_map() with platform_get_irq() as recommended
> for device-managed IRQ lookup. Properly propagate any errors returned
> from platform_get_irq(). irq_of_parse_and_map() requires
> ire_dispose_mapping(), which is missing.
irq_of_parse_and_map() and platform_get_irq() look pretty different, can
you give more details on how one can replace the other ? (I don't mean
this is wrong, just I don't have enough details).
>
> Assisted-by: opencode:big-pickle
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> ---
> drivers/i2c/busses/i2c-cpm.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-cpm.c b/drivers/i2c/busses/i2c-cpm.c
> index 2cb6a233d313..23679c192edc 100644
> --- a/drivers/i2c/busses/i2c-cpm.c
> +++ b/drivers/i2c/busses/i2c-cpm.c
> @@ -434,9 +434,9 @@ static int cpm_i2c_setup(struct cpm_i2c *cpm)
>
> init_waitqueue_head(&cpm->i2c_wait);
>
> - cpm->irq = irq_of_parse_and_map(ofdev->dev.of_node, 0);
> - if (!cpm->irq)
> - return -EINVAL;
> + cpm->irq = platform_get_irq(ofdev, 0);
> + if (cpm->irq < 0)
> + return cpm->irq;
>
> /* Install interrupt handler. */
> ret = request_irq(cpm->irq, cpm_i2c_interrupt, 0, "cpm_i2c",
next prev parent reply other threads:[~2026-06-03 8:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-03 0:54 [PATCH] i2c: cpm: Use platform_get_irq() to retrieve interrupt Rosen Penev
2026-06-03 8:15 ` Christophe Leroy (CS GROUP) [this message]
2026-06-03 9:38 ` Rosen Penev
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=63476872-b3be-4564-a748-74757130c50a@kernel.org \
--to=chleroy@kernel.org \
--cc=andi.shyti@kernel.org \
--cc=jochen@scram.de \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=rosenp@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