From: Igor Grinberg <grinberg@compulab.co.il>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org, Igor Grinberg <grinberg@compulab.co.il>
Subject: [PATCH v2] input: ads7846: fix gpio_pendown configuration
Date: Sun, 8 May 2011 11:44:50 +0300 [thread overview]
Message-ID: <1304844290-31233-1-git-send-email-grinberg@compulab.co.il> (raw)
In-Reply-To: <20110505161356.GF27251@core.coreip.homeip.net>
The pendown gpio was requested but not configured for input.
Configure it for input.
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
---
v2: add a separate gpio_direction_input() call
instead of a single gpio_request_one() call
so the driver will compile with !CONFIG_GENERIC_GPIO
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 1de1c19..886ec55 100644
--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -969,6 +969,13 @@ static int __devinit ads7846_setup_pendown(struct spi_device *spi, struct ads784
pdata->gpio_pendown);
return err;
}
+ err = gpio_direction_input(pdata->gpio_pendown);
+ if (err) {
+ dev_err(&spi->dev, "failed to setup pendown GPIO%d\n",
+ pdata->gpio_pendown);
+ gpio_free(pdata->gpio_pendown);
+ return err;
+ }
ts->gpio_pendown = pdata->gpio_pendown;
--
1.7.3.4
next prev parent reply other threads:[~2011-05-08 8:44 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
2011-05-08 8:44 ` Igor Grinberg [this message]
2011-05-11 22:44 ` [PATCH v2] " 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=1304844290-31233-1-git-send-email-grinberg@compulab.co.il \
--to=grinberg@compulab.co.il \
--cc=dmitry.torokhov@gmail.com \
--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).