linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: linux-renesas-soc@vger.kernel.org
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>,
	Andi Shyti <andi.shyti@kernel.org>,
	linux-i2c@vger.kernel.org
Subject: [RFC PATCH 2/2] i2c: rcar: support named interrupts
Date: Mon, 26 Aug 2024 17:08:43 +0200	[thread overview]
Message-ID: <20240826150840.25497-6-wsa+renesas@sang-engineering.com> (raw)
In-Reply-To: <20240826150840.25497-4-wsa+renesas@sang-engineering.com>

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/i2c/busses/i2c-rcar.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
index 1104aafe4433..1a232bc88bed 100644
--- a/drivers/i2c/busses/i2c-rcar.c
+++ b/drivers/i2c/busses/i2c-rcar.c
@@ -1192,10 +1192,13 @@ static int rcar_i2c_probe(struct platform_device *pdev)
 			goto out_pm_put;
 	}
 
-	ret = platform_get_irq(pdev, 0);
-	if (ret < 0)
-		goto out_pm_put;
-	priv->irq = ret;
+	priv->irq = platform_get_irq_byname_optional(pdev, "main");
+	if (priv->irq < 0) {
+		priv->irq = platform_get_irq(pdev, 0);
+		if (priv->irq < 0)
+			goto out_pm_put;
+	}
+
 	ret = devm_request_irq(dev, priv->irq, irqhandler, irqflags, dev_name(dev), priv);
 	if (ret < 0) {
 		dev_err(dev, "cannot get irq %d\n", priv->irq);
-- 
2.43.0


  parent reply	other threads:[~2024-08-26 15:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-26 15:08 [RFC PATCH 0/2] i2c: rcar: add SMBAlert support Wolfram Sang
2024-08-26 15:08 ` [RFC PATCH 1/2] dt-bindings: i2c: renesas,rcar-i2c: document SMBusAlert usage Wolfram Sang
2024-08-26 15:30   ` Geert Uytterhoeven
2024-08-31 15:31     ` Wolfram Sang
2024-09-02  9:55       ` Geert Uytterhoeven
2024-09-02 12:04         ` Wolfram Sang
2024-08-27  6:41   ` Krzysztof Kozlowski
2024-08-26 15:08 ` Wolfram Sang [this message]
2024-08-26 15:09   ` [RFC PATCH 2/2] i2c: rcar: support named interrupts Wolfram Sang

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=20240826150840.25497-6-wsa+renesas@sang-engineering.com \
    --to=wsa+renesas@sang-engineering.com \
    --cc=andi.shyti@kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).