Skip to contentSkip to conversation

rtc: rx8010: use IRQ flags obtained from fwnode

PATCH New [email protected] 1 participant 12 messages Jan 23, 2023 Real time clock (RTC)

lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 1/12 rtc: rx8010: use IRQ flags obtained from fwnode

From: Alexandre Belloni <[email protected]>

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.

---
 drivers/rtc/rtc-rx8010.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/rtc/rtc-rx8010.c +6 -1
index 5e2fd39f70bb..b9c8dad26208 100644
@@ -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");
Signature · 1 line
2.39.1
author maintainer
#1 lore raw

PATCH 2/12 rtc: ab-eoz9: use IRQ flags obtained from fwnode

From: Alexandre Belloni <[email protected]>

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.

---
 drivers/rtc/rtc-ab-eoz9.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/rtc/rtc-ab-eoz9.c +6 -1
index 2f8deb8c4cd3..34611f6dedcb 100644
@@ -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");
Signature · 1 line
2.39.1
author maintainer
#2 lore raw

PATCH 3/12 rtc: hym8563: use IRQ flags obtained from fwnode

In reply to [email protected]

From: Alexandre Belloni <[email protected]>

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.

---
 drivers/rtc/rtc-hym8563.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/rtc/rtc-hym8563.c +6 -1
index cc710d682121..7d5a298a9a3b 100644
@@ -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",
Signature · 1 line
2.39.1
author maintainer
#3 lore raw

PATCH 4/12 rtc: m41t80: use IRQ flags obtained from fwnode

In reply to [email protected]

From: Alexandre Belloni <[email protected]>

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.

---
 drivers/rtc/rtc-m41t80.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/rtc/rtc-m41t80.c +6 -1
index 494052dbd39f..c1963f7c424d 100644
@@ -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");
Signature · 1 line
2.39.1
author maintainer
#4 lore raw

PATCH 5/12 rtc: pcf2123: use IRQ flags obtained from fwnode

In reply to [email protected]

From: Alexandre Belloni <[email protected]>

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.

---
 drivers/rtc/rtc-pcf2123.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/rtc/rtc-pcf2123.c +6 -1
index e13b5e695d06..e714661e61a9 100644
@@ -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);
Signature · 1 line
2.39.1
author maintainer
#5 lore raw

PATCH 6/12 rtc: pcf85063: use IRQ flags obtained from fwnode

In reply to [email protected]

From: Alexandre Belloni <[email protected]>

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.

---
 drivers/rtc/rtc-pcf85063.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/rtc/rtc-pcf85063.c +6 -1
index 754e03984f98..71a456355981 100644
@@ -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,
Signature · 1 line
2.39.1
author maintainer
#6 lore raw

PATCH 7/12 rtc: pcf8523: use IRQ flags obtained from fwnode

In reply to [email protected]

From: Alexandre Belloni <[email protected]>

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.

---
 drivers/rtc/rtc-pcf8523.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/rtc/rtc-pcf8523.c +6 -1
index 92de99f11a7a..2e111cdb94f7 100644
@@ -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;
Signature · 1 line
2.39.1
author maintainer
#7 lore raw

PATCH 8/12 rtc: pcf85363: use IRQ flags obtained fromfwnode

In reply to [email protected]

From: Alexandre Belloni <[email protected]>

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.

---
 drivers/rtc/rtc-pcf85363.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/rtc/rtc-pcf85363.c +6 -1
index c05b722f0060..5de323acd178 100644
@@ -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");
Signature · 1 line
2.39.1
author maintainer
#8 lore raw

PATCH 9/12 rtc: pcf8563: use IRQ flags obtained from fwnode

In reply to [email protected]

From: Alexandre Belloni <[email protected]>

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.

---
 drivers/rtc/rtc-pcf8563.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/rtc/rtc-pcf8563.c +6 -1
index 0a7fd9478465..7e720472213c 100644
@@ -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",
Signature · 1 line
2.39.1
author maintainer
#9 lore raw

PATCH 10/12 rtc: rv3029c2: use IRQ flags obtained from fwnode

In reply to [email protected]

From: Alexandre Belloni <[email protected]>

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.

---
 drivers/rtc/rtc-rv3029c2.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/rtc/rtc-rv3029c2.c +6 -1
index e4fdd47ae066..0852f6709a85 100644
@@ -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");
Signature · 1 line
2.39.1
author maintainer
#10 lore raw

PATCH 11/12 rtc: rv3032: use IRQ flags obtained from fwnode

In reply to [email protected]

From: Alexandre Belloni <[email protected]>

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.

---
 drivers/rtc/rtc-rv3032.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/rtc/rtc-rv3032.c +6 -1
index c3bee305eacc..bf6954ec5943 100644
@@ -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");
Signature · 1 line
2.39.1
author maintainer
#11 lore raw

PATCH 12/12 rtc: rv8803: use IRQ flags obtained from fwnode

In reply to [email protected]

From: Alexandre Belloni <[email protected]>

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.

---
 drivers/rtc/rtc-rv8803.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/rtc/rtc-rv8803.c +6 -1
index b581b6d5ad73..53d1de01b719 100644
@@ -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");
Signature · 1 line
2.39.1