msm: board-8064: Add keypad device for CDP, LIQUID, and MTP
Create a platform device for 8064's CDP, LIQUID, and MTP
platforms and pass corresponding keymaps
Change-Id: I8210a46a8a654f69a485c6455fa4174a76dbda9a
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-8064-gpiomux.c b/arch/arm/mach-msm/board-8064-gpiomux.c
index 9b6c253..c08df19 100644
--- a/arch/arm/mach-msm/board-8064-gpiomux.c
+++ b/arch/arm/mach-msm/board-8064-gpiomux.c
@@ -499,7 +499,29 @@
.settings = {
[GPIOMUX_SUSPENDED] = &ap2mdm_pon_reset_n_cfg,
}
- }
+ },
+};
+
+static struct gpiomux_setting gpio_rotate_key_act_config = {
+ .pull = GPIOMUX_PULL_UP,
+ .drv = GPIOMUX_DRV_8MA,
+ .func = GPIOMUX_FUNC_GPIO,
+};
+
+static struct gpiomux_setting gpio_rotate_key_sus_config = {
+ .pull = GPIOMUX_PULL_NONE,
+ .drv = GPIOMUX_DRV_2MA,
+ .func = GPIOMUX_FUNC_GPIO,
+};
+
+struct msm_gpiomux_config apq8064_rotate_key_config[] = {
+ {
+ .gpio = 46,
+ .settings = {
+ [GPIOMUX_SUSPENDED] = &gpio_rotate_key_sus_config,
+ [GPIOMUX_ACTIVE] = &gpio_rotate_key_act_config,
+ }
+ },
};
static struct msm_gpiomux_config apq8064_mxt_configs[] __initdata = {
@@ -606,4 +628,8 @@
if (machine_is_apq8064_cdp() || machine_is_apq8064_liquid())
msm_gpiomux_install(apq8064_mxt_configs,
ARRAY_SIZE(apq8064_mxt_configs));
+
+ if (machine_is_apq8064_cdp() || machine_is_apq8064_liquid())
+ msm_gpiomux_install(apq8064_rotate_key_config,
+ ARRAY_SIZE(apq8064_rotate_key_config));
}