linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Stein <alexanders83@web.de>
To: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-input@vger.kernel.org
Subject: Re: Re: [PATCH] gpio/at91: free GPIO after configuring as input
Date: Fri, 11 Apr 2014 17:45:31 +0200	[thread overview]
Message-ID: <4406073.7Z2odFudGD@kongar> (raw)
In-Reply-To: <A08D29A3-2690-46C1-A317-41B17F365A81@jcrosoft.com>

I'm CC'ing some input guys if this can't be solved in the pinctrl/irq side.

On Friday 11 April 2014, 23:30:33 wrote Jean-Christophe PLAGNIOL-VILLARD:
> 
> On Apr 11, 2014, at 10:24 PM, Alexander Stein <alexanders83@web.de> wrote:
> 
> > 
> > If the GPIO stays requested a device driver can't request it again.
> > e.g. Without this patch the ads7846 driver returns the following error:
> > ads7846 spi32766.3: failed to request/setup pendown GPIO15: -16
> > ads7846: probe of spi32766.3 failed with error -16
> > 
> > /sys/kernel/debug/gpio shows this:
> > GPIOs 0-31, platform/fffff200.gpio, fffff200.gpio:
> > [/ahb/apb/pinctrl@fffff200/gpio@fffff200] GPIOfffff200.gpio15: [gpio] set
> > 
> > Signed-off-by: Alexander Stein <alexanders83@web.de>
> > ---
> > I'm aware that it makes sense this GPIO is/stays requested, but either the
> > pinctl or device driver have to be adjusted as both can't request this GPIO.
> > I think the latter shouldn't change.
> > 
> > drivers/pinctrl/pinctrl-at91.c | 2 ++
> > 1 file changed, 2 insertions(+)
> > 
> > diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
> > index d990e33..63176f2 100644
> > --- a/drivers/pinctrl/pinctrl-at91.c
> > +++ b/drivers/pinctrl/pinctrl-at91.c
> > @@ -1493,6 +1493,8 @@ static int at91_gpio_irq_domain_xlate(struct irq_domain *d,
> > 	if (ret)
> > 		return ret;
> > 
> > +	gpio_free(pin);
> > +
> 
> NACK it the whole key point the gpio use as a IRQ so the irq generic code request it
> > 	return 0;
> > }
> > 
> 


       reply	other threads:[~2014-04-11 15:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1397226249-3922-1-git-send-email-alexanders83@web.de>
     [not found] ` <A08D29A3-2690-46C1-A317-41B17F365A81@jcrosoft.com>
2014-04-11 15:45   ` Alexander Stein [this message]
2014-04-11 17:28     ` Re: [PATCH] gpio/at91: free GPIO after configuring as input Javier Martinez Canillas
2014-04-12 22:48       ` Alexandre Belloni

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=4406073.7Z2odFudGD@kongar \
    --to=alexanders83@web.de \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-input@vger.kernel.org \
    --cc=plagnioj@jcrosoft.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).