From patchwork Mon Oct 22 07:28:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Poddar, Sourav" X-Patchwork-Id: 1624321 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 185F5400E8 for ; Mon, 22 Oct 2012 07:28:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750907Ab2JVH2Q (ORCPT ); Mon, 22 Oct 2012 03:28:16 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:46056 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750803Ab2JVH2P (ORCPT ); Mon, 22 Oct 2012 03:28:15 -0400 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id q9M7S7iX023006; Mon, 22 Oct 2012 02:28:08 -0500 Received: from DBDE70.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id q9M7S4Cu014645; Mon, 22 Oct 2012 12:58:05 +0530 (IST) Received: from dbdp33.itg.ti.com (172.24.170.252) by dbde70.ent.ti.com (172.24.170.148) with Microsoft SMTP Server id 14.1.323.3; Mon, 22 Oct 2012 12:58:04 +0530 Received: from a0131647.apr.dhcp.ti.com (smtpvbd.itg.ti.com [172.24.170.250]) by dbdp33.itg.ti.com (8.13.8/8.13.8) with ESMTP id q9M7S0Pk016378; Mon, 22 Oct 2012 12:58:00 +0530 From: Sourav Poddar To: CC: , , , , Sourav Poddar , Felipe Balbi , Dmitry Torokhov Subject: [PATCH] Input: omap4-keypad: Add pinctrl support Date: Mon, 22 Oct 2012 12:58:16 +0530 Message-ID: <1350890896-29510-1-git-send-email-sourav.poddar@ti.com> X-Mailer: git-send-email 1.7.1 MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Adapt keypad to use pinctrl framework. Tested on omap4430 sdp with 3.7-rc1 kernel. Cc: Felipe Balbi Cc: Dmitry Torokhov Signed-off-by: Sourav Poddar --- drivers/input/keyboard/omap4-keypad.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c index c05f98c..bb9f3a5 100644 --- a/drivers/input/keyboard/omap4-keypad.c +++ b/drivers/input/keyboard/omap4-keypad.c @@ -31,6 +31,7 @@ #include #include #include +#include #include @@ -76,6 +77,7 @@ enum { struct omap4_keypad { struct input_dev *input; + struct pinctrl *pins; void __iomem *base; unsigned int irq; @@ -298,6 +300,12 @@ static int __devinit omap4_keypad_probe(struct platform_device *pdev) goto err_release_mem; } + keypad_data->pins = devm_pinctrl_get_select_default(&pdev->dev); + if (IS_ERR(keypad_data->pins)) { + dev_warn(&pdev->dev, "did not get pins for keypad error: %li\n", + PTR_ERR(keypad_data->pins)); + keypad_data->pins = NULL; + } /* * Enable clocks for the keypad module so that we can read