ASoC: wcd9335: Disable Keeper test bit in soundwire mode

By default, the keeper in NPL(Near Pad Logic) is enabled to
reduce leakage. This bit has to set to zero before enabling
soundwire master functionality. Change toggles keeper to low
before soundwire master is enabled and keeper to high after
soundwire master is disabled.

Change-Id: I72571cb74237f8a98f674a9e8e57c68df17d1c79
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
This commit is contained in:
Sudheer Papothi 2015-08-22 01:57:44 +05:30 committed by Gerrit - the friendly Code Review server
parent 283edd45f4
commit 7c969ac6b9

View file

@ -10122,6 +10122,11 @@ static int tasha_swrm_clock(void *handle, bool enable)
if (enable) {
tasha->swr_clk_users++;
if (tasha->swr_clk_users == 1) {
if (TASHA_IS_2_0(tasha->wcd9xxx->version))
wcd9xxx_reg_update_bits(
&tasha->wcd9xxx->core_res,
WCD9335_TEST_DEBUG_NPL_DLY_TEST_1,
0x10, 0x00);
__tasha_cdc_mclk_enable(tasha, true);
wcd9xxx_reg_update_bits(&tasha->wcd9xxx->core_res,
WCD9335_CDC_CLK_RST_CTRL_SWR_CONTROL,
@ -10134,6 +10139,11 @@ static int tasha_swrm_clock(void *handle, bool enable)
WCD9335_CDC_CLK_RST_CTRL_SWR_CONTROL,
0x01, 0x00);
__tasha_cdc_mclk_enable(tasha, false);
if (TASHA_IS_2_0(tasha->wcd9xxx->version))
wcd9xxx_reg_update_bits(
&tasha->wcd9xxx->core_res,
WCD9335_TEST_DEBUG_NPL_DLY_TEST_1,
0x10, 0x10);
}
}
dev_dbg(tasha->dev, "%s: swrm clock users %d\n",