Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c40bf092 authored by Krishna Konda's avatar Krishna Konda
Browse files

msm: mdm9630: add gpio configuration for sd card detect



SD card detect gpio line needs to be setup with a particular
configuration in order for the card detect interrupt to be
properly received.

CRs-Fixed: 601511
Change-Id: I90b48317e54405001b6534e457f2b0d41bf4b430
Signed-off-by: default avatarKrishna Konda <kkonda@codeaurora.org>
parent 8e5d905c
Loading
Loading
Loading
Loading
+25 −1
Original line number Diff line number Diff line
@@ -229,6 +229,30 @@ static struct msm_gpiomux_config mdm9630_cdc_reset_config[] __initdata = {
	}
};

static struct gpiomux_setting sd_card_det_active_config = {
	.func = GPIOMUX_FUNC_GPIO,
	.drv = GPIOMUX_DRV_2MA,
	.pull = GPIOMUX_PULL_NONE,
	.dir = GPIOMUX_IN,
};

static struct gpiomux_setting sd_card_det_sleep_config = {
	.func = GPIOMUX_FUNC_GPIO,
	.drv = GPIOMUX_DRV_2MA,
	.pull = GPIOMUX_PULL_UP,
	.dir = GPIOMUX_IN,
};

static struct msm_gpiomux_config sd_card_det[] __initdata = {
	{
		.gpio = 50,
		.settings = {
			[GPIOMUX_ACTIVE]    = &sd_card_det_active_config,
			[GPIOMUX_SUSPENDED] = &sd_card_det_sleep_config,
		},
	},
};

void __init mdm9630_init_gpiomux(void)
{
	int rc;
@@ -250,5 +274,5 @@ void __init mdm9630_init_gpiomux(void)
	msm_gpiomux_install(msm_eth_config, ARRAY_SIZE(msm_eth_config));
#endif
	msm_gpiomux_install(msm_wlan_configs, ARRAY_SIZE(msm_wlan_configs));

	msm_gpiomux_install(sd_card_det, ARRAY_SIZE(sd_card_det));
}