From: alexandre.belloni@bootlin.com
To: Alessandro Zummo <a.zummo@towertech.it>,
Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 10/12] rtc: rv3029c2: use IRQ flags obtained from fwnode
Date: Mon, 23 Jan 2023 21:02:15 +0100 [thread overview]
Message-ID: <20230123200217.1236011-10-alexandre.belloni@bootlin.com> (raw)
In-Reply-To: <20230123200217.1236011-1-alexandre.belloni@bootlin.com>
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
Allow the IRQ type to be passed from the device tree if available as there
may be components changing the trigger type of the interrupt between the
RTC and the IRQ controller.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
drivers/rtc/rtc-rv3029c2.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/rtc/rtc-rv3029c2.c b/drivers/rtc/rtc-rv3029c2.c
index e4fdd47ae066..0852f6709a85 100644
--- a/drivers/rtc/rtc-rv3029c2.c
+++ b/drivers/rtc/rtc-rv3029c2.c
@@ -735,9 +735,14 @@ static int rv3029_probe(struct device *dev, struct regmap *regmap, int irq,
return PTR_ERR(rv3029->rtc);
if (rv3029->irq > 0) {
+ unsigned long irqflags = IRQF_TRIGGER_LOW;
+
+ if (dev_fwnode(dev))
+ irqflags = 0;
+
rc = devm_request_threaded_irq(dev, rv3029->irq,
NULL, rv3029_handle_irq,
- IRQF_TRIGGER_LOW | IRQF_ONESHOT,
+ irqflags | IRQF_ONESHOT,
"rv3029", dev);
if (rc) {
dev_warn(dev, "unable to request IRQ, alarms disabled\n");
--
2.39.1
next prev parent reply other threads:[~2023-01-23 20:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-23 20:02 [PATCH 01/12] rtc: rx8010: " alexandre.belloni
2023-01-23 20:02 ` [PATCH 02/12] rtc: ab-eoz9: " alexandre.belloni
2023-01-23 20:02 ` [PATCH 03/12] rtc: hym8563: " alexandre.belloni
2023-01-23 20:02 ` [PATCH 04/12] rtc: m41t80: " alexandre.belloni
2023-01-23 20:02 ` [PATCH 05/12] rtc: pcf2123: " alexandre.belloni
2023-01-23 20:02 ` [PATCH 06/12] rtc: pcf85063: " alexandre.belloni
2023-01-23 20:02 ` [PATCH 07/12] rtc: pcf8523: " alexandre.belloni
2023-01-23 20:02 ` [PATCH 08/12] rtc: pcf85363: use IRQ flags obtained fromfwnode alexandre.belloni
2023-01-23 20:02 ` [PATCH 09/12] rtc: pcf8563: use IRQ flags obtained from fwnode alexandre.belloni
2023-01-23 20:02 ` alexandre.belloni [this message]
2023-01-23 20:02 ` [PATCH 11/12] rtc: rv3032: " alexandre.belloni
2023-01-23 20:02 ` [PATCH 12/12] rtc: rv8803: " alexandre.belloni
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=20230123200217.1236011-10-alexandre.belloni@bootlin.com \
--to=alexandre.belloni@bootlin.com \
--cc=a.zummo@towertech.it \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@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
all inboxes | Powered by JetHome®