From patchwork Tue May 3 16:02:53 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Grinberg X-Patchwork-Id: 750482 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p43FxUoD014937 for ; Tue, 3 May 2011 16:03:00 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753296Ab1ECQC7 (ORCPT ); Tue, 3 May 2011 12:02:59 -0400 Received: from 50.23.254.54-static.reverse.softlayer.com ([50.23.254.54]:48922 "EHLO softlayer.compulab.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751680Ab1ECQC7 (ORCPT ); Tue, 3 May 2011 12:02:59 -0400 Received: from [62.90.235.247] (port=49400 helo=zimbra-mta.compulab.co.il) by softlayer.compulab.co.il with esmtp (Exim 4.69) (envelope-from ) id 1QHI3u-0004Fa-EQ; Tue, 03 May 2011 19:02:58 +0300 Received: from localhost (localhost.localdomain [127.0.0.1]) by zimbra-mta.compulab.co.il (Postfix) with ESMTP id 7CEEB7E9B7B; Tue, 3 May 2011 19:02:57 +0300 (IDT) X-Virus-Scanned: amavisd-new at compulab.co.il Received: from zimbra-mta.compulab.co.il ([127.0.0.1]) by localhost (zimbra-mta.compulab.co.il [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0oAWt1yT8QAL; Tue, 3 May 2011 19:02:56 +0300 (IDT) Received: from grinberg-linux (grinberg-pc.compulab.local [10.1.1.13]) by zimbra-mta.compulab.co.il (Postfix) with SMTP id 9E4A67E9B78; Tue, 3 May 2011 19:02:55 +0300 (IDT) Received: by grinberg-linux (sSMTP sendmail emulation); Tue, 03 May 2011 19:02:58 +0300 From: Igor Grinberg To: Dmitry Torokhov Cc: linux-input@vger.kernel.org, Igor Grinberg Subject: [PATCH] input: ads7846: fix gpio_pendown configuration Date: Tue, 3 May 2011 19:02:53 +0300 Message-Id: <1304438573-7692-1-git-send-email-grinberg@compulab.co.il> X-Mailer: git-send-email 1.7.3.4 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - softlayer.compulab.co.il X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - compulab.co.il Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 03 May 2011 16:03:00 +0000 (UTC) The pendown gpio was requested but not configured for input. Request and configure it in one shot. Signed-off-by: Igor Grinberg --- 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 c24946f..bf067aa 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 ts->get_pendown_state = pdata->get_pendown_state; } else if (gpio_is_valid(pdata->gpio_pendown)) { - err = gpio_request(pdata->gpio_pendown, "ads7846_pendown"); + err = gpio_request_one(pdata->gpio_pendown, GPIOF_IN, + "ads7846_pendown"); if (err) { dev_err(&spi->dev, "failed to request pendown GPIO%d\n", pdata->gpio_pendown);