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

Commit 833213d0 authored by Venkat Gopalakrishnan's avatar Venkat Gopalakrishnan
Browse files

board: samarium: add SD card detect gpiomux configuration



On msmsamarium platforms, a MSM GPIO is used for SD card detect and it's
gpiomux configuration needs to be set to a specified value for the
SD card to be detected across all platforms. This patch adds the correct
gpiomux configuration for SD card detect GPIO to properly detect SD card
across all platforms.

Change-Id: I83a8bf764458358c604e5926617baff8e03134ca
Signed-off-by: default avatarVenkat Gopalakrishnan <venkatg@codeaurora.org>
parent 6cf06169
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
@@ -227,6 +227,30 @@ static struct msm_gpiomux_config msm_touch_configs[] __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_suspend_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 = 62,
		.settings = {
			[GPIOMUX_ACTIVE]    = &sd_card_det_active_config,
			[GPIOMUX_SUSPENDED] = &sd_card_det_suspend_config,
		},
	},
};

void __init msmsamarium_init_gpiomux(void)
{
	int rc;
@@ -243,4 +267,5 @@ void __init msmsamarium_init_gpiomux(void)
	msm_gpiomux_install(msm_blsp_configs, ARRAY_SIZE(msm_blsp_configs));
	msm_gpiomux_install(msm_lcd_configs, ARRAY_SIZE(msm_lcd_configs));
	msm_gpiomux_install(msm_touch_configs, ARRAY_SIZE(msm_touch_configs));
	msm_gpiomux_install(sd_card_det, ARRAY_SIZE(sd_card_det));
}