linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/12] rtc: rx8010: use IRQ flags obtained from fwnode
@ 2023-01-23 20:02 alexandre.belloni
  2023-01-23 20:02 ` [PATCH 02/12] rtc: ab-eoz9: " alexandre.belloni
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: alexandre.belloni @ 2023-01-23 20:02 UTC (permalink / raw)
  To: Alessandro Zummo, Alexandre Belloni; +Cc: linux-rtc, linux-kernel

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-rx8010.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-rx8010.c b/drivers/rtc/rtc-rx8010.c
index 5e2fd39f70bb..b9c8dad26208 100644
--- a/drivers/rtc/rtc-rx8010.c
+++ b/drivers/rtc/rtc-rx8010.c
@@ -394,9 +394,14 @@ static int rx8010_probe(struct i2c_client *client)
 		return PTR_ERR(rx8010->rtc);
 
 	if (client->irq > 0) {
+		unsigned long irqflags = IRQF_TRIGGER_LOW;
+
+		if (dev_fwnode(&client->dev))
+			irqflags = 0;
+
 		err = devm_request_threaded_irq(dev, client->irq, NULL,
 						rx8010_irq_1_handler,
-						IRQF_TRIGGER_LOW | IRQF_ONESHOT,
+						irqflags | IRQF_ONESHOT,
 						"rx8010", client);
 		if (err) {
 			dev_err(dev, "unable to request IRQ\n");
-- 
2.39.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 02/12] rtc: ab-eoz9: use IRQ flags obtained from fwnode
  2023-01-23 20:02 [PATCH 01/12] rtc: rx8010: use IRQ flags obtained from fwnode alexandre.belloni
@ 2023-01-23 20:02 ` alexandre.belloni
  2023-01-23 20:02 ` [PATCH 03/12] rtc: hym8563: " alexandre.belloni
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: alexandre.belloni @ 2023-01-23 20:02 UTC (permalink / raw)
  To: Alessandro Zummo, Alexandre Belloni; +Cc: linux-rtc, linux-kernel

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-ab-eoz9.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-ab-eoz9.c b/drivers/rtc/rtc-ab-eoz9.c
index 2f8deb8c4cd3..34611f6dedcb 100644
--- a/drivers/rtc/rtc-ab-eoz9.c
+++ b/drivers/rtc/rtc-ab-eoz9.c
@@ -536,9 +536,14 @@ static int abeoz9_probe(struct i2c_client *client)
 	clear_bit(RTC_FEATURE_ALARM, data->rtc->features);
 
 	if (client->irq > 0) {
+		unsigned long irqflags = IRQF_TRIGGER_LOW;
+
+		if (dev_fwnode(&client->dev))
+			irqflags = 0;
+
 		ret = devm_request_threaded_irq(dev, client->irq, NULL,
 						abeoz9_rtc_irq,
-						IRQF_TRIGGER_LOW | IRQF_ONESHOT,
+						irqflags | IRQF_ONESHOT,
 						dev_name(dev), dev);
 		if (ret) {
 			dev_err(dev, "failed to request alarm irq\n");
-- 
2.39.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 03/12] rtc: hym8563: use IRQ flags obtained from fwnode
  2023-01-23 20:02 [PATCH 01/12] rtc: rx8010: use IRQ flags obtained from fwnode alexandre.belloni
  2023-01-23 20:02 ` [PATCH 02/12] rtc: ab-eoz9: " alexandre.belloni
@ 2023-01-23 20:02 ` alexandre.belloni
  2023-01-23 20:02 ` [PATCH 04/12] rtc: m41t80: " alexandre.belloni
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: alexandre.belloni @ 2023-01-23 20:02 UTC (permalink / raw)
  To: Alessandro Zummo, Alexandre Belloni; +Cc: linux-rtc, linux-kernel

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-hym8563.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-hym8563.c b/drivers/rtc/rtc-hym8563.c
index cc710d682121..7d5a298a9a3b 100644
--- a/drivers/rtc/rtc-hym8563.c
+++ b/drivers/rtc/rtc-hym8563.c
@@ -518,9 +518,14 @@ static int hym8563_probe(struct i2c_client *client)
 	}
 
 	if (client->irq > 0) {
+		unsigned long irqflags = IRQF_TRIGGER_LOW;
+
+		if (dev_fwnode(&client->dev))
+			irqflags = 0;
+
 		ret = devm_request_threaded_irq(&client->dev, client->irq,
 						NULL, hym8563_irq,
-						IRQF_TRIGGER_LOW | IRQF_ONESHOT,
+						irqflags | IRQF_ONESHOT,
 						client->name, hym8563);
 		if (ret < 0) {
 			dev_err(&client->dev, "irq %d request failed, %d\n",
-- 
2.39.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 04/12] rtc: m41t80: use IRQ flags obtained from fwnode
  2023-01-23 20:02 [PATCH 01/12] rtc: rx8010: use IRQ flags obtained from fwnode 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 ` alexandre.belloni
  2023-01-23 20:02 ` [PATCH 05/12] rtc: pcf2123: " alexandre.belloni
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: alexandre.belloni @ 2023-01-23 20:02 UTC (permalink / raw)
  To: Alessandro Zummo, Alexandre Belloni; +Cc: linux-rtc, linux-kernel

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-m41t80.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-m41t80.c b/drivers/rtc/rtc-m41t80.c
index 494052dbd39f..c1963f7c424d 100644
--- a/drivers/rtc/rtc-m41t80.c
+++ b/drivers/rtc/rtc-m41t80.c
@@ -914,9 +914,14 @@ static int m41t80_probe(struct i2c_client *client)
 					      "wakeup-source");
 #endif
 	if (client->irq > 0) {
+		unsigned long irqflags = IRQF_TRIGGER_LOW;
+
+		if (dev_fwnode(&client->dev))
+			irqflags = 0;
+
 		rc = devm_request_threaded_irq(&client->dev, client->irq,
 					       NULL, m41t80_handle_irq,
-					       IRQF_TRIGGER_LOW | IRQF_ONESHOT,
+					       irqflags | IRQF_ONESHOT,
 					       "m41t80", client);
 		if (rc) {
 			dev_warn(&client->dev, "unable to request IRQ, alarms disabled\n");
-- 
2.39.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 05/12] rtc: pcf2123: use IRQ flags obtained from fwnode
  2023-01-23 20:02 [PATCH 01/12] rtc: rx8010: use IRQ flags obtained from fwnode alexandre.belloni
                   ` (2 preceding siblings ...)
  2023-01-23 20:02 ` [PATCH 04/12] rtc: m41t80: " alexandre.belloni
@ 2023-01-23 20:02 ` alexandre.belloni
  2023-01-23 20:02 ` [PATCH 06/12] rtc: pcf85063: " alexandre.belloni
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: alexandre.belloni @ 2023-01-23 20:02 UTC (permalink / raw)
  To: Alessandro Zummo, Alexandre Belloni; +Cc: linux-rtc, linux-kernel

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-pcf2123.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-pcf2123.c b/drivers/rtc/rtc-pcf2123.c
index e13b5e695d06..e714661e61a9 100644
--- a/drivers/rtc/rtc-pcf2123.c
+++ b/drivers/rtc/rtc-pcf2123.c
@@ -413,9 +413,14 @@ static int pcf2123_probe(struct spi_device *spi)
 
 	/* Register alarm irq */
 	if (spi->irq > 0) {
+		unsigned long irqflags = IRQF_TRIGGER_LOW;
+
+		if (dev_fwnode(&spi->dev))
+			irqflags = 0;
+
 		ret = devm_request_threaded_irq(&spi->dev, spi->irq, NULL,
 				pcf2123_rtc_irq,
-				IRQF_TRIGGER_LOW | IRQF_ONESHOT,
+				irqflags | IRQF_ONESHOT,
 				pcf2123_driver.driver.name, &spi->dev);
 		if (!ret)
 			device_init_wakeup(&spi->dev, true);
-- 
2.39.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 06/12] rtc: pcf85063: use IRQ flags obtained from fwnode
  2023-01-23 20:02 [PATCH 01/12] rtc: rx8010: use IRQ flags obtained from fwnode alexandre.belloni
                   ` (3 preceding siblings ...)
  2023-01-23 20:02 ` [PATCH 05/12] rtc: pcf2123: " alexandre.belloni
@ 2023-01-23 20:02 ` alexandre.belloni
  2023-01-23 20:02 ` [PATCH 07/12] rtc: pcf8523: " alexandre.belloni
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: alexandre.belloni @ 2023-01-23 20:02 UTC (permalink / raw)
  To: Alessandro Zummo, Alexandre Belloni; +Cc: linux-rtc, linux-kernel

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-pcf85063.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-pcf85063.c b/drivers/rtc/rtc-pcf85063.c
index 754e03984f98..71a456355981 100644
--- a/drivers/rtc/rtc-pcf85063.c
+++ b/drivers/rtc/rtc-pcf85063.c
@@ -621,9 +621,14 @@ static int pcf85063_probe(struct i2c_client *client)
 	clear_bit(RTC_FEATURE_ALARM, pcf85063->rtc->features);
 
 	if (config->has_alarms && client->irq > 0) {
+		unsigned long irqflags = IRQF_TRIGGER_LOW;
+
+		if (dev_fwnode(&client->dev))
+			irqflags = 0;
+
 		err = devm_request_threaded_irq(&client->dev, client->irq,
 						NULL, pcf85063_rtc_handle_irq,
-						IRQF_TRIGGER_LOW | IRQF_ONESHOT,
+						irqflags | IRQF_ONESHOT,
 						"pcf85063", pcf85063);
 		if (err) {
 			dev_warn(&pcf85063->rtc->dev,
-- 
2.39.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 07/12] rtc: pcf8523: use IRQ flags obtained from fwnode
  2023-01-23 20:02 [PATCH 01/12] rtc: rx8010: use IRQ flags obtained from fwnode alexandre.belloni
                   ` (4 preceding siblings ...)
  2023-01-23 20:02 ` [PATCH 06/12] rtc: pcf85063: " alexandre.belloni
@ 2023-01-23 20:02 ` alexandre.belloni
  2023-01-23 20:02 ` [PATCH 08/12] rtc: pcf85363: use IRQ flags obtained fromfwnode alexandre.belloni
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: alexandre.belloni @ 2023-01-23 20:02 UTC (permalink / raw)
  To: Alessandro Zummo, Alexandre Belloni; +Cc: linux-rtc, linux-kernel

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-pcf8523.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-pcf8523.c b/drivers/rtc/rtc-pcf8523.c
index 92de99f11a7a..2e111cdb94f7 100644
--- a/drivers/rtc/rtc-pcf8523.c
+++ b/drivers/rtc/rtc-pcf8523.c
@@ -445,13 +445,18 @@ static int pcf8523_probe(struct i2c_client *client)
 	clear_bit(RTC_FEATURE_UPDATE_INTERRUPT, rtc->features);
 
 	if (client->irq > 0) {
+		unsigned long irqflags = IRQF_TRIGGER_LOW;
+
+		if (dev_fwnode(&client->dev))
+			irqflags = 0;
+
 		err = regmap_write(pcf8523->regmap, PCF8523_TMR_CLKOUT_CTRL, 0x38);
 		if (err < 0)
 			return err;
 
 		err = devm_request_threaded_irq(&client->dev, client->irq,
 						NULL, pcf8523_irq,
-						IRQF_SHARED | IRQF_ONESHOT | IRQF_TRIGGER_LOW,
+						IRQF_SHARED | IRQF_ONESHOT | irqflags,
 						dev_name(&rtc->dev), pcf8523);
 		if (err)
 			return err;
-- 
2.39.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 08/12] rtc: pcf85363: use IRQ flags obtained fromfwnode
  2023-01-23 20:02 [PATCH 01/12] rtc: rx8010: use IRQ flags obtained from fwnode alexandre.belloni
                   ` (5 preceding siblings ...)
  2023-01-23 20:02 ` [PATCH 07/12] rtc: pcf8523: " alexandre.belloni
@ 2023-01-23 20:02 ` alexandre.belloni
  2023-01-23 20:02 ` [PATCH 09/12] rtc: pcf8563: use IRQ flags obtained from fwnode alexandre.belloni
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: alexandre.belloni @ 2023-01-23 20:02 UTC (permalink / raw)
  To: Alessandro Zummo, Alexandre Belloni; +Cc: linux-rtc, linux-kernel

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-pcf85363.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-pcf85363.c b/drivers/rtc/rtc-pcf85363.c
index c05b722f0060..5de323acd178 100644
--- a/drivers/rtc/rtc-pcf85363.c
+++ b/drivers/rtc/rtc-pcf85363.c
@@ -400,12 +400,17 @@ static int pcf85363_probe(struct i2c_client *client)
 	clear_bit(RTC_FEATURE_ALARM, pcf85363->rtc->features);
 
 	if (client->irq > 0) {
+		unsigned long irqflags = IRQF_TRIGGER_LOW;
+
+		if (dev_fwnode(&client->dev))
+			irqflags = 0;
+
 		regmap_write(pcf85363->regmap, CTRL_FLAGS, 0);
 		regmap_update_bits(pcf85363->regmap, CTRL_PIN_IO,
 				   PIN_IO_INTA_OUT, PIN_IO_INTAPM);
 		ret = devm_request_threaded_irq(&client->dev, client->irq,
 						NULL, pcf85363_rtc_handle_irq,
-						IRQF_TRIGGER_LOW | IRQF_ONESHOT,
+						irqflags | IRQF_ONESHOT,
 						"pcf85363", client);
 		if (ret)
 			dev_warn(&client->dev, "unable to request IRQ, alarms disabled\n");
-- 
2.39.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 09/12] rtc: pcf8563: use IRQ flags obtained from fwnode
  2023-01-23 20:02 [PATCH 01/12] rtc: rx8010: use IRQ flags obtained from fwnode alexandre.belloni
                   ` (6 preceding siblings ...)
  2023-01-23 20:02 ` [PATCH 08/12] rtc: pcf85363: use IRQ flags obtained fromfwnode alexandre.belloni
@ 2023-01-23 20:02 ` alexandre.belloni
  2023-01-23 20:02 ` [PATCH 10/12] rtc: rv3029c2: " alexandre.belloni
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: alexandre.belloni @ 2023-01-23 20:02 UTC (permalink / raw)
  To: Alessandro Zummo, Alexandre Belloni; +Cc: linux-rtc, linux-kernel

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-pcf8563.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-pcf8563.c b/drivers/rtc/rtc-pcf8563.c
index 0a7fd9478465..7e720472213c 100644
--- a/drivers/rtc/rtc-pcf8563.c
+++ b/drivers/rtc/rtc-pcf8563.c
@@ -558,9 +558,14 @@ static int pcf8563_probe(struct i2c_client *client)
 	pcf8563->rtc->set_start_time = true;
 
 	if (client->irq > 0) {
+		unsigned long irqflags = IRQF_TRIGGER_LOW;
+
+		if (dev_fwnode(&client->dev))
+			irqflags = 0;
+
 		err = devm_request_threaded_irq(&client->dev, client->irq,
 				NULL, pcf8563_irq,
-				IRQF_SHARED | IRQF_ONESHOT | IRQF_TRIGGER_LOW,
+				IRQF_SHARED | IRQF_ONESHOT | irqflags,
 				pcf8563_driver.driver.name, client);
 		if (err) {
 			dev_err(&client->dev, "unable to request IRQ %d\n",
-- 
2.39.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 10/12] rtc: rv3029c2: use IRQ flags obtained from fwnode
  2023-01-23 20:02 [PATCH 01/12] rtc: rx8010: use IRQ flags obtained from fwnode alexandre.belloni
                   ` (7 preceding siblings ...)
  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
  2023-01-23 20:02 ` [PATCH 11/12] rtc: rv3032: " alexandre.belloni
  2023-01-23 20:02 ` [PATCH 12/12] rtc: rv8803: " alexandre.belloni
  10 siblings, 0 replies; 12+ messages in thread
From: alexandre.belloni @ 2023-01-23 20:02 UTC (permalink / raw)
  To: Alessandro Zummo, Alexandre Belloni; +Cc: linux-rtc, linux-kernel

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


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 11/12] rtc: rv3032: use IRQ flags obtained from fwnode
  2023-01-23 20:02 [PATCH 01/12] rtc: rx8010: use IRQ flags obtained from fwnode alexandre.belloni
                   ` (8 preceding siblings ...)
  2023-01-23 20:02 ` [PATCH 10/12] rtc: rv3029c2: " alexandre.belloni
@ 2023-01-23 20:02 ` alexandre.belloni
  2023-01-23 20:02 ` [PATCH 12/12] rtc: rv8803: " alexandre.belloni
  10 siblings, 0 replies; 12+ messages in thread
From: alexandre.belloni @ 2023-01-23 20:02 UTC (permalink / raw)
  To: Alessandro Zummo, Alexandre Belloni; +Cc: linux-rtc, linux-kernel

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-rv3032.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-rv3032.c b/drivers/rtc/rtc-rv3032.c
index c3bee305eacc..bf6954ec5943 100644
--- a/drivers/rtc/rtc-rv3032.c
+++ b/drivers/rtc/rtc-rv3032.c
@@ -930,9 +930,14 @@ static int rv3032_probe(struct i2c_client *client)
 		return PTR_ERR(rv3032->rtc);
 
 	if (client->irq > 0) {
+		unsigned long irqflags = IRQF_TRIGGER_LOW;
+
+		if (dev_fwnode(&client->dev))
+			irqflags = 0;
+
 		ret = devm_request_threaded_irq(&client->dev, client->irq,
 						NULL, rv3032_handle_irq,
-						IRQF_TRIGGER_LOW | IRQF_ONESHOT,
+						irqflags | IRQF_ONESHOT,
 						"rv3032", rv3032);
 		if (ret) {
 			dev_warn(&client->dev, "unable to request IRQ, alarms disabled\n");
-- 
2.39.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 12/12] rtc: rv8803: use IRQ flags obtained from fwnode
  2023-01-23 20:02 [PATCH 01/12] rtc: rx8010: use IRQ flags obtained from fwnode alexandre.belloni
                   ` (9 preceding siblings ...)
  2023-01-23 20:02 ` [PATCH 11/12] rtc: rv3032: " alexandre.belloni
@ 2023-01-23 20:02 ` alexandre.belloni
  10 siblings, 0 replies; 12+ messages in thread
From: alexandre.belloni @ 2023-01-23 20:02 UTC (permalink / raw)
  To: Alessandro Zummo, Alexandre Belloni; +Cc: linux-rtc, linux-kernel

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-rv8803.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-rv8803.c b/drivers/rtc/rtc-rv8803.c
index b581b6d5ad73..53d1de01b719 100644
--- a/drivers/rtc/rtc-rv8803.c
+++ b/drivers/rtc/rtc-rv8803.c
@@ -641,9 +641,14 @@ static int rv8803_probe(struct i2c_client *client)
 		return PTR_ERR(rv8803->rtc);
 
 	if (client->irq > 0) {
+		unsigned long irqflags = IRQF_TRIGGER_LOW;
+
+		if (dev_fwnode(&client->dev))
+			irqflags = 0;
+
 		err = devm_request_threaded_irq(&client->dev, client->irq,
 						NULL, rv8803_handle_irq,
-						IRQF_TRIGGER_LOW | IRQF_ONESHOT,
+						irqflags | IRQF_ONESHOT,
 						"rv8803", client);
 		if (err) {
 			dev_warn(&client->dev, "unable to request IRQ, alarms disabled\n");
-- 
2.39.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-01-23 20:03 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-23 20:02 [PATCH 01/12] rtc: rx8010: use IRQ flags obtained from fwnode 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 ` [PATCH 10/12] rtc: rv3029c2: " alexandre.belloni
2023-01-23 20:02 ` [PATCH 11/12] rtc: rv3032: " alexandre.belloni
2023-01-23 20:02 ` [PATCH 12/12] rtc: rv8803: " alexandre.belloni

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).