diff mbox series

[v2,1/2] gpio: merrifield: Switch over to MSI interrupts

Message ID 20200408154155.68310-1-andriy.shevchenko@linux.intel.com
State New
Headers show
Series [v2,1/2] gpio: merrifield: Switch over to MSI interrupts | expand

Commit Message

Andy Shevchenko April 8, 2020, 3:41 p.m. UTC
Some devices may support MSI interrupts. Let's at least try to use them
in platforms that provide MSI capability.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
v2: fix slipped compilation error
 drivers/gpio/gpio-merrifield.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Linus Walleij April 16, 2020, 10:50 a.m. UTC | #1
On Wed, Apr 8, 2020 at 5:41 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:

> Some devices may support MSI interrupts. Let's at least try to use them
> in platforms that provide MSI capability.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Patch applied.

Yours,
Linus Walleij
Andy Shevchenko April 16, 2020, 11:35 a.m. UTC | #2
On Thu, Apr 16, 2020 at 12:50:43PM +0200, Linus Walleij wrote:
> On Wed, Apr 8, 2020 at 5:41 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> 
> > Some devices may support MSI interrupts. Let's at least try to use them
> > in platforms that provide MSI capability.
> >
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> Patch applied.

Can we return to established scheme when we send a PR to you? Or you think
better not to do like that anymore?
Linus Walleij April 16, 2020, 12:16 p.m. UTC | #3
On Thu, Apr 16, 2020 at 1:35 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> On Thu, Apr 16, 2020 at 12:50:43PM +0200, Linus Walleij wrote:
> > On Wed, Apr 8, 2020 at 5:41 PM Andy Shevchenko
> > <andriy.shevchenko@linux.intel.com> wrote:
> >
> > > Some devices may support MSI interrupts. Let's at least try to use them
> > > in platforms that provide MSI capability.
> > >
> > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> >
> > Patch applied.
>
> Can we return to established scheme when we send a PR to you? Or you think
> better not to do like that anymore?

No problem, I haven't pushed this out or anything, I will drop these.

Yours,
Linus Walleij
Andy Shevchenko April 16, 2020, 12:31 p.m. UTC | #4
On Thu, Apr 16, 2020 at 02:16:36PM +0200, Linus Walleij wrote:
> On Thu, Apr 16, 2020 at 1:35 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> > On Thu, Apr 16, 2020 at 12:50:43PM +0200, Linus Walleij wrote:
> > > On Wed, Apr 8, 2020 at 5:41 PM Andy Shevchenko
> > > <andriy.shevchenko@linux.intel.com> wrote:
> > >
> > > > Some devices may support MSI interrupts. Let's at least try to use them
> > > > in platforms that provide MSI capability.
> > > >
> > > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > >
> > > Patch applied.
> >
> > Can we return to established scheme when we send a PR to you? Or you think
> > better not to do like that anymore?
> 
> No problem, I haven't pushed this out or anything, I will drop these.

Thank you. Let's keep it the way we agreed before, i.e. PR for Intel GPIO
drivers. For this cycle it seems PCH and Merrifield ones to the date.
diff mbox series

Patch

diff --git a/drivers/gpio/gpio-merrifield.c b/drivers/gpio/gpio-merrifield.c
index 48918a016cd8..11e6ea70568a 100644
--- a/drivers/gpio/gpio-merrifield.c
+++ b/drivers/gpio/gpio-merrifield.c
@@ -473,6 +473,10 @@  static int mrfld_gpio_probe(struct pci_dev *pdev, const struct pci_device_id *id
 
 	raw_spin_lock_init(&priv->lock);
 
+	retval = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_ALL_TYPES);
+	if (retval < 0)
+		return retval;
+
 	girq = &priv->chip.irq;
 	girq->chip = &mrfld_irqchip;
 	girq->init_hw = mrfld_irq_init_hw;
@@ -482,7 +486,7 @@  static int mrfld_gpio_probe(struct pci_dev *pdev, const struct pci_device_id *id
 				     sizeof(*girq->parents), GFP_KERNEL);
 	if (!girq->parents)
 		return -ENOMEM;
-	girq->parents[0] = pdev->irq;
+	girq->parents[0] = pci_irq_vector(pdev, 0);
 	girq->first = irq_base;
 	girq->default_type = IRQ_TYPE_NONE;
 	girq->handler = handle_bad_irq;