From patchwork Wed Oct 31 15:56:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pantelis Antoniou X-Patchwork-Id: 1672311 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id A2B7B3FD8C for ; Tue, 30 Oct 2012 18:19:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965302Ab2J3SSI (ORCPT ); Tue, 30 Oct 2012 14:18:08 -0400 Received: from li42-95.members.linode.com ([209.123.162.95]:59048 "EHLO li42-95.members.linode.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965219Ab2J3SMm (ORCPT ); Tue, 30 Oct 2012 14:12:42 -0400 X-Greylist: delayed 601 seconds by postgrey-1.27 at vger.kernel.org; Tue, 30 Oct 2012 14:12:41 EDT Received: from sles11esa.localdomain (unknown [195.97.110.117]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: panto) by li42-95.members.linode.com (Postfix) with ESMTPSA id 8352B9C1F0; Tue, 30 Oct 2012 18:03:52 +0000 (UTC) From: Pantelis Antoniou To: Dmitry Torokhov Cc: Pantelis Antoniou , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Koen Kooi , Matt Porter , Russ Dill , linux-omap@vger.kernel.org Subject: [PATCH] gpio-keys: Pinctrl-fy Date: Wed, 31 Oct 2012 17:56:59 +0200 Message-Id: <1351699019-4313-1-git-send-email-panto@antoniou-consulting.com> X-Mailer: git-send-email 1.7.12 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Enable pinctrl support for gpio-keys. Signed-off-by: Pantelis Antoniou Acked-by: Tony Lindgren --- drivers/input/keyboard/gpio_keys.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index 6a68041..e421082 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c @@ -29,6 +29,7 @@ #include #include #include +#include struct gpio_button_data { const struct gpio_keys_button *button; @@ -666,6 +667,7 @@ static int __devinit gpio_keys_probe(struct platform_device *pdev) struct input_dev *input; int i, error; int wakeup = 0; + struct pinctrl *pinctrl; if (!pdata) { pdata = gpio_keys_get_devtree_pdata(dev); @@ -731,6 +733,10 @@ static int __devinit gpio_keys_probe(struct platform_device *pdev) goto fail3; } + pinctrl = devm_pinctrl_get_select_default(&pdev->dev); + if (IS_ERR(pinctrl)) + dev_warn(&pdev->dev, "unable to select pin group\n"); + /* get current state of buttons that are connected to GPIOs */ for (i = 0; i < pdata->nbuttons; i++) { struct gpio_button_data *bdata = &ddata->data[i];