Merge "soc: swr-mstr: Reset swr only during init or ssr"
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

commit
e7d0905375
@@ -127,6 +127,7 @@ struct tx_macro_priv {
|
||||
bool dec_active[NUM_DECIMATORS];
|
||||
int tx_mclk_users;
|
||||
int swr_clk_users;
|
||||
bool reset_swr;
|
||||
struct clk *tx_core_clk;
|
||||
struct clk *tx_npl_clk;
|
||||
struct mutex mclk_lock;
|
||||
@@ -317,6 +318,8 @@ static int tx_macro_event_handler(struct snd_soc_component *component,
|
||||
SWR_DEVICE_DOWN, NULL);
|
||||
break;
|
||||
case BOLERO_MACRO_EVT_SSR_UP:
|
||||
/* reset swr after ssr/pdr */
|
||||
tx_priv->reset_swr = true;
|
||||
swrm_wcd_notify(
|
||||
tx_priv->swr_ctrl_data[0].tx_swr_pdev,
|
||||
SWR_DEVICE_SSR_UP, NULL);
|
||||
@@ -1426,9 +1429,18 @@ static int tx_macro_swrm_clock(void *handle, bool enable)
|
||||
__func__);
|
||||
goto exit;
|
||||
}
|
||||
if (tx_priv->reset_swr)
|
||||
regmap_update_bits(regmap,
|
||||
BOLERO_CDC_TX_CLK_RST_CTRL_SWR_CONTROL,
|
||||
0x02, 0x02);
|
||||
regmap_update_bits(regmap,
|
||||
BOLERO_CDC_TX_CLK_RST_CTRL_SWR_CONTROL,
|
||||
0x01, 0x01);
|
||||
if (tx_priv->reset_swr)
|
||||
regmap_update_bits(regmap,
|
||||
BOLERO_CDC_TX_CLK_RST_CTRL_SWR_CONTROL,
|
||||
0x02, 0x00);
|
||||
tx_priv->reset_swr = false;
|
||||
regmap_update_bits(regmap,
|
||||
BOLERO_CDC_TX_CLK_RST_CTRL_SWR_CONTROL,
|
||||
0x1C, 0x0C);
|
||||
@@ -1799,7 +1811,7 @@ static int tx_macro_probe(struct platform_device *pdev)
|
||||
sample_rate, tx_priv) == TX_MACRO_DMIC_SAMPLE_RATE_UNDEFINED)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
tx_priv->reset_swr = true;
|
||||
INIT_WORK(&tx_priv->tx_macro_add_child_devices_work,
|
||||
tx_macro_add_child_devices);
|
||||
tx_priv->swr_plat_data.handle = (void *) tx_priv;
|
||||
|
Reference in New Issue
Block a user