Skip to contentSkip to conversation

i2c: designware-pci: use IRQF_COND_SUSPEND flag

PATCH Applied Andy Shevchenko 3 participants 5 messages Jul 8, 2015 – Aug 1, 2015 2 messages not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c: designware-pci: use IRQF_COND_SUSPEND flag

The mentioned flag fixes a warning on Intel Edison board since one of the I2C controller shares IRQ line with watchdog timer.

---
 drivers/i2c/busses/i2c-designware-pcidrv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/i2c/busses/i2c-designware-pcidrv.c +2 -2
index 6643d2d..df23e8c 100644
@@ -260,8 +260,8 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev,
 
 	snprintf(adap->name, sizeof(adap->name), "i2c-designware-pci");
 
-	r = devm_request_irq(&pdev->dev, pdev->irq, i2c_dw_isr, IRQF_SHARED,
-			adap->name, dev);
+	r = devm_request_irq(&pdev->dev, pdev->irq, i2c_dw_isr,
+			IRQF_SHARED | IRQF_COND_SUSPEND, adap->name, dev);
 	if (r) {
 		dev_err(&pdev->dev, "failure requesting irq %i\n", dev->irq);
 		return r;
Signature · 1 line
2.1.4
#2 lore raw
In reply to a message not in the archive
Quoted 4 lines · Andy Shevchenko

The mentioned flag fixes a warning on Intel Edison board since one of the I2C
controller shares IRQ line with watchdog timer.

Wolfram, do you have any comments on this?

Quoted 25 lines
---
 drivers/i2c/busses/i2c-designware-pcidrv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/i2c/busses/i2c-designware-pcidrv.c +2 -3
index 6643d2d..df23e8c 100644
@@ -260,8 +260,8 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev,
 
 	snprintf(adap->name, sizeof(adap->name), "i2c-designware
-pci");
 
-	r = devm_request_irq(&pdev->dev, pdev->irq, i2c_dw_isr, 
 IRQF_SHARED,
-			adap->name, dev);
+	r = devm_request_irq(&pdev->dev, pdev->irq, i2c_dw_isr,
+			IRQF_SHARED | IRQF_COND_SUSPEND, adap->name, 
 dev);
 	if (r) {
 		dev_err(&pdev->dev, "failure requesting irq %i\n", 

dev->irq);
return r;

Signature · 2 lines
Andy Shevchenko <andriy.shevchenko-VuQAYsv1563Yd54FQh9/[email protected]>
Intel Finland Oy
#4 lore raw
In reply to a message not in the archive
Quoted 7 lines · Andy Shevchenko
Quoted 4 lines · Andy Shevchenko

The mentioned flag fixes a warning on Intel Edison board since one of the I2C
controller shares IRQ line with watchdog timer.

Wolfram, do you have any comments on this?

Adding Mika to cc, he is more experienced with these platforms.

Quoted 30 lines
Quoted 26 lines
---
 drivers/i2c/busses/i2c-designware-pcidrv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/i2c/busses/i2c-designware-pcidrv.c +2 -3
index 6643d2d..df23e8c 100644
@@ -260,8 +260,8 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev,
 
 	snprintf(adap->name, sizeof(adap->name), "i2c-designware
-pci");
 
-	r = devm_request_irq(&pdev->dev, pdev->irq, i2c_dw_isr, 
 IRQF_SHARED,
-			adap->name, dev);
+	r = devm_request_irq(&pdev->dev, pdev->irq, i2c_dw_isr,
+			IRQF_SHARED | IRQF_COND_SUSPEND, adap->name, 
 dev);
 	if (r) {
 		dev_err(&pdev->dev, "failure requesting irq %i\n", 

dev->irq);
return r;

Signature · 2 lines
Andy Shevchenko <andriy.shevchenko-VuQAYsv1563Yd54FQh9/[email protected]>
Intel Finland Oy
#5 lore raw
Quoted 10 lines · Wolfram Sang
Quoted 7 lines · Andy Shevchenko
Quoted 4 lines · Andy Shevchenko

The mentioned flag fixes a warning on Intel Edison board since one of the I2C
controller shares IRQ line with watchdog timer.

Wolfram, do you have any comments on this?

Adding Mika to cc, he is more experienced with these platforms.

intel_mid_wdt.c requests the same IRQ with IRQF_NO_SUSPEND so this patch makes sense to me,