From: "Poddar, Sourav" <sourav.poddar@ti.com>
To: "Varadarajan, Charulatha" <charu@ti.com>
Cc: dmitry.torokhov@gmail.com, linux-omap@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, gadiyar@ti.com,
linux-input@vger.kernel.org, balbi@ti.com
Subject: Re: [PATCHv2 2/2] Input: ads7846 - configure pendown gpio as input
Date: Thu, 3 Feb 2011 18:31:24 +0530 [thread overview]
Message-ID: <AANLkTi=m1o2Fsw1OvCmZWJxmok2KCtCZp3F4aM7KmPch@mail.gmail.com> (raw)
In-Reply-To: <AANLkTi=J5dJ4N4_57fh0_HKmqfyo6C_tMs3BrnXHWQjq@mail.gmail.com>
On Thu, Feb 3, 2011 at 3:34 PM, Varadarajan, Charulatha <charu@ti.com> wrote:
> Sourav,
>
> On Thu, Feb 3, 2011 at 15:28, Felipe Balbi <balbi@ti.com> wrote:
>> On Thu, Feb 03, 2011 at 03:18:50PM +0530, Sourav Poddar wrote:
>>> The ads7846 driver requests a gpio to detect pendown events,
>>> but does not configure its direction. Configure this gpio
>>> as an input after requesting it.
>>>
>>> Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
>>> ---
>>> changes between v2 and v1: Added return error support in v2.
>>>
>>> drivers/input/touchscreen/ads7846.c | 7 +++++++
>>> 1 files changed, 7 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
>>> index 036f245..f30768b 100644
>>> --- a/drivers/input/touchscreen/ads7846.c
>>> +++ b/drivers/input/touchscreen/ads7846.c
>>> @@ -962,6 +962,13 @@ static int __devinit ads7846_setup_pendown(struct spi_device *spi, struct ads784
>>> return err;
>>> }
>>>
>>> + err = gpio_direction_input(pdata->gpio_pendown);
>>> + if (err) {
>>> + dev_err(&spi->dev, "failed to configure pendown GPIO input direction %d\n",
>>> + pdata->gpio_pendown);
>>> + return err;
>>
>> and now you miss a gpio_free().
>
> My question to your previous version is still unanswered.
> Would it be relevant to add gpio_set_debounce() for this
> gpio?
>
I was also wondering that.I too think that just a request and then an
configuring direction would do.But,I am not so sure about this one.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2011-02-03 13:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-03 9:48 [PATCHv2 2/2] Input: ads7846 - configure pendown gpio as input Sourav Poddar
2011-02-03 9:58 ` Felipe Balbi
2011-02-03 10:04 ` Varadarajan, Charulatha
2011-02-03 13:01 ` Poddar, Sourav [this message]
2011-02-03 10:10 ` Wolfram Sang
2011-02-03 10:22 ` Felipe Balbi
2011-02-03 11:42 ` Poddar, Sourav
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='AANLkTi=m1o2Fsw1OvCmZWJxmok2KCtCZp3F4aM7KmPch@mail.gmail.com' \
--to=sourav.poddar@ti.com \
--cc=balbi@ti.com \
--cc=charu@ti.com \
--cc=dmitry.torokhov@gmail.com \
--cc=gadiyar@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-omap@vger.kernel.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 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).