linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Igor Grinberg <grinberg@compulab.co.il>
Cc: linux-input@vger.kernel.org
Subject: Re: [PATCH] input: ads7846: fix gpio_pendown configuration
Date: Thu, 5 May 2011 09:13:56 -0700	[thread overview]
Message-ID: <20110505161356.GF27251@core.coreip.homeip.net> (raw)
In-Reply-To: <4DC0F558.90705@compulab.co.il>

On Wed, May 04, 2011 at 09:42:32AM +0300, Igor Grinberg wrote:
> On 05/03/11 19:18, Dmitry Torokhov wrote:
> 
> > On Tue, May 03, 2011 at 07:02:53PM +0300, Igor Grinberg wrote:
> >> The pendown gpio was requested but not configured for input.
> >> Request and configure it in one shot.
> >>
> >> Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
> > There is no significant change from the previos version of the patch by
> > Sourav Poddar that I tried to apply and had to revert. Does it compile
> > if !CONFIG_GENERIC_GPIO?
> 
> shout!?!? It has been just several month we had this discussion,
> but I've completely forgot it took place... shame on me...
> 
> Back to business, either way, the gpio direction must be configured
> before accessing the gpio.
> I can propose two solutions to this:
> 1) ads7846 relies on gpio subsystem, so add depend on
>    CONFIG_GENERIC_GPIO to Kconfig ads7846 entry.
> 2) just don't use gpio_request_one(),
>    but gpio_request() and then gpio_direction_input().
> 
> Logic behind 1 is that platforms that don't use CONFIG_GENERIC_GPIO
> most likely don't use ads7846. Anybody know of such platform?
> The second one is less intrusive and more local, but will do the job.
> 
> What do you think is more preferable?

I'd prefer adding gpio_direction_input(). While I do not know of
instances where ads7846 is used without CONFIG_GENERIC_GPIO it does not
mean they do not exist.

Thanks,

-- 
Dmitry

  reply	other threads:[~2011-05-05 16:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-03 16:02 [PATCH] input: ads7846: fix gpio_pendown configuration Igor Grinberg
2011-05-03 16:18 ` Dmitry Torokhov
2011-05-04  6:42   ` Igor Grinberg
2011-05-05 16:13     ` Dmitry Torokhov [this message]
2011-05-08  8:44       ` [PATCH v2] " Igor Grinberg
2011-05-11 22:44         ` Dmitry Torokhov

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=20110505161356.GF27251@core.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=grinberg@compulab.co.il \
    --cc=linux-input@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).