2020-09-15 07:44:28

by Biwen Li (OSS)

[permalink] [raw]
Subject: [PATCH 1/5] rtc: pcf2127: fix a bug when not specify interrupts property

From: Biwen Li <[email protected]>

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 <[email protected]>
---
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


2020-09-15 07:45:31

by Biwen Li (OSS)

[permalink] [raw]
Subject: [PATCH 4/5] arm64: dts : ls1088a-qds: remove useless property of rtc

From: Biwen Li <[email protected]>

Remove useless property interrupts of rtc

Signed-off-by: Biwen Li <[email protected]>
---
arch/arm64/boot/dts/freescale/fsl-ls1088a-qds.dts | 2 --
1 file changed, 2 deletions(-)

diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1088a-qds.dts b/arch/arm64/boot/dts/freescale/fsl-ls1088a-qds.dts
index 5b2699fe4e5d..329a9428ae8b 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls1088a-qds.dts
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1088a-qds.dts
@@ -90,8 +90,6 @@
rtc@51 {
compatible = "nxp,pcf2129";
reg = <0x51>;
- /* IRQ10_B */
- interrupts = <0 150 IRQ_TYPE_LEVEL_HIGH>;
};

eeprom@56 {
--
2.17.1

2020-09-15 07:46:01

by Biwen Li (OSS)

[permalink] [raw]
Subject: [PATCH 5/5] arm64: dts: ls1046a-qds: remove useless property of rtc

From: Biwen Li <[email protected]>

Remove useless property interrupts of rtc

Signed-off-by: Biwen Li <[email protected]>
---
arch/arm64/boot/dts/freescale/fsl-ls1046a-qds.dts | 2 --
1 file changed, 2 deletions(-)

diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1046a-qds.dts b/arch/arm64/boot/dts/freescale/fsl-ls1046a-qds.dts
index 35fa10a5d594..f13a45bdf4e9 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls1046a-qds.dts
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1046a-qds.dts
@@ -122,8 +122,6 @@
rtc@51 {
compatible = "nxp,pcf2129";
reg = <0x51>;
- /* IRQ10_B */
- interrupts = <0 150 0x4>;
};

eeprom@56 {
--
2.17.1

2020-09-15 10:27:35

by Alexandre Belloni

[permalink] [raw]
Subject: Re: [PATCH 1/5] rtc: pcf2127: fix a bug when not specify interrupts property

On Tue, 15 Sep 2020 15:32:09 +0800, Biwen Li wrote:
> 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

Applied, thanks!

[1/1] rtc: pcf2127: fix a bug when not specify interrupts property
commit: 35425bafc772ee189e3c3790d7c672b80ba65909

Best regards,
--
Alexandre Belloni <[email protected]>