All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] gpio: merrifield: Switch over to MSI interrupts
@ 2020-04-08 15:41 Andy Shevchenko
  2020-04-08 15:41 ` [PATCH v2 2/2] gpio: merrifield: Better show how GPIO and IRQ bases are derived from hardware Andy Shevchenko
  2020-04-16 10:50 ` [PATCH v2 1/2] gpio: merrifield: Switch over to MSI interrupts Linus Walleij
  0 siblings, 2 replies; 7+ messages in thread
From: Andy Shevchenko @ 2020-04-08 15:41 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, linux-gpio; +Cc: Andy Shevchenko

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

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;
-- 
2.25.1


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

* [PATCH v2 2/2] gpio: merrifield: Better show how GPIO and IRQ bases are derived from hardware
  2020-04-08 15:41 [PATCH v2 1/2] gpio: merrifield: Switch over to MSI interrupts Andy Shevchenko
@ 2020-04-08 15:41 ` Andy Shevchenko
  2020-04-16 10:51   ` Linus Walleij
  2020-04-16 10:50 ` [PATCH v2 1/2] gpio: merrifield: Switch over to MSI interrupts Linus Walleij
  1 sibling, 1 reply; 7+ messages in thread
From: Andy Shevchenko @ 2020-04-08 15:41 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, linux-gpio; +Cc: Andy Shevchenko

It's a bit hard to realize what the BAR1 is for and what is the layout
of the data in it. Be slightly more verbose to better show how GPIO and
IRQ bases are derived from the hardware.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
v2: no change
 drivers/gpio/gpio-merrifield.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpio/gpio-merrifield.c b/drivers/gpio/gpio-merrifield.c
index 11e6ea70568a..706687fab634 100644
--- a/drivers/gpio/gpio-merrifield.c
+++ b/drivers/gpio/gpio-merrifield.c
@@ -443,8 +443,8 @@ static int mrfld_gpio_probe(struct pci_dev *pdev, const struct pci_device_id *id
 
 	base = pcim_iomap_table(pdev)[1];
 
-	irq_base = readl(base);
-	gpio_base = readl(sizeof(u32) + base);
+	irq_base = readl(base + 0 * sizeof(u32));
+	gpio_base = readl(base + 1 * sizeof(u32));
 
 	/* Release the IO mapping, since we already get the info from BAR1 */
 	pcim_iounmap_regions(pdev, BIT(1));
-- 
2.25.1


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

* Re: [PATCH v2 1/2] gpio: merrifield: Switch over to MSI interrupts
  2020-04-08 15:41 [PATCH v2 1/2] gpio: merrifield: Switch over to MSI interrupts Andy Shevchenko
  2020-04-08 15:41 ` [PATCH v2 2/2] gpio: merrifield: Better show how GPIO and IRQ bases are derived from hardware Andy Shevchenko
@ 2020-04-16 10:50 ` Linus Walleij
  2020-04-16 11:35   ` Andy Shevchenko
  1 sibling, 1 reply; 7+ messages in thread
From: Linus Walleij @ 2020-04-16 10:50 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: Bartosz Golaszewski, open list:GPIO SUBSYSTEM

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

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

* Re: [PATCH v2 2/2] gpio: merrifield: Better show how GPIO and IRQ bases are derived from hardware
  2020-04-08 15:41 ` [PATCH v2 2/2] gpio: merrifield: Better show how GPIO and IRQ bases are derived from hardware Andy Shevchenko
@ 2020-04-16 10:51   ` Linus Walleij
  0 siblings, 0 replies; 7+ messages in thread
From: Linus Walleij @ 2020-04-16 10:51 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: Bartosz Golaszewski, open list:GPIO SUBSYSTEM

On Wed, Apr 8, 2020 at 5:41 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:

> It's a bit hard to realize what the BAR1 is for and what is the layout
> of the data in it. Be slightly more verbose to better show how GPIO and
> IRQ bases are derived from the hardware.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Patch applied.

Yours,
Linus Walleij

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

* Re: [PATCH v2 1/2] gpio: merrifield: Switch over to MSI interrupts
  2020-04-16 10:50 ` [PATCH v2 1/2] gpio: merrifield: Switch over to MSI interrupts Linus Walleij
@ 2020-04-16 11:35   ` Andy Shevchenko
  2020-04-16 12:16     ` Linus Walleij
  0 siblings, 1 reply; 7+ messages in thread
From: Andy Shevchenko @ 2020-04-16 11:35 UTC (permalink / raw)
  To: Linus Walleij; +Cc: Bartosz Golaszewski, open list:GPIO SUBSYSTEM

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?

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH v2 1/2] gpio: merrifield: Switch over to MSI interrupts
  2020-04-16 11:35   ` Andy Shevchenko
@ 2020-04-16 12:16     ` Linus Walleij
  2020-04-16 12:31       ` Andy Shevchenko
  0 siblings, 1 reply; 7+ messages in thread
From: Linus Walleij @ 2020-04-16 12:16 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: Bartosz Golaszewski, open list:GPIO SUBSYSTEM

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

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

* Re: [PATCH v2 1/2] gpio: merrifield: Switch over to MSI interrupts
  2020-04-16 12:16     ` Linus Walleij
@ 2020-04-16 12:31       ` Andy Shevchenko
  0 siblings, 0 replies; 7+ messages in thread
From: Andy Shevchenko @ 2020-04-16 12:31 UTC (permalink / raw)
  To: Linus Walleij; +Cc: Bartosz Golaszewski, open list:GPIO SUBSYSTEM

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.

-- 
With Best Regards,
Andy Shevchenko



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

end of thread, other threads:[~2020-04-16 12:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-08 15:41 [PATCH v2 1/2] gpio: merrifield: Switch over to MSI interrupts Andy Shevchenko
2020-04-08 15:41 ` [PATCH v2 2/2] gpio: merrifield: Better show how GPIO and IRQ bases are derived from hardware Andy Shevchenko
2020-04-16 10:51   ` Linus Walleij
2020-04-16 10:50 ` [PATCH v2 1/2] gpio: merrifield: Switch over to MSI interrupts Linus Walleij
2020-04-16 11:35   ` Andy Shevchenko
2020-04-16 12:16     ` Linus Walleij
2020-04-16 12:31       ` Andy Shevchenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.