diff mbox

[1/1] i2c: designware-pci: use IRQF_COND_SUSPEND flag

Message ID 1436350536-99102-1-git-send-email-andriy.shevchenko@linux.intel.com
State Accepted
Headers show

Commit Message

Andy Shevchenko July 8, 2015, 10:15 a.m. UTC
The mentioned flag fixes a warning on Intel Edison board since one of the I2C
controller shares IRQ line with watchdog timer.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/i2c/busses/i2c-designware-pcidrv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Andy Shevchenko July 27, 2015, 11:37 a.m. UTC | #1
On Wed, 2015-07-08 at 13:15 +0300, Andy Shevchenko wrote:
> 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?

> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/i2c/busses/i2c-designware-pcidrv.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c 
> b/drivers/i2c/busses/i2c-designware-pcidrv.c
> index 6643d2d..df23e8c 100644
> --- a/drivers/i2c/busses/i2c-designware-pcidrv.c
> +++ b/drivers/i2c/busses/i2c-designware-pcidrv.c
> @@ -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;
Wolfram Sang July 31, 2015, 10:07 a.m. UTC | #2
On Mon, Jul 27, 2015 at 02:37:23PM +0300, Andy Shevchenko wrote:
> On Wed, 2015-07-08 at 13:15 +0300, Andy Shevchenko wrote:
> > 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.

> 
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > ---
> >  drivers/i2c/busses/i2c-designware-pcidrv.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c 
> > b/drivers/i2c/busses/i2c-designware-pcidrv.c
> > index 6643d2d..df23e8c 100644
> > --- a/drivers/i2c/busses/i2c-designware-pcidrv.c
> > +++ b/drivers/i2c/busses/i2c-designware-pcidrv.c
> > @@ -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;
> 
> -- 
> Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Intel Finland Oy
Mika Westerberg July 31, 2015, 11:35 a.m. UTC | #3
On Fri, Jul 31, 2015 at 12:07:23PM +0200, Wolfram Sang wrote:
> On Mon, Jul 27, 2015 at 02:37:23PM +0300, Andy Shevchenko wrote:
> > On Wed, 2015-07-08 at 13:15 +0300, Andy Shevchenko wrote:
> > > 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,

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Wolfram Sang Aug. 1, 2015, 10:13 a.m. UTC | #4
On Wed, Jul 08, 2015 at 01:15:36PM +0300, Andy Shevchenko wrote:
> The mentioned flag fixes a warning on Intel Edison board since one of the I2C
> controller shares IRQ line with watchdog timer.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Applied to for-next, thanks!
diff mbox

Patch

diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c
index 6643d2d..df23e8c 100644
--- a/drivers/i2c/busses/i2c-designware-pcidrv.c
+++ b/drivers/i2c/busses/i2c-designware-pcidrv.c
@@ -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;