board: 8930: Add support for isa1200 haptic chip
Enable haptics on 8930 CDP Phase 2. Remove haptics
support for Phase 1 CDPs as all have been upgraded
to Phase 2. Configure necessary clock and gpio pins.
Enable regulator to pull up i2c line for communication.
Change-Id: Ifcd1f9332cce382aa99b520ca85fe4ccf08ad2f2
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-8930-gpiomux.c b/arch/arm/mach-msm/board-8930-gpiomux.c
index 77d9c5f..cd201ef 100644
--- a/arch/arm/mach-msm/board-8930-gpiomux.c
+++ b/arch/arm/mach-msm/board-8930-gpiomux.c
@@ -611,7 +611,11 @@
};
#endif
-#ifdef MSM8930_PHASE_2
+static struct gpiomux_setting haptics_active_cfg = {
+ .func = GPIOMUX_FUNC_GPIO,
+ .drv = GPIOMUX_DRV_8MA,
+ .pull = GPIOMUX_PULL_UP,
+};
static struct gpiomux_setting haptics_suspend_cfg = {
.func = GPIOMUX_FUNC_GPIO,
.drv = GPIOMUX_DRV_8MA,
@@ -622,17 +626,18 @@
{
.gpio = 77,
.settings = {
+ [GPIOMUX_ACTIVE] = &haptics_active_cfg,
[GPIOMUX_SUSPENDED] = &haptics_suspend_cfg,
},
},
{
.gpio = 78,
.settings = {
+ [GPIOMUX_ACTIVE] = &haptics_active_cfg,
[GPIOMUX_SUSPENDED] = &haptics_suspend_cfg,
},
},
};
-#endif
int __init msm8930_init_gpiomux(void)
{
@@ -679,11 +684,10 @@
msm_gpiomux_install(mdm_configs,
ARRAY_SIZE(mdm_configs));
-#ifdef MSM8930_PHASE_2
- if (machine_is_msm8930_mtp() || machine_is_msm8930_fluid())
+ if (machine_is_msm8930_cdp() || machine_is_msm8930_mtp()
+ || machine_is_msm8930_fluid())
msm_gpiomux_install(msm8930_haptics_configs,
ARRAY_SIZE(msm8930_haptics_configs));
-#endif
#ifdef CONFIG_USB_EHCI_MSM_HSIC
if ((SOCINFO_VERSION_MAJOR(socinfo_get_version()) != 1) &&