]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Nov 2020 13:26:42 +0000 (14:26 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Nov 2020 13:26:42 +0000 (14:26 +0100)
added patches:
rtc-pcf2127-fix-a-bug-when-not-specify-interrupts-property.patch

queue-5.9/rtc-pcf2127-fix-a-bug-when-not-specify-interrupts-property.patch [new file with mode: 0644]
queue-5.9/series

diff --git a/queue-5.9/rtc-pcf2127-fix-a-bug-when-not-specify-interrupts-property.patch b/queue-5.9/rtc-pcf2127-fix-a-bug-when-not-specify-interrupts-property.patch
new file mode 100644 (file)
index 0000000..0eb78db
--- /dev/null
@@ -0,0 +1,44 @@
+From 35425bafc772ee189e3c3790d7c672b80ba65909 Mon Sep 17 00:00:00 2001
+From: Biwen Li <biwen.li@nxp.com>
+Date: Tue, 15 Sep 2020 15:32:09 +0800
+Subject: rtc: pcf2127: fix a bug when not specify interrupts property
+
+From: Biwen Li <biwen.li@nxp.com>
+
+commit 35425bafc772ee189e3c3790d7c672b80ba65909 upstream.
+
+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>
+Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
+Link: https://lore.kernel.org/r/20200915073213.12779-1-biwen.li@oss.nxp.com
+Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/rtc/rtc-pcf2127.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/rtc/rtc-pcf2127.c
++++ b/drivers/rtc/rtc-pcf2127.c
+@@ -559,7 +559,7 @@ static int pcf2127_probe(struct device *
+       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 *
+               }
+       }
+-      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;
+       }
index e421fbb407b3aafd7458a525c02835454c73a269..e61fd89de61528cfb368cb3b6c3b9dc57a9cce6c 100644 (file)
@@ -3,3 +3,4 @@ io_uring-order-refnode-recycling.patch
 spi-bcm-qspi-fix-use-after-free-on-unbind.patch
 spi-bcm2835-fix-use-after-free-on-unbind.patch
 ipv4-use-is_enabled-instead-of-ifdef.patch
+rtc-pcf2127-fix-a-bug-when-not-specify-interrupts-property.patch