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

Commit 71592d65 authored by Jay Wang's avatar Jay Wang
Browse files

mpq8092: gpiomux: Add GPIO configuration for codec clock



Provide codec MCLK clock from GPIO42

Change-Id: Ie4647784c25c601ae9025c6658fd02bbf6f5b056
Signed-off-by: default avatarJay Wang <jaywang@codeaurora.org>
parent 416e5ce5
Loading
Loading
Loading
Loading
+24 −1
Original line number Diff line number Diff line
/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -35,6 +35,18 @@ static struct gpiomux_setting slimbus = {
	.pull = GPIOMUX_PULL_KEEPER,
};

static struct gpiomux_setting spkr_mi2s_mclk_act_cfg = {
	.func = GPIOMUX_FUNC_2,
	.drv = GPIOMUX_DRV_8MA,
	.pull = GPIOMUX_PULL_NONE,
};

static struct gpiomux_setting spkr_mi2s_mclk_sus_cfg = {
	.func = GPIOMUX_FUNC_2,
	.drv = GPIOMUX_DRV_2MA,
	.pull = GPIOMUX_PULL_DOWN,
};

static struct msm_gpiomux_config msm_blsp_configs[] __initdata = {
	{
		.gpio      = 6,		/* BLSP1 QUP2 I2C_SDA */
@@ -112,6 +124,15 @@ static struct msm_gpiomux_config mpq8092_slimbus_config[] __initdata = {
	},
};

static struct msm_gpiomux_config mpq8092_spkr_mi2s_mclk_configs[] __initdata = {
	{
		.gpio = 42,
		.settings = {
			[GPIOMUX_SUSPENDED] = &spkr_mi2s_mclk_sus_cfg,
			[GPIOMUX_ACTIVE] = &spkr_mi2s_mclk_act_cfg,
		},
	},
};

void __init mpq8092_init_gpiomux(void)
{
@@ -127,4 +148,6 @@ void __init mpq8092_init_gpiomux(void)
	msm_gpiomux_install(msm_ehci_configs, ARRAY_SIZE(msm_ehci_configs));
	msm_gpiomux_install(mpq8092_slimbus_config,
			ARRAY_SIZE(mpq8092_slimbus_config));
	msm_gpiomux_install(mpq8092_spkr_mi2s_mclk_configs,
			ARRAY_SIZE(mpq8092_spkr_mi2s_mclk_configs));
}