All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 6/7] gpio/langwell: find the irq domain mapping
@ 2012-10-16 19:23 Linus Walleij
  2012-10-17  7:26 ` Mika Westerberg
  0 siblings, 1 reply; 3+ messages in thread
From: Linus Walleij @ 2012-10-16 19:23 UTC (permalink / raw)
  To: linux-kernel
  Cc: Rob Herring, Grant Likely, Linus Walleij, Mika Westerberg, Adrian Hunter

Switch from creating the IRQ domain mapping to finding it. In this
case we know very well that the driver has created the apropriate
mapping, we just need to locate it, no need to create any
on-the-fly mappings.

Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/gpio/gpio-langwell.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-langwell.c b/drivers/gpio/gpio-langwell.c
index 202a992..0c88fc6 100644
--- a/drivers/gpio/gpio-langwell.c
+++ b/drivers/gpio/gpio-langwell.c
@@ -177,7 +177,7 @@ static int lnw_gpio_direction_output(struct gpio_chip *chip,
 static int lnw_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
 {
 	struct lnw_gpio *lnw = container_of(chip, struct lnw_gpio, chip);
-	return irq_create_mapping(lnw->domain, offset);
+	return irq_find_mapping(lnw->domain, offset);
 }
 
 static int lnw_irq_type(struct irq_data *d, unsigned type)
-- 
1.7.11.7


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

* Re: [PATCH 6/7] gpio/langwell: find the irq domain mapping
  2012-10-16 19:23 [PATCH 6/7] gpio/langwell: find the irq domain mapping Linus Walleij
@ 2012-10-17  7:26 ` Mika Westerberg
  2012-10-19 10:10   ` Linus Walleij
  0 siblings, 1 reply; 3+ messages in thread
From: Mika Westerberg @ 2012-10-17  7:26 UTC (permalink / raw)
  To: Linus Walleij; +Cc: linux-kernel, Rob Herring, Grant Likely, Adrian Hunter

On Tue, Oct 16, 2012 at 09:23:23PM +0200, Linus Walleij wrote:
> Switch from creating the IRQ domain mapping to finding it. In this
> case we know very well that the driver has created the apropriate
> mapping, we just need to locate it, no need to create any
> on-the-fly mappings.

I may be missing something but where in the driver we create the mappings
then? I couldn't find any place where it is done.

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

* Re: [PATCH 6/7] gpio/langwell: find the irq domain mapping
  2012-10-17  7:26 ` Mika Westerberg
@ 2012-10-19 10:10   ` Linus Walleij
  0 siblings, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2012-10-19 10:10 UTC (permalink / raw)
  To: Mika Westerberg; +Cc: linux-kernel, Rob Herring, Grant Likely, Adrian Hunter

On Wed, Oct 17, 2012 at 9:26 AM, Mika Westerberg
<mika.westerberg@linux.intel.com> wrote:
> On Tue, Oct 16, 2012 at 09:23:23PM +0200, Linus Walleij wrote:
>> Switch from creating the IRQ domain mapping to finding it. In this
>> case we know very well that the driver has created the apropriate
>> mapping, we just need to locate it, no need to create any
>> on-the-fly mappings.
>
> I may be missing something but where in the driver we create the mappings
> then? I couldn't find any place where it is done.

I think I got this backwards in my head.

I was under the impression that descriptors were pre-allocated in the
DT case. But now, you're right: for linear maps we have to call create*
atleast once.

Sorry... dropping this crap.

Yours,
Linus Walleij

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

end of thread, other threads:[~2012-10-19 10:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-16 19:23 [PATCH 6/7] gpio/langwell: find the irq domain mapping Linus Walleij
2012-10-17  7:26 ` Mika Westerberg
2012-10-19 10:10   ` Linus Walleij

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.