[PATCH] Input: omap4-keypad: Add pinctrl support

From: Sourav Poddar
Date: Mon Oct 22 2012 - 03:28:06 EST


Adapt keypad to use pinctrl framework.

Tested on omap4430 sdp with 3.7-rc1 kernel.

Cc: Felipe Balbi <balbi@xxxxxx>
Cc: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
Signed-off-by: Sourav Poddar <sourav.poddar@xxxxxx>
---
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 <linux/input.h>
#include <linux/slab.h>
#include <linux/pm_runtime.h>
+#include <linux/pinctrl/consumer.h>

#include <linux/platform_data/omap4-keypad.h>

@@ -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
--
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/