Thread (22 messages) 22 messages, 7 authors, 2011-02-06

[PATCH v3 2/2] Input: ads7846: use gpio_request_one to configure pendown_gpio

From: Sourav Poddar <hidden>
Date: 2011-02-03 15:21:46
Also in: linux-arm-kernel, linux-omap
Subsystem: input (keyboard, mouse, joystick, touchscreen) drivers, the rest · Maintainers: Dmitry Torokhov, Linus Torvalds

The ads7846 driver requests a gpio but does not currently
configure it explicitly as an input. Use gpio_request_one
to request and configure it at one shot.

Signed-off-by: Sourav Poddar <redacted>
Cc: Dmitry Torokhov <redacted>

---
 Links related to the previous discussions:
 http://permalink.gmane.org/gmane.linux.ports.arm.omap/51300

 drivers/input/touchscreen/ads7846.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index ce5baee..7480460 100644
--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -956,7 +956,8 @@ static int __devinit ads7846_setup_pendown(struct spi_device *spi, struct ads784
 		return 0;
 	}
 
-	err = gpio_request(pdata->gpio_pendown, "ads7846_pendown");
+	err = gpio_request_one(pdata->gpio_pendown, GPIOF_DIR_IN,
+						"ads7846_pendown");
 	if (err) {
 		dev_err(&spi->dev, "failed to request pendown GPIO%d\n",
 			pdata->gpio_pendown);
-- 
1.7.0.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help