From: Sekhar Nori <nsekhar-l0cyMroinI0@public.gmane.org>
To: Prabhakar Lad
<prabhakar.csengg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Linus Walleij
<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Grygorii Strashko
<grygorii.strashko-l0cyMroinI0@public.gmane.org>
Cc: linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
DLOS
<davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org>,
LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
LAK
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: [PATCH 1/2] gpio: davinci: Fix a check for unbanked gpio
Date: Tue, 12 Nov 2013 11:48:19 +0530 [thread overview]
Message-ID: <5281C82B.9090402@ti.com> (raw)
In-Reply-To: <1383893156-28010-2-git-send-email-prabhakar.csengg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
On Friday 08 November 2013 12:15 PM, Prabhakar Lad wrote:
> From: "Lad, Prabhakar" <prabhakar.csengg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>
> This patch fixes a check for offset in gpio_to_irq_unbanked()
> and also assigns gpio_irq, gpio_unbanked of chips[0] to
> appropriate values which is used in gpio_to_irq_unbanked()
> function.
>
> Reported-by: Grygorii Strashko <grygorii.strashko-l0cyMroinI0@public.gmane.org>
> Signed-off-by: Lad, Prabhakar <prabhakar.csengg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
You should note explicitly that this patch fixes broken unbanked IRQ
support. You mostly just described what you are doing.
I will fixup while committing.
Thanks,
Sekhar
> ---
> drivers/gpio/gpio-davinci.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
> index 8847adf..84be701 100644
> --- a/drivers/gpio/gpio-davinci.c
> +++ b/drivers/gpio/gpio-davinci.c
> @@ -327,7 +327,7 @@ static int gpio_to_irq_unbanked(struct gpio_chip *chip, unsigned offset)
> * NOTE: we assume for now that only irqs in the first gpio_chip
> * can provide direct-mapped IRQs to AINTC (up to 32 GPIOs).
> */
> - if (offset < d->irq_base)
> + if (offset < d->gpio_unbanked)
> return d->gpio_irq + offset;
> else
> return -ENODEV;
> @@ -419,6 +419,8 @@ static int davinci_gpio_irq_setup(struct platform_device *pdev)
>
> /* pass "bank 0" GPIO IRQs to AINTC */
> chips[0].chip.to_irq = gpio_to_irq_unbanked;
> + chips[0].gpio_irq = bank_irq;
> + chips[0].gpio_unbanked = pdata->gpio_unbanked;
> binten = BIT(0);
>
> /* AINTC handles mask/unmask; GPIO handles triggering */
>
WARNING: multiple messages have this Message-ID (diff)
From: nsekhar@ti.com (Sekhar Nori)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] gpio: davinci: Fix a check for unbanked gpio
Date: Tue, 12 Nov 2013 11:48:19 +0530 [thread overview]
Message-ID: <5281C82B.9090402@ti.com> (raw)
In-Reply-To: <1383893156-28010-2-git-send-email-prabhakar.csengg@gmail.com>
On Friday 08 November 2013 12:15 PM, Prabhakar Lad wrote:
> From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
>
> This patch fixes a check for offset in gpio_to_irq_unbanked()
> and also assigns gpio_irq, gpio_unbanked of chips[0] to
> appropriate values which is used in gpio_to_irq_unbanked()
> function.
>
> Reported-by: Grygorii Strashko <grygorii.strashko@ti.com>
> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
You should note explicitly that this patch fixes broken unbanked IRQ
support. You mostly just described what you are doing.
I will fixup while committing.
Thanks,
Sekhar
> ---
> drivers/gpio/gpio-davinci.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
> index 8847adf..84be701 100644
> --- a/drivers/gpio/gpio-davinci.c
> +++ b/drivers/gpio/gpio-davinci.c
> @@ -327,7 +327,7 @@ static int gpio_to_irq_unbanked(struct gpio_chip *chip, unsigned offset)
> * NOTE: we assume for now that only irqs in the first gpio_chip
> * can provide direct-mapped IRQs to AINTC (up to 32 GPIOs).
> */
> - if (offset < d->irq_base)
> + if (offset < d->gpio_unbanked)
> return d->gpio_irq + offset;
> else
> return -ENODEV;
> @@ -419,6 +419,8 @@ static int davinci_gpio_irq_setup(struct platform_device *pdev)
>
> /* pass "bank 0" GPIO IRQs to AINTC */
> chips[0].chip.to_irq = gpio_to_irq_unbanked;
> + chips[0].gpio_irq = bank_irq;
> + chips[0].gpio_unbanked = pdata->gpio_unbanked;
> binten = BIT(0);
>
> /* AINTC handles mask/unmask; GPIO handles triggering */
>
WARNING: multiple messages have this Message-ID (diff)
From: Sekhar Nori <nsekhar@ti.com>
To: Prabhakar Lad <prabhakar.csengg@gmail.com>,
Linus Walleij <linus.walleij@linaro.org>,
Grygorii Strashko <grygorii.strashko@ti.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
DLOS <davinci-linux-open-source@linux.davincidsp.com>,
LAK <linux-arm-kernel@lists.infradead.org>,
<linux-gpio@vger.kernel.org>
Subject: Re: [PATCH 1/2] gpio: davinci: Fix a check for unbanked gpio
Date: Tue, 12 Nov 2013 11:48:19 +0530 [thread overview]
Message-ID: <5281C82B.9090402@ti.com> (raw)
In-Reply-To: <1383893156-28010-2-git-send-email-prabhakar.csengg@gmail.com>
On Friday 08 November 2013 12:15 PM, Prabhakar Lad wrote:
> From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
>
> This patch fixes a check for offset in gpio_to_irq_unbanked()
> and also assigns gpio_irq, gpio_unbanked of chips[0] to
> appropriate values which is used in gpio_to_irq_unbanked()
> function.
>
> Reported-by: Grygorii Strashko <grygorii.strashko@ti.com>
> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
You should note explicitly that this patch fixes broken unbanked IRQ
support. You mostly just described what you are doing.
I will fixup while committing.
Thanks,
Sekhar
> ---
> drivers/gpio/gpio-davinci.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
> index 8847adf..84be701 100644
> --- a/drivers/gpio/gpio-davinci.c
> +++ b/drivers/gpio/gpio-davinci.c
> @@ -327,7 +327,7 @@ static int gpio_to_irq_unbanked(struct gpio_chip *chip, unsigned offset)
> * NOTE: we assume for now that only irqs in the first gpio_chip
> * can provide direct-mapped IRQs to AINTC (up to 32 GPIOs).
> */
> - if (offset < d->irq_base)
> + if (offset < d->gpio_unbanked)
> return d->gpio_irq + offset;
> else
> return -ENODEV;
> @@ -419,6 +419,8 @@ static int davinci_gpio_irq_setup(struct platform_device *pdev)
>
> /* pass "bank 0" GPIO IRQs to AINTC */
> chips[0].chip.to_irq = gpio_to_irq_unbanked;
> + chips[0].gpio_irq = bank_irq;
> + chips[0].gpio_unbanked = pdata->gpio_unbanked;
> binten = BIT(0);
>
> /* AINTC handles mask/unmask; GPIO handles triggering */
>
next prev parent reply other threads:[~2013-11-12 6:18 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-08 6:45 [PATCH 0/2] DaVinci: GPIO: fixes Prabhakar Lad
2013-11-08 6:45 ` Prabhakar Lad
2013-11-08 6:45 ` [PATCH 1/2] gpio: davinci: Fix a check for unbanked gpio Prabhakar Lad
2013-11-08 6:45 ` Prabhakar Lad
[not found] ` <1383893156-28010-2-git-send-email-prabhakar.csengg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-11-12 6:18 ` Sekhar Nori [this message]
2013-11-12 6:18 ` Sekhar Nori
2013-11-12 6:18 ` Sekhar Nori
2013-11-18 10:48 ` Linus Walleij
2013-11-18 10:48 ` Linus Walleij
2013-11-20 14:13 ` Sekhar Nori
2013-11-20 14:13 ` Sekhar Nori
2013-11-08 6:45 ` [PATCH 2/2] ARM: davinci: Fix number of resources passed to davinci_gpio_register() call Prabhakar Lad
2013-11-08 6:45 ` Prabhakar Lad
[not found] ` <1383893156-28010-1-git-send-email-prabhakar.csengg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-11-11 15:43 ` [PATCH 0/2] DaVinci: GPIO: fixes Grygorii Strashko
2013-11-11 15:43 ` Grygorii Strashko
2013-11-11 15:43 ` Grygorii Strashko
[not found] ` <5280FB19.4020204-l0cyMroinI0@public.gmane.org>
2013-11-11 15:49 ` Prabhakar Lad
2013-11-12 6:18 ` Sekhar Nori
2013-11-12 6:18 ` Sekhar Nori
2013-11-12 6:18 ` Sekhar Nori
[not found] ` <5281C839.8070100-l0cyMroinI0@public.gmane.org>
2013-11-12 8:39 ` Grygorii Strashko
2013-11-12 8:39 ` Grygorii Strashko
2013-11-12 8:39 ` Grygorii Strashko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5281C82B.9090402@ti.com \
--to=nsekhar-l0cymroini0@public.gmane.org \
--cc=davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org \
--cc=grygorii.strashko-l0cyMroinI0@public.gmane.org \
--cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=prabhakar.csengg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.