From 2fa2bee59619c19f8ed94295ca50a248f43d5e40 Mon Sep 17 00:00:00 2001 From: Oluwafemi Adeyemi Date: Tue, 26 Jun 2012 17:28:21 -0700 Subject: [PATCH] msm: board-8064: Enable pull-up for SD card detect On some targets, bootloaders may configure the SD card detect GPIO as pull-down. Explicitly enable pull-up for so we can detect card insertion and removal. CRs-Fixed: 371313 Change-Id: I98be563858df163e970dc26b37eb394977522772 Signed-off-by: Oluwafemi Adeyemi --- arch/arm/mach-msm/board-8064-gpiomux.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/arch/arm/mach-msm/board-8064-gpiomux.c b/arch/arm/mach-msm/board-8064-gpiomux.c index ecd4e54c73a..1c1944277ed 100644 --- a/arch/arm/mach-msm/board-8064-gpiomux.c +++ b/arch/arm/mach-msm/board-8064-gpiomux.c @@ -1182,6 +1182,22 @@ static struct msm_gpiomux_config apq8064_sdc4_configs[] __initdata = { }; #endif +static struct gpiomux_setting apq8064_sdc3_card_det_cfg = { + .func = GPIOMUX_FUNC_GPIO, + .drv = GPIOMUX_DRV_2MA, + .pull = GPIOMUX_PULL_UP, +}; + +static struct msm_gpiomux_config apq8064_sdc3_configs[] __initdata = { + { + .gpio = 26, + .settings = { + [GPIOMUX_SUSPENDED] = &apq8064_sdc3_card_det_cfg, + [GPIOMUX_ACTIVE] = &apq8064_sdc3_card_det_cfg, + }, + }, +}; + void __init apq8064_init_gpiomux(void) { int rc; @@ -1273,4 +1289,7 @@ void __init apq8064_init_gpiomux(void) msm_gpiomux_install(apq8064_sdc4_configs, ARRAY_SIZE(apq8064_sdc4_configs)); #endif + + msm_gpiomux_install(apq8064_sdc3_configs, + ARRAY_SIZE(apq8064_sdc3_configs)); }