msm: board-qrd7627a: Fix GPIO polarity for SDC1 hardware based detection
- SDC1_HW_DET is mapped to GPIO 42
- SDC1_HW_DET gpio polarity is changed.
Card inserted -> GPIO line is read high.
Card removed -> GPIO line is read low.
Change-Id: Ieb8717e5958743f829b967b01d6004d7382320ae
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-qrd7627a.c b/arch/arm/mach-msm/board-qrd7627a.c
index 1470026..5c11af3 100644
--- a/arch/arm/mach-msm/board-qrd7627a.c
+++ b/arch/arm/mach-msm/board-qrd7627a.c
@@ -1411,7 +1411,7 @@
return rc;
}
-#define GPIO_SDC1_HW_DET 85
+#define GPIO_SDC1_HW_DET 42
#if defined(CONFIG_MMC_MSM_SDC1_SUPPORT) \
&& defined(CONFIG_MMC_MSM_CARD_HW_DETECTION)
@@ -1432,7 +1432,7 @@
} else {
status = gpio_direction_input(GPIO_SDC1_HW_DET);
if (!status)
- status = gpio_get_value(GPIO_SDC1_HW_DET);
+ status = !gpio_get_value(GPIO_SDC1_HW_DET);
gpio_free(GPIO_SDC1_HW_DET);
}
return status;