From: Grygorii Strashko <grygorii.strashko@ti.com>
To: Rabin Vincent <rabin@rab.in>, linus.walleij@linaro.org, gnurou@gmail.com
Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] gpio: don't override irq_*_resources() callbacks
Date: Fri, 31 Jul 2015 17:54:27 +0300 [thread overview]
Message-ID: <55BB8C23.1050200@ti.com> (raw)
In-Reply-To: <1438346937-9020-1-git-send-email-rabin@rab.in>
On 07/31/2015 03:48 PM, Rabin Vincent wrote:
> If the driver has specified its own irq_{request/release}_resources()
> functions, don't override them. The gpio-etraxfs driver will use this.
>
> Signed-off-by: Rabin Vincent <rabin@rab.in>
> ---
> drivers/gpio/gpiolib.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
> index bf4bd1d..6865874 100644
> --- a/drivers/gpio/gpiolib.c
> +++ b/drivers/gpio/gpiolib.c
> @@ -636,8 +636,12 @@ int gpiochip_irqchip_add(struct gpio_chip *gpiochip,
> gpiochip->irqchip = NULL;
> return -EINVAL;
> }
> - irqchip->irq_request_resources = gpiochip_irq_reqres;
> - irqchip->irq_release_resources = gpiochip_irq_relres;
> +
> + if (!irqchip->irq_request_resources &&
> + !irqchip->irq_release_resources) {
> + irqchip->irq_request_resources = gpiochip_irq_reqres;
> + irqchip->irq_release_resources = gpiochip_irq_relres;
> + }
I think, it will be better to handle req/rel cases separately.
>
> /*
> * Prepare the mapping since the irqchip shall be orthogonal to
>
Nice, thanks. I need the same actually, but I propose to make
gpiochip_irq_reqres/gpiochip_irq_relres public also, so drivers can re-use them.
--
regards,
-grygorii
WARNING: multiple messages have this Message-ID (diff)
From: Grygorii Strashko <grygorii.strashko@ti.com>
To: Rabin Vincent <rabin@rab.in>, <linus.walleij@linaro.org>,
<gnurou@gmail.com>
Cc: <linux-gpio@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] gpio: don't override irq_*_resources() callbacks
Date: Fri, 31 Jul 2015 17:54:27 +0300 [thread overview]
Message-ID: <55BB8C23.1050200@ti.com> (raw)
In-Reply-To: <1438346937-9020-1-git-send-email-rabin@rab.in>
On 07/31/2015 03:48 PM, Rabin Vincent wrote:
> If the driver has specified its own irq_{request/release}_resources()
> functions, don't override them. The gpio-etraxfs driver will use this.
>
> Signed-off-by: Rabin Vincent <rabin@rab.in>
> ---
> drivers/gpio/gpiolib.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
> index bf4bd1d..6865874 100644
> --- a/drivers/gpio/gpiolib.c
> +++ b/drivers/gpio/gpiolib.c
> @@ -636,8 +636,12 @@ int gpiochip_irqchip_add(struct gpio_chip *gpiochip,
> gpiochip->irqchip = NULL;
> return -EINVAL;
> }
> - irqchip->irq_request_resources = gpiochip_irq_reqres;
> - irqchip->irq_release_resources = gpiochip_irq_relres;
> +
> + if (!irqchip->irq_request_resources &&
> + !irqchip->irq_release_resources) {
> + irqchip->irq_request_resources = gpiochip_irq_reqres;
> + irqchip->irq_release_resources = gpiochip_irq_relres;
> + }
I think, it will be better to handle req/rel cases separately.
>
> /*
> * Prepare the mapping since the irqchip shall be orthogonal to
>
Nice, thanks. I need the same actually, but I propose to make
gpiochip_irq_reqres/gpiochip_irq_relres public also, so drivers can re-use them.
--
regards,
-grygorii
next prev parent reply other threads:[~2015-07-31 14:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-31 12:48 [PATCH 1/2] gpio: don't override irq_*_resources() callbacks Rabin Vincent
2015-07-31 12:48 ` [PATCH 2/2] gpio: etraxfs: add interrupt support Rabin Vincent
2015-08-03 8:58 ` Linus Walleij
2015-08-03 9:34 ` Linus Walleij
2015-08-03 17:30 ` Rabin Vincent
2015-08-13 8:57 ` Linus Walleij
2015-07-31 14:54 ` Grygorii Strashko [this message]
2015-07-31 14:54 ` [PATCH 1/2] gpio: don't override irq_*_resources() callbacks Grygorii Strashko
2015-08-03 8:56 ` Linus Walleij
2015-08-03 8:53 ` Linus Walleij
2015-08-17 8:40 ` Geert Uytterhoeven
2015-08-17 13:23 ` Linus Walleij
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=55BB8C23.1050200@ti.com \
--to=grygorii.strashko@ti.com \
--cc=gnurou@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rabin@rab.in \
/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.