Re: [PATCH v3 5/5] pinctrl/lantiq: Implement gpio_chip.to_irq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Thu, Nov 26, 2015 at 11:00 AM, Martin Schiller <mschiller@xxxxxx> wrote:

Please write a commit message.

> From: John Crispin <blogic@xxxxxxxxxxx>
>
> Signed-off-by: John Crispin <blogic@xxxxxxxxxxx>
> Signed-off-by: Martin Schiller <mschiller@xxxxxx>
> ---
> Changes in v3:
> - Moved this change into a separate patch

(...)
> +static int xway_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
> +{
> +       struct ltq_pinmux_info *info = dev_get_drvdata(chip->dev);
> +       int i;
> +
> +       for (i = 0; i < info->num_exin; i++)
> +               if (info->exin[i] == offset)
> +                       return ltq_eiu_get_irq(i);
> +
> +       return -1;
> +}
> +
(...)
> +       .to_irq = xway_gpio_to_irq,

Can you explain this a bit, and add a comment in the code as to
what is going on?

I take it that the Lantiq has a dedicated IRQ line for some of the
GPIO lines, referred to as external interrupts, and then you just
go in and grab that frm the external interrupt unit like this?

Looks OK, just send an updated patch with some more
explanations.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux