From: Biwen Li <biwen.li@oss.nxp.com>
To: alexandre.belloni@bootlin.com, leoyang.li@nxp.com,
shawnguo@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
jiafei.pan@nxp.com, linux-rtc@vger.kernel.org,
Biwen Li <biwen.li@nxp.com>
Subject: [PATCH 1/5] rtc: pcf2127: fix a bug when not specify interrupts property
Date: Tue, 15 Sep 2020 15:32:09 +0800 [thread overview]
Message-ID: <20200915073213.12779-1-biwen.li@oss.nxp.com> (raw)
From: Biwen Li <biwen.li@nxp.com>
Fix a bug when not specify interrupts property in dts
as follows,
rtc-pcf2127-i2c 1-0051: failed to request alarm irq
rtc-pcf2127-i2c: probe of 1-0051 failed with error -22
Signed-off-by: Biwen Li <biwen.li@nxp.com>
---
drivers/rtc/rtc-pcf2127.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/rtc/rtc-pcf2127.c b/drivers/rtc/rtc-pcf2127.c
index ed6316992cbb..07a5630ec841 100644
--- a/drivers/rtc/rtc-pcf2127.c
+++ b/drivers/rtc/rtc-pcf2127.c
@@ -559,7 +559,7 @@ static int pcf2127_probe(struct device *dev, struct regmap *regmap,
pcf2127->rtc->set_start_time = true; /* Sets actual start to 1970 */
pcf2127->rtc->uie_unsupported = 1;
- if (alarm_irq >= 0) {
+ if (alarm_irq > 0) {
ret = devm_request_threaded_irq(dev, alarm_irq, NULL,
pcf2127_rtc_irq,
IRQF_TRIGGER_LOW | IRQF_ONESHOT,
@@ -570,7 +570,7 @@ static int pcf2127_probe(struct device *dev, struct regmap *regmap,
}
}
- if (alarm_irq >= 0 || device_property_read_bool(dev, "wakeup-source")) {
+ if (alarm_irq > 0 || device_property_read_bool(dev, "wakeup-source")) {
device_init_wakeup(dev, true);
pcf2127->rtc->ops = &pcf2127_rtc_alrm_ops;
}
--
2.17.1
next reply other threads:[~2020-09-15 7:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-15 7:32 Biwen Li [this message]
2020-09-15 7:32 ` [PATCH 2/5] arm64: dts: lx2160a-rdb: remove useless property of rtc Biwen Li
2020-09-22 3:02 ` Shawn Guo
2020-09-22 3:12 ` [EXT] " Biwen Li
2020-09-22 3:28 ` Leo Li
2020-09-22 3:31 ` Biwen Li
2020-09-22 22:28 ` Li Yang
2020-09-15 7:32 ` [PATCH 3/5] arm64: dts: ls1088a-rdb: " Biwen Li
2020-09-15 7:32 ` [PATCH 4/5] arm64: dts : ls1088a-qds: " Biwen Li
2020-09-15 7:32 ` [PATCH 5/5] arm64: dts: ls1046a-qds: " Biwen Li
2020-09-15 10:26 ` [PATCH 1/5] rtc: pcf2127: fix a bug when not specify interrupts property 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=20200915073213.12779-1-biwen.li@oss.nxp.com \
--to=biwen.li@oss.nxp.com \
--cc=alexandre.belloni@bootlin.com \
--cc=biwen.li@nxp.com \
--cc=devicetree@vger.kernel.org \
--cc=jiafei.pan@nxp.com \
--cc=leoyang.li@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=shawnguo@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).