asoc: audio-kernel: Remove trace_printk
Remove trace_printk point. Change-Id: I76b53eda77bc41c75e06a885084022d74c248188 Signed-off-by: yuayang <quic_yuayang@quicinc.com>
This commit is contained in:
@@ -84,7 +84,6 @@ static int audio_ext_clk_prepare(struct clk_hw *hw)
|
||||
(clk_priv->clk_src < AUDIO_EXT_CLK_LPASS_MAX) && !clk_priv->enable) {
|
||||
#ifdef CONFIG_AUDIO_PRM
|
||||
pr_debug("%s: clk_id %x ", __func__, clk_priv->prm_clk_cfg.clk_id);
|
||||
trace_printk("%s: clk_id %x \n", __func__, clk_priv->prm_clk_cfg.clk_id);
|
||||
ret = audio_prm_set_lpass_clk_cfg(&clk_priv->prm_clk_cfg,1);
|
||||
#else
|
||||
pr_debug("%s: audio prm not enabled", __func__);
|
||||
@@ -138,7 +137,6 @@ static void audio_ext_clk_unprepare(struct clk_hw *hw)
|
||||
pr_debug("%s: clk_id %x", __func__,
|
||||
clk_priv->prm_clk_cfg.clk_id);
|
||||
ret = audio_prm_set_lpass_clk_cfg(&clk_priv->prm_clk_cfg, 0);
|
||||
trace_printk("%s: clk_id %x \n", __func__, clk_priv->prm_clk_cfg.clk_id);
|
||||
#else
|
||||
pr_debug("%s: audio prm not enabled", __func__);
|
||||
ret = -EPERM;
|
||||
@@ -183,7 +181,6 @@ static int lpass_hw_vote_prepare(struct clk_hw *hw)
|
||||
pr_debug("%s: core vote clk_id %x \n", __func__, clk_priv->prm_clk_cfg.clk_id);
|
||||
ret = audio_prm_set_lpass_hw_core_req(&clk_priv->prm_clk_cfg,
|
||||
HW_CORE_ID_LPASS, 1);
|
||||
trace_printk("%s: core vote clk_id %x \n", __func__, clk_priv->prm_clk_cfg.clk_id);
|
||||
#else
|
||||
pr_debug("%s: audio prm not enabled", __func__);
|
||||
ret = -EPERM;
|
||||
@@ -201,7 +198,6 @@ static int lpass_hw_vote_prepare(struct clk_hw *hw)
|
||||
pr_debug("%s: audio vote clk_id %x \n", __func__, clk_priv->prm_clk_cfg.clk_id);
|
||||
ret = audio_prm_set_lpass_hw_core_req(&clk_priv->prm_clk_cfg,
|
||||
HW_CORE_ID_DCODEC, 1);
|
||||
trace_printk("%s: audio vote clk_id %x \n", __func__, clk_priv->prm_clk_cfg.clk_id);
|
||||
#else
|
||||
pr_debug("%s: audio prm not enabled", __func__);
|
||||
ret = -EPERM;
|
||||
@@ -227,7 +223,6 @@ static void lpass_hw_vote_unprepare(struct clk_hw *hw)
|
||||
pr_debug("%s: core vote clk_id %x \n", __func__, clk_priv->prm_clk_cfg.clk_id);
|
||||
ret = audio_prm_set_lpass_hw_core_req(&clk_priv->prm_clk_cfg,
|
||||
HW_CORE_ID_LPASS, 0);
|
||||
trace_printk("%s: core vote clk_id %x \n", __func__, clk_priv->prm_clk_cfg.clk_id);
|
||||
#else
|
||||
pr_debug("%s: audio prm not enabled", __func__);
|
||||
ret = -EPERM;
|
||||
@@ -244,7 +239,6 @@ static void lpass_hw_vote_unprepare(struct clk_hw *hw)
|
||||
pr_debug("%s: audio vote clk_id %x \n", __func__, clk_priv->prm_clk_cfg.clk_id);
|
||||
ret = audio_prm_set_lpass_hw_core_req(&clk_priv->prm_clk_cfg,
|
||||
HW_CORE_ID_DCODEC, 0);
|
||||
trace_printk("%s: audio vote clk_id %x \n", __func__, clk_priv->prm_clk_cfg.clk_id);
|
||||
#else
|
||||
pr_debug("%s: audio prm not enabled", __func__);
|
||||
ret = -EPERM;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/of_platform.h>
|
||||
@@ -919,7 +919,6 @@ static int bolero_ssr_enable(struct device *dev, void *data)
|
||||
priv->component,
|
||||
BOLERO_MACRO_EVT_CLK_RESET, 0x0);
|
||||
}
|
||||
trace_printk("%s: clk count reset\n", __func__);
|
||||
|
||||
if (priv->rsc_clk_cb)
|
||||
priv->rsc_clk_cb(priv->clk_dev, BOLERO_MACRO_EVT_SSR_GFMUX_UP);
|
||||
@@ -942,7 +941,6 @@ static int bolero_ssr_enable(struct device *dev, void *data)
|
||||
/* Add a 100usec sleep to ensure last register write is done */
|
||||
usleep_range(100,110);
|
||||
bolero_clk_rsc_enable_all_clocks(priv->clk_dev, false);
|
||||
trace_printk("%s: regcache_sync done\n", __func__);
|
||||
/* call ssr event for supported macros */
|
||||
for (macro_idx = START_MACRO; macro_idx < MAX_MACRO; macro_idx++) {
|
||||
if (!priv->macro_params[macro_idx].event_handler)
|
||||
@@ -951,7 +949,6 @@ static int bolero_ssr_enable(struct device *dev, void *data)
|
||||
priv->component,
|
||||
BOLERO_MACRO_EVT_SSR_UP, 0x0);
|
||||
}
|
||||
trace_printk("%s: SSR up events processed by all macros\n", __func__);
|
||||
bolero_cdc_notifier_call(priv, BOLERO_SLV_EVT_SSR_UP);
|
||||
return 0;
|
||||
}
|
||||
@@ -1505,8 +1502,6 @@ int bolero_runtime_resume(struct device *dev)
|
||||
}
|
||||
}
|
||||
priv->core_hw_vote_count++;
|
||||
trace_printk("%s: hw vote count %d\n",
|
||||
__func__, priv->core_hw_vote_count);
|
||||
|
||||
audio_vote:
|
||||
if (priv->lpass_audio_hw_vote == NULL) {
|
||||
@@ -1524,8 +1519,6 @@ audio_vote:
|
||||
}
|
||||
}
|
||||
priv->core_audio_vote_count++;
|
||||
trace_printk("%s: audio vote count %d\n",
|
||||
__func__, priv->core_audio_vote_count);
|
||||
|
||||
done:
|
||||
mutex_unlock(&priv->vote_lock);
|
||||
@@ -1549,8 +1542,6 @@ int bolero_runtime_suspend(struct device *dev)
|
||||
dev_dbg(dev, "%s: Invalid lpass core hw node\n",
|
||||
__func__);
|
||||
}
|
||||
trace_printk("%s: hw vote count %d\n",
|
||||
__func__, priv->core_hw_vote_count);
|
||||
|
||||
if (priv->lpass_audio_hw_vote != NULL) {
|
||||
if (--priv->core_audio_vote_count == 0)
|
||||
@@ -1562,8 +1553,6 @@ int bolero_runtime_suspend(struct device *dev)
|
||||
dev_dbg(dev, "%s: Invalid lpass audio hw node\n",
|
||||
__func__);
|
||||
}
|
||||
trace_printk("%s: audio vote count %d\n",
|
||||
__func__, priv->core_audio_vote_count);
|
||||
|
||||
mutex_unlock(&priv->vote_lock);
|
||||
return 0;
|
||||
|
@@ -137,7 +137,6 @@ int bolero_rsc_clk_reset(struct device *dev, int clk_id)
|
||||
dev_dbg(priv->dev,
|
||||
"%s: clock reset after ssr, count %d\n", __func__, count);
|
||||
|
||||
trace_printk("%s: clock reset after ssr, count %d\n", __func__, count);
|
||||
while (count--) {
|
||||
clk_prepare_enable(priv->clk[clk_id]);
|
||||
clk_prepare_enable(priv->clk[clk_id + NPL_CLK_OFFSET]);
|
||||
@@ -298,8 +297,6 @@ static int bolero_clk_rsc_mux1_clk_request(struct bolero_clk_rsc *priv,
|
||||
if (priv->dev_up_gfmux) {
|
||||
iowrite32(0x1, clk_muxsel);
|
||||
muxsel = ioread32(clk_muxsel);
|
||||
trace_printk("%s: muxsel value after enable: %d\n",
|
||||
__func__, muxsel);
|
||||
}
|
||||
bolero_clk_rsc_mux0_clk_request(priv,
|
||||
default_clk_id,
|
||||
@@ -331,8 +328,6 @@ static int bolero_clk_rsc_mux1_clk_request(struct bolero_clk_rsc *priv,
|
||||
if (priv->dev_up_gfmux) {
|
||||
iowrite32(0x0, clk_muxsel);
|
||||
muxsel = ioread32(clk_muxsel);
|
||||
trace_printk("%s: muxsel value after disable: %d\n",
|
||||
__func__, muxsel);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -556,7 +551,6 @@ int bolero_clk_rsc_request_clock(struct device *dev,
|
||||
if (!priv->dev_up && enable) {
|
||||
dev_err_ratelimited(priv->dev, "%s: SSR is in progress..\n",
|
||||
__func__);
|
||||
trace_printk("%s: SSR is in progress..\n", __func__);
|
||||
ret = -EINVAL;
|
||||
goto err;
|
||||
}
|
||||
@@ -586,9 +580,6 @@ int bolero_clk_rsc_request_clock(struct device *dev,
|
||||
dev_dbg(priv->dev, "%s: clk_cnt: %d for requested clk: %d, enable: %d\n",
|
||||
__func__, priv->clk_cnt[clk_id_req], clk_id_req,
|
||||
enable);
|
||||
trace_printk("%s: clk_cnt: %d for requested clk: %d, enable: %d\n",
|
||||
__func__, priv->clk_cnt[clk_id_req], clk_id_req,
|
||||
enable);
|
||||
|
||||
mutex_unlock(&priv->rsc_clk_lock);
|
||||
|
||||
|
@@ -1346,8 +1346,6 @@ static int rx_macro_mclk_enable(struct rx_macro_priv *rx_priv,
|
||||
}
|
||||
}
|
||||
exit:
|
||||
trace_printk("%s: mclk_enable = %u, dapm = %d clk_users= %d\n",
|
||||
__func__, mclk_enable, dapm, rx_priv->rx_mclk_users);
|
||||
mutex_unlock(&rx_priv->mclk_lock);
|
||||
return ret;
|
||||
}
|
||||
@@ -1433,7 +1431,6 @@ static int rx_macro_event_handler(struct snd_soc_component *component,
|
||||
rx_macro_wcd_clsh_imped_config(component, data, false);
|
||||
break;
|
||||
case BOLERO_MACRO_EVT_SSR_DOWN:
|
||||
trace_printk("%s, enter SSR down\n", __func__);
|
||||
rx_priv->dev_up = false;
|
||||
if (rx_priv->swr_ctrl_data) {
|
||||
swrm_wcd_notify(
|
||||
@@ -1468,7 +1465,6 @@ static int rx_macro_event_handler(struct snd_soc_component *component,
|
||||
rx_macro_core_vote(rx_priv, false);
|
||||
break;
|
||||
case BOLERO_MACRO_EVT_SSR_UP:
|
||||
trace_printk("%s, enter SSR up\n", __func__);
|
||||
rx_priv->dev_up = true;
|
||||
/* reset swr after ssr/pdr */
|
||||
rx_priv->reset_swr = true;
|
||||
@@ -3772,8 +3768,6 @@ static int rx_swrm_clock(void *handle, bool enable)
|
||||
|
||||
mutex_lock(&rx_priv->swr_clk_lock);
|
||||
|
||||
trace_printk("%s: swrm clock %s\n",
|
||||
__func__, (enable ? "enable" : "disable"));
|
||||
dev_dbg(rx_priv->dev, "%s: swrm clock %s\n",
|
||||
__func__, (enable ? "enable" : "disable"));
|
||||
if (enable) {
|
||||
@@ -3840,8 +3834,6 @@ static int rx_swrm_clock(void *handle, bool enable)
|
||||
}
|
||||
}
|
||||
}
|
||||
trace_printk("%s: swrm clock users %d\n",
|
||||
__func__, rx_priv->swr_clk_users);
|
||||
dev_dbg(rx_priv->dev, "%s: swrm clock users %d\n",
|
||||
__func__, rx_priv->swr_clk_users);
|
||||
exit:
|
||||
|
@@ -419,7 +419,6 @@ static int tx_macro_event_handler(struct snd_soc_component *component,
|
||||
|
||||
switch (event) {
|
||||
case BOLERO_MACRO_EVT_SSR_DOWN:
|
||||
trace_printk("%s, enter SSR down\n", __func__);
|
||||
if (tx_priv->swr_ctrl_data) {
|
||||
swrm_wcd_notify(
|
||||
tx_priv->swr_ctrl_data[0].tx_swr_pdev,
|
||||
@@ -436,7 +435,6 @@ static int tx_macro_event_handler(struct snd_soc_component *component,
|
||||
}
|
||||
break;
|
||||
case BOLERO_MACRO_EVT_SSR_UP:
|
||||
trace_printk("%s, enter SSR up\n", __func__);
|
||||
/* reset swr after ssr/pdr */
|
||||
tx_priv->reset_swr = true;
|
||||
if (tx_priv->swr_ctrl_data)
|
||||
@@ -2873,9 +2871,6 @@ static int tx_macro_tx_va_mclk_enable(struct tx_macro_priv *tx_priv,
|
||||
{
|
||||
int ret = 0, clk_tx_ret = 0;
|
||||
|
||||
trace_printk("%s: clock type %s, enable: %s tx_mclk_users: %d\n",
|
||||
__func__, (clk_type ? "VA_MCLK" : "TX_MCLK"),
|
||||
(enable ? "enable" : "disable"), tx_priv->tx_mclk_users);
|
||||
dev_dbg(tx_priv->dev,
|
||||
"%s: clock type %s, enable: %s tx_mclk_users: %d\n",
|
||||
__func__, (clk_type ? "VA_MCLK" : "TX_MCLK"),
|
||||
@@ -2883,7 +2878,6 @@ static int tx_macro_tx_va_mclk_enable(struct tx_macro_priv *tx_priv,
|
||||
|
||||
if (enable) {
|
||||
if (tx_priv->swr_clk_users == 0) {
|
||||
trace_printk("%s: tx swr clk users 0\n", __func__);
|
||||
ret = msm_cdc_pinctrl_select_active_state(
|
||||
tx_priv->tx_swr_gpio_p);
|
||||
if (ret < 0) {
|
||||
@@ -2901,7 +2895,6 @@ static int tx_macro_tx_va_mclk_enable(struct tx_macro_priv *tx_priv,
|
||||
TX_CORE_CLK,
|
||||
true);
|
||||
if (clk_type == TX_MCLK) {
|
||||
trace_printk("%s: requesting TX_MCLK\n", __func__);
|
||||
ret = tx_macro_mclk_enable(tx_priv, 1);
|
||||
if (ret < 0) {
|
||||
if (tx_priv->swr_clk_users == 0)
|
||||
@@ -2914,7 +2907,6 @@ static int tx_macro_tx_va_mclk_enable(struct tx_macro_priv *tx_priv,
|
||||
}
|
||||
}
|
||||
if (clk_type == VA_MCLK) {
|
||||
trace_printk("%s: requesting VA_MCLK\n", __func__);
|
||||
ret = bolero_clk_rsc_request_clock(tx_priv->dev,
|
||||
TX_CORE_CLK,
|
||||
VA_CORE_CLK,
|
||||
@@ -2948,8 +2940,6 @@ static int tx_macro_tx_va_mclk_enable(struct tx_macro_priv *tx_priv,
|
||||
if (tx_priv->swr_clk_users == 0) {
|
||||
dev_dbg(tx_priv->dev, "%s: reset_swr: %d\n",
|
||||
__func__, tx_priv->reset_swr);
|
||||
trace_printk("%s: reset_swr: %d\n",
|
||||
__func__, tx_priv->reset_swr);
|
||||
if (tx_priv->reset_swr)
|
||||
regmap_update_bits(regmap,
|
||||
BOLERO_CDC_TX_CLK_RST_CTRL_SWR_CONTROL,
|
||||
@@ -3047,7 +3037,6 @@ done:
|
||||
TX_CORE_CLK,
|
||||
false);
|
||||
exit:
|
||||
trace_printk("%s: exit\n", __func__);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -3161,10 +3150,6 @@ static int tx_macro_swrm_clock(void *handle, bool enable)
|
||||
}
|
||||
|
||||
mutex_lock(&tx_priv->swr_clk_lock);
|
||||
trace_printk("%s: swrm clock %s tx_swr_clk_cnt: %d va_swr_clk_cnt: %d\n",
|
||||
__func__,
|
||||
(enable ? "enable" : "disable"),
|
||||
tx_priv->tx_swr_clk_cnt, tx_priv->va_swr_clk_cnt);
|
||||
dev_dbg(tx_priv->dev,
|
||||
"%s: swrm clock %s tx_swr_clk_cnt: %d va_swr_clk_cnt: %d\n",
|
||||
__func__, (enable ? "enable" : "disable"),
|
||||
@@ -3227,9 +3212,6 @@ static int tx_macro_swrm_clock(void *handle, bool enable)
|
||||
}
|
||||
}
|
||||
|
||||
trace_printk("%s: swrm clock users %d tx_clk_sts_cnt: %d va_clk_sts_cnt: %d\n",
|
||||
__func__, tx_priv->swr_clk_users, tx_priv->tx_clk_status,
|
||||
tx_priv->va_clk_status);
|
||||
dev_dbg(tx_priv->dev,
|
||||
"%s: swrm clock users %d tx_clk_sts_cnt: %d va_clk_sts_cnt: %d\n",
|
||||
__func__, tx_priv->swr_clk_users, tx_priv->tx_clk_status,
|
||||
|
@@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
@@ -323,7 +323,6 @@ static int va_macro_event_handler(struct snd_soc_component *component,
|
||||
va_macro_core_vote(va_priv, false);
|
||||
break;
|
||||
case BOLERO_MACRO_EVT_SSR_UP:
|
||||
trace_printk("%s, enter SSR up\n", __func__);
|
||||
/* reset swr after ssr/pdr */
|
||||
va_priv->reset_swr = true;
|
||||
va_priv->dev_up = true;
|
||||
|
@@ -1,5 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
@@ -1012,7 +1013,6 @@ static int wsa_macro_event_handler(struct snd_soc_component *component,
|
||||
|
||||
switch (event) {
|
||||
case BOLERO_MACRO_EVT_SSR_DOWN:
|
||||
trace_printk("%s, enter SSR down\n", __func__);
|
||||
if (wsa_priv->swr_ctrl_data) {
|
||||
swrm_wcd_notify(
|
||||
wsa_priv->swr_ctrl_data[0].wsa_swr_pdev,
|
||||
@@ -1045,7 +1045,6 @@ static int wsa_macro_event_handler(struct snd_soc_component *component,
|
||||
wsa_macro_core_vote(wsa_priv, false);
|
||||
break;
|
||||
case BOLERO_MACRO_EVT_SSR_UP:
|
||||
trace_printk("%s, enter SSR up\n", __func__);
|
||||
/* reset swr after ssr/pdr */
|
||||
wsa_priv->reset_swr = true;
|
||||
if (wsa_priv->swr_ctrl_data)
|
||||
@@ -2920,9 +2919,6 @@ static int wsa_swrm_clock(void *handle, bool enable)
|
||||
|
||||
mutex_lock(&wsa_priv->swr_clk_lock);
|
||||
|
||||
trace_printk("%s: %s swrm clock %s\n",
|
||||
dev_name(wsa_priv->dev), __func__,
|
||||
(enable ? "enable" : "disable"));
|
||||
dev_dbg(wsa_priv->dev, "%s: swrm clock %s\n",
|
||||
__func__, (enable ? "enable" : "disable"));
|
||||
if (enable) {
|
||||
@@ -2988,9 +2984,6 @@ static int wsa_swrm_clock(void *handle, bool enable)
|
||||
}
|
||||
}
|
||||
}
|
||||
trace_printk("%s: %s swrm clock users: %d\n",
|
||||
dev_name(wsa_priv->dev), __func__,
|
||||
wsa_priv->swr_clk_users);
|
||||
dev_dbg(wsa_priv->dev, "%s: swrm clock users %d\n",
|
||||
__func__, wsa_priv->swr_clk_users);
|
||||
exit:
|
||||
|
@@ -1,6 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2019-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/of_platform.h>
|
||||
@@ -137,7 +138,6 @@ int lpass_cdc_rsc_clk_reset(struct device *dev, int clk_id)
|
||||
dev_dbg(priv->dev,
|
||||
"%s: clock reset after ssr, count %d\n", __func__, count);
|
||||
|
||||
trace_printk("%s: clock reset after ssr, count %d\n", __func__, count);
|
||||
while (count--) {
|
||||
clk_prepare_enable(priv->clk[clk_id]);
|
||||
}
|
||||
@@ -256,8 +256,6 @@ static int lpass_cdc_clk_rsc_mux1_clk_request(struct lpass_cdc_clk_rsc *priv,
|
||||
if (priv->dev_up_gfmux) {
|
||||
iowrite32(0x1, clk_muxsel);
|
||||
muxsel = ioread32(clk_muxsel);
|
||||
trace_printk("%s: muxsel value after enable: %d\n",
|
||||
__func__, muxsel);
|
||||
}
|
||||
lpass_cdc_clk_rsc_mux0_clk_request(priv, default_clk_id,
|
||||
false);
|
||||
@@ -286,8 +284,6 @@ static int lpass_cdc_clk_rsc_mux1_clk_request(struct lpass_cdc_clk_rsc *priv,
|
||||
if (!ret && priv->dev_up_gfmux) {
|
||||
iowrite32(0x0, clk_muxsel);
|
||||
muxsel = ioread32(clk_muxsel);
|
||||
trace_printk("%s: muxsel value after disable: %d\n",
|
||||
__func__, muxsel);
|
||||
}
|
||||
}
|
||||
clk_disable_unprepare(priv->clk[clk_id]);
|
||||
@@ -501,7 +497,6 @@ int lpass_cdc_clk_rsc_request_clock(struct device *dev,
|
||||
if (!priv->dev_up && enable) {
|
||||
dev_err_ratelimited(priv->dev, "%s: SSR is in progress..\n",
|
||||
__func__);
|
||||
trace_printk("%s: SSR is in progress..\n", __func__);
|
||||
ret = -EINVAL;
|
||||
goto err;
|
||||
}
|
||||
@@ -531,9 +526,6 @@ int lpass_cdc_clk_rsc_request_clock(struct device *dev,
|
||||
dev_dbg(priv->dev, "%s: clk_cnt: %d for requested clk: %d, enable: %d\n",
|
||||
__func__, priv->clk_cnt[clk_id_req], clk_id_req,
|
||||
enable);
|
||||
trace_printk("%s: clk_cnt: %d for requested clk: %d, enable: %d\n",
|
||||
__func__, priv->clk_cnt[clk_id_req], clk_id_req,
|
||||
enable);
|
||||
|
||||
mutex_unlock(&priv->rsc_clk_lock);
|
||||
|
||||
|
@@ -1377,8 +1377,6 @@ static int lpass_cdc_rx_macro_mclk_enable(
|
||||
}
|
||||
}
|
||||
exit:
|
||||
trace_printk("%s: mclk_enable = %u, dapm = %d clk_users= %d\n",
|
||||
__func__, mclk_enable, dapm, rx_priv->rx_mclk_users);
|
||||
mutex_unlock(&rx_priv->mclk_lock);
|
||||
return ret;
|
||||
}
|
||||
@@ -1464,7 +1462,6 @@ static int lpass_cdc_rx_macro_event_handler(struct snd_soc_component *component,
|
||||
lpass_cdc_rx_macro_wcd_clsh_imped_config(component, data, false);
|
||||
break;
|
||||
case LPASS_CDC_MACRO_EVT_SSR_DOWN:
|
||||
trace_printk("%s, enter SSR down\n", __func__);
|
||||
rx_priv->pre_dev_up = false;
|
||||
rx_priv->dev_up = false;
|
||||
if (rx_priv->swr_ctrl_data) {
|
||||
@@ -1506,7 +1503,6 @@ static int lpass_cdc_rx_macro_event_handler(struct snd_soc_component *component,
|
||||
lpass_cdc_rx_macro_core_vote(rx_priv, false);
|
||||
break;
|
||||
case LPASS_CDC_MACRO_EVT_SSR_UP:
|
||||
trace_printk("%s, enter SSR up\n", __func__);
|
||||
rx_priv->dev_up = true;
|
||||
/* reset swr after ssr/pdr */
|
||||
rx_priv->reset_swr = true;
|
||||
@@ -4406,8 +4402,6 @@ static int rx_swrm_clock(void *handle, bool enable)
|
||||
|
||||
mutex_lock(&rx_priv->swr_clk_lock);
|
||||
|
||||
trace_printk("%s: swrm clock %s\n",
|
||||
__func__, (enable ? "enable" : "disable"));
|
||||
dev_dbg(rx_priv->dev, "%s: swrm clock %s\n",
|
||||
__func__, (enable ? "enable" : "disable"));
|
||||
if (enable) {
|
||||
@@ -4474,8 +4468,6 @@ static int rx_swrm_clock(void *handle, bool enable)
|
||||
}
|
||||
}
|
||||
}
|
||||
trace_printk("%s: swrm clock users %d\n",
|
||||
__func__, rx_priv->swr_clk_users);
|
||||
dev_dbg(rx_priv->dev, "%s: swrm clock users %d\n",
|
||||
__func__, rx_priv->swr_clk_users);
|
||||
exit:
|
||||
|
@@ -330,7 +330,6 @@ static int lpass_cdc_tx_macro_event_handler(struct snd_soc_component *component,
|
||||
|
||||
switch (event) {
|
||||
case LPASS_CDC_MACRO_EVT_SSR_DOWN:
|
||||
trace_printk("%s, enter SSR down\n", __func__);
|
||||
if ((!pm_runtime_enabled(tx_dev) ||
|
||||
!pm_runtime_suspended(tx_dev))) {
|
||||
ret = lpass_cdc_runtime_suspend(tx_dev);
|
||||
@@ -342,7 +341,6 @@ static int lpass_cdc_tx_macro_event_handler(struct snd_soc_component *component,
|
||||
}
|
||||
break;
|
||||
case LPASS_CDC_MACRO_EVT_SSR_UP:
|
||||
trace_printk("%s, enter SSR up\n", __func__);
|
||||
break;
|
||||
case LPASS_CDC_MACRO_EVT_CLK_RESET:
|
||||
lpass_cdc_rsc_clk_reset(tx_dev, TX_CORE_CLK);
|
||||
|
@@ -373,7 +373,6 @@ static int lpass_cdc_va_macro_event_handler(struct snd_soc_component *component,
|
||||
lpass_cdc_va_macro_core_vote(va_priv, false);
|
||||
break;
|
||||
case LPASS_CDC_MACRO_EVT_SSR_UP:
|
||||
trace_printk("%s, enter SSR up\n", __func__);
|
||||
/* reset swr after ssr/pdr */
|
||||
va_priv->reset_swr = true;
|
||||
va_priv->dev_up = true;
|
||||
@@ -773,7 +772,6 @@ static int lpass_cdc_va_macro_core_vote(void *handle, bool enable)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
trace_printk("%s, enter: enable %d\n", __func__, enable);
|
||||
if (enable) {
|
||||
pm_runtime_get_sync(va_priv->dev);
|
||||
if (lpass_cdc_check_core_votes(va_priv->dev)) {
|
||||
@@ -785,7 +783,6 @@ static int lpass_cdc_va_macro_core_vote(void *handle, bool enable)
|
||||
pm_runtime_put_autosuspend(va_priv->dev);
|
||||
pm_runtime_mark_last_busy(va_priv->dev);
|
||||
}
|
||||
trace_printk("%s, leave\n", __func__);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
@@ -1064,7 +1064,6 @@ static int lpass_cdc_wsa_macro_event_handler(struct snd_soc_component *component
|
||||
switch (event) {
|
||||
case LPASS_CDC_MACRO_EVT_SSR_DOWN:
|
||||
wsa_priv->pre_dev_up = false;
|
||||
trace_printk("%s, enter SSR down\n", __func__);
|
||||
if (wsa_priv->swr_ctrl_data) {
|
||||
swrm_wcd_notify(
|
||||
wsa_priv->swr_ctrl_data[0].wsa_swr_pdev,
|
||||
@@ -1083,7 +1082,6 @@ static int lpass_cdc_wsa_macro_event_handler(struct snd_soc_component *component
|
||||
case LPASS_CDC_MACRO_EVT_PRE_SSR_UP:
|
||||
break;
|
||||
case LPASS_CDC_MACRO_EVT_SSR_UP:
|
||||
trace_printk("%s, enter SSR up\n", __func__);
|
||||
wsa_priv->pre_dev_up = true;
|
||||
/* reset swr after ssr/pdr */
|
||||
wsa_priv->reset_swr = true;
|
||||
@@ -3427,9 +3425,6 @@ static int wsa_swrm_clock(void *handle, bool enable)
|
||||
|
||||
mutex_lock(&wsa_priv->swr_clk_lock);
|
||||
|
||||
trace_printk("%s: %s swrm clock %s\n",
|
||||
dev_name(wsa_priv->dev), __func__,
|
||||
(enable ? "enable" : "disable"));
|
||||
dev_dbg(wsa_priv->dev, "%s: swrm clock %s\n",
|
||||
__func__, (enable ? "enable" : "disable"));
|
||||
if (enable) {
|
||||
@@ -3498,9 +3493,6 @@ static int wsa_swrm_clock(void *handle, bool enable)
|
||||
}
|
||||
}
|
||||
}
|
||||
trace_printk("%s: %s swrm clock users: %d\n",
|
||||
dev_name(wsa_priv->dev), __func__,
|
||||
wsa_priv->swr_clk_users);
|
||||
dev_dbg(wsa_priv->dev, "%s: swrm clock users %d\n",
|
||||
__func__, wsa_priv->swr_clk_users);
|
||||
exit:
|
||||
|
@@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
@@ -1074,7 +1074,6 @@ static int lpass_cdc_wsa2_macro_event_handler(struct snd_soc_component *componen
|
||||
switch (event) {
|
||||
case LPASS_CDC_MACRO_EVT_SSR_DOWN:
|
||||
wsa2_priv->pre_dev_up = false;
|
||||
trace_printk("%s, enter SSR down\n", __func__);
|
||||
if (wsa2_priv->swr_ctrl_data) {
|
||||
swrm_wcd_notify(
|
||||
wsa2_priv->swr_ctrl_data[0].wsa2_swr_pdev,
|
||||
@@ -1093,7 +1092,6 @@ static int lpass_cdc_wsa2_macro_event_handler(struct snd_soc_component *componen
|
||||
case LPASS_CDC_MACRO_EVT_PRE_SSR_UP:
|
||||
break;
|
||||
case LPASS_CDC_MACRO_EVT_SSR_UP:
|
||||
trace_printk("%s, enter SSR up\n", __func__);
|
||||
wsa2_priv->pre_dev_up = true;
|
||||
/* reset swr after ssr/pdr */
|
||||
wsa2_priv->reset_swr = true;
|
||||
@@ -3469,9 +3467,6 @@ static int wsa2_swrm_clock(void *handle, bool enable)
|
||||
|
||||
mutex_lock(&wsa2_priv->swr_clk_lock);
|
||||
|
||||
trace_printk("%s: %s swrm clock %s\n",
|
||||
dev_name(wsa2_priv->dev), __func__,
|
||||
(enable ? "enable" : "disable"));
|
||||
dev_dbg(wsa2_priv->dev, "%s: swrm clock %s\n",
|
||||
__func__, (enable ? "enable" : "disable"));
|
||||
if (enable) {
|
||||
@@ -3540,9 +3535,6 @@ static int wsa2_swrm_clock(void *handle, bool enable)
|
||||
}
|
||||
}
|
||||
}
|
||||
trace_printk("%s: %s swrm clock users: %d\n",
|
||||
dev_name(wsa2_priv->dev), __func__,
|
||||
wsa2_priv->swr_clk_users);
|
||||
dev_dbg(wsa2_priv->dev, "%s: swrm clock users %d\n",
|
||||
__func__, wsa2_priv->swr_clk_users);
|
||||
exit:
|
||||
|
@@ -884,7 +884,6 @@ static int lpass_cdc_ssr_enable(struct device *dev, void *data)
|
||||
priv->component,
|
||||
LPASS_CDC_MACRO_EVT_CLK_RESET, 0x0);
|
||||
}
|
||||
trace_printk("%s: clk count reset\n", __func__);
|
||||
|
||||
mutex_lock(&priv->clk_lock);
|
||||
priv->pre_dev_up = true;
|
||||
@@ -911,7 +910,6 @@ static int lpass_cdc_ssr_enable(struct device *dev, void *data)
|
||||
/* Add a 100usec sleep to ensure last register write is done */
|
||||
usleep_range(100,110);
|
||||
lpass_cdc_clk_rsc_enable_all_clocks(priv->clk_dev, false);
|
||||
trace_printk("%s: regcache_sync done\n", __func__);
|
||||
/* call ssr event for supported macros */
|
||||
for (macro_idx = START_MACRO; macro_idx < MAX_MACRO; macro_idx++) {
|
||||
if (!priv->macro_params[macro_idx].event_handler)
|
||||
@@ -920,7 +918,6 @@ static int lpass_cdc_ssr_enable(struct device *dev, void *data)
|
||||
priv->component,
|
||||
LPASS_CDC_MACRO_EVT_SSR_UP, 0x0);
|
||||
}
|
||||
trace_printk("%s: SSR up events processed by all macros\n", __func__);
|
||||
lpass_cdc_notifier_call(priv, LPASS_CDC_WCD_EVT_SSR_UP);
|
||||
return 0;
|
||||
}
|
||||
@@ -1410,7 +1407,6 @@ int lpass_cdc_runtime_resume(struct device *dev)
|
||||
struct lpass_cdc_priv *priv = dev_get_drvdata(dev->parent);
|
||||
int ret = 0;
|
||||
|
||||
trace_printk("%s, enter\n", __func__);
|
||||
dev_dbg(dev,"%s, enter\n", __func__);
|
||||
mutex_lock(&priv->vote_lock);
|
||||
if (priv->lpass_core_hw_vote == NULL) {
|
||||
@@ -1427,8 +1423,6 @@ int lpass_cdc_runtime_resume(struct device *dev)
|
||||
}
|
||||
}
|
||||
priv->core_hw_vote_count++;
|
||||
trace_printk("%s: hw vote count %d\n",
|
||||
__func__, priv->core_hw_vote_count);
|
||||
|
||||
audio_vote:
|
||||
if (priv->lpass_audio_hw_vote == NULL) {
|
||||
@@ -1445,8 +1439,6 @@ audio_vote:
|
||||
}
|
||||
}
|
||||
priv->core_audio_vote_count++;
|
||||
trace_printk("%s: audio vote count %d\n",
|
||||
__func__, priv->core_audio_vote_count);
|
||||
|
||||
core_clk_vote:
|
||||
if (priv->core_clk_vote_count == 0) {
|
||||
@@ -1462,7 +1454,6 @@ core_clk_vote:
|
||||
|
||||
done:
|
||||
mutex_unlock(&priv->vote_lock);
|
||||
trace_printk("%s, leave\n", __func__);
|
||||
dev_dbg(dev, "%s, leave, hw_vote %d, audio_vote %d, core_clk_vote %d\n",
|
||||
__func__, priv->core_hw_vote_count,
|
||||
priv->core_audio_vote_count, priv->core_clk_vote_count);
|
||||
@@ -1475,7 +1466,6 @@ int lpass_cdc_runtime_suspend(struct device *dev)
|
||||
{
|
||||
struct lpass_cdc_priv *priv = dev_get_drvdata(dev->parent);
|
||||
|
||||
trace_printk("%s, enter\n", __func__);
|
||||
dev_dbg(dev,"%s, enter\n", __func__);
|
||||
mutex_lock(&priv->vote_lock);
|
||||
if (priv->lpass_core_hw_vote != NULL) {
|
||||
@@ -1488,8 +1478,6 @@ int lpass_cdc_runtime_suspend(struct device *dev)
|
||||
dev_dbg(dev, "%s: Invalid lpass core hw node\n",
|
||||
__func__);
|
||||
}
|
||||
trace_printk("%s: hw vote count %d\n",
|
||||
__func__, priv->core_hw_vote_count);
|
||||
|
||||
if (priv->lpass_audio_hw_vote != NULL) {
|
||||
if (--priv->core_audio_vote_count == 0)
|
||||
@@ -1501,8 +1489,6 @@ int lpass_cdc_runtime_suspend(struct device *dev)
|
||||
dev_dbg(dev, "%s: Invalid lpass audio hw node\n",
|
||||
__func__);
|
||||
}
|
||||
trace_printk("%s: audio vote count %d\n",
|
||||
__func__, priv->core_audio_vote_count);
|
||||
|
||||
if (--priv->core_clk_vote_count == 0) {
|
||||
lpass_cdc_clk_rsc_request_clock(dev, TX_CORE_CLK,
|
||||
@@ -1512,7 +1498,6 @@ int lpass_cdc_runtime_suspend(struct device *dev)
|
||||
priv->core_clk_vote_count = 0;
|
||||
|
||||
mutex_unlock(&priv->vote_lock);
|
||||
trace_printk("%s, leave\n", __func__);
|
||||
dev_dbg(dev, "%s, leave, hw_vote %d, audio_vote %d, core_clk_vote %d\n",
|
||||
__func__, priv->core_hw_vote_count,
|
||||
priv->core_audio_vote_count, priv->core_clk_vote_count);
|
||||
@@ -1525,14 +1510,12 @@ bool lpass_cdc_check_core_votes(struct device *dev)
|
||||
{
|
||||
struct lpass_cdc_priv *priv = dev_get_drvdata(dev->parent);
|
||||
bool ret = true;
|
||||
trace_printk("%s, enter\n", __func__);
|
||||
mutex_lock(&priv->vote_lock);
|
||||
if (!priv->pre_dev_up ||
|
||||
(priv->lpass_core_hw_vote && !priv->core_hw_vote_count) ||
|
||||
(priv->lpass_audio_hw_vote && !priv->core_audio_vote_count))
|
||||
ret = false;
|
||||
mutex_unlock(&priv->vote_lock);
|
||||
trace_printk("%s, leave\n", __func__);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/device.h>
|
||||
@@ -704,7 +704,6 @@ static int swr_haptics_suspend(struct device *dev)
|
||||
dev_err_ratelimited(dev, "%s: no data for swr_hap\n", __func__);
|
||||
return -ENODEV;
|
||||
}
|
||||
trace_printk("%s: suspended\n", __func__);
|
||||
|
||||
return rc;
|
||||
}
|
||||
@@ -719,7 +718,6 @@ static int swr_haptics_resume(struct device *dev)
|
||||
dev_err_ratelimited(dev, "%s: no data for swr_hap\n", __func__);
|
||||
return -ENODEV;
|
||||
}
|
||||
trace_printk("%s: resumed\n", __func__);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/clk.h>
|
||||
@@ -36,7 +36,6 @@ int digital_cdc_rsc_mgr_hw_vote_enable(struct clk *vote_handle, struct device *d
|
||||
mutex_unlock(&hw_vote_lock);
|
||||
|
||||
dev_dbg(dev, "%s: return %d\n", __func__, ret);
|
||||
trace_printk("%s: return %d\n", __func__, ret);
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(digital_cdc_rsc_mgr_hw_vote_enable);
|
||||
@@ -60,7 +59,6 @@ void digital_cdc_rsc_mgr_hw_vote_disable(struct clk *vote_handle, struct device
|
||||
clk_disable_unprepare(vote_handle);
|
||||
mutex_unlock(&hw_vote_lock);
|
||||
dev_dbg(dev, "%s: leave\n", __func__);
|
||||
trace_printk("%s\n", __func__);
|
||||
}
|
||||
EXPORT_SYMBOL(digital_cdc_rsc_mgr_hw_vote_disable);
|
||||
|
||||
@@ -84,7 +82,6 @@ void digital_cdc_rsc_mgr_hw_vote_reset(struct clk* vote_handle)
|
||||
count++;
|
||||
}
|
||||
pr_debug("%s: Vote count after SSR: %d\n", __func__, count);
|
||||
trace_printk("%s: Vote count after SSR: %d\n", __func__, count);
|
||||
|
||||
while (count--)
|
||||
clk_prepare_enable(vote_handle);
|
||||
|
@@ -551,7 +551,6 @@ int lpi_pinctrl_suspend(struct device *dev)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
trace_printk("%s: system suspend\n", __func__);
|
||||
dev_dbg(dev, "%s: system suspend\n", __func__);
|
||||
|
||||
if ((!pm_runtime_enabled(dev) || !pm_runtime_suspended(dev))) {
|
||||
@@ -588,7 +587,6 @@ static struct notifier_block service_nb = {
|
||||
|
||||
static void lpi_pinctrl_ssr_disable(struct device *dev, void *data)
|
||||
{
|
||||
trace_printk("%s: enter\n", __func__);
|
||||
lpi_dev_up = false;
|
||||
lpi_pinctrl_suspend(dev);
|
||||
}
|
||||
@@ -606,7 +604,6 @@ static int lpi_pinctrl_ssr_enable(struct device *dev, void *data)
|
||||
state = dev_get_drvdata(lpi_dev);
|
||||
|
||||
if (!initial_boot) {
|
||||
trace_printk("%s: enter\n", __func__);
|
||||
if (!lpi_dev_up) {
|
||||
msleep(100);
|
||||
if (state->lpass_core_hw_vote)
|
||||
@@ -953,7 +950,6 @@ int lpi_pinctrl_runtime_resume(struct device *dev)
|
||||
int ret = 0;
|
||||
struct clk *hw_vote = state->lpass_core_hw_vote;
|
||||
|
||||
trace_printk("%s: enter\n", __func__);
|
||||
if (state->lpass_core_hw_vote == NULL) {
|
||||
dev_dbg(dev, "%s: Invalid core hw node\n", __func__);
|
||||
if (state->lpass_audio_hw_vote == NULL) {
|
||||
@@ -979,7 +975,6 @@ int lpi_pinctrl_runtime_resume(struct device *dev)
|
||||
|
||||
exit:
|
||||
mutex_unlock(&state->core_hw_vote_lock);
|
||||
trace_printk("%s: exit\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -988,7 +983,6 @@ int lpi_pinctrl_runtime_suspend(struct device *dev)
|
||||
struct lpi_gpio_state *state = dev_get_drvdata(dev);
|
||||
struct clk *hw_vote = state->lpass_core_hw_vote;
|
||||
|
||||
trace_printk("%s: enter\n", __func__);
|
||||
if (state->lpass_core_hw_vote == NULL) {
|
||||
dev_dbg(dev, "%s: Invalid core hw node\n", __func__);
|
||||
if (state->lpass_audio_hw_vote == NULL) {
|
||||
@@ -1004,7 +998,6 @@ int lpi_pinctrl_runtime_suspend(struct device *dev)
|
||||
state->core_hw_vote_status = false;
|
||||
}
|
||||
mutex_unlock(&state->core_hw_vote_lock);
|
||||
trace_printk("%s: exit\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@@ -417,8 +417,6 @@ static int swrm_request_hw_vote(struct swr_mstr_ctrl *swrm,
|
||||
if (!swrm->dev_up) {
|
||||
dev_dbg(swrm->dev, "%s: device is down or SSR state\n",
|
||||
__func__);
|
||||
trace_printk("%s: device is down or SSR state\n",
|
||||
__func__);
|
||||
mutex_unlock(&swrm->devlock);
|
||||
return -ENODEV;
|
||||
}
|
||||
@@ -449,8 +447,6 @@ static int swrm_request_hw_vote(struct swr_mstr_ctrl *swrm,
|
||||
if (!swrm->dev_up) {
|
||||
dev_dbg(swrm->dev, "%s: device is down or SSR state\n",
|
||||
__func__);
|
||||
trace_printk("%s: device is down or SSR state\n",
|
||||
__func__);
|
||||
mutex_unlock(&swrm->devlock);
|
||||
return -ENODEV;
|
||||
}
|
||||
@@ -479,8 +475,6 @@ static int swrm_request_hw_vote(struct swr_mstr_ctrl *swrm,
|
||||
mutex_unlock(&swrm->devlock);
|
||||
dev_dbg(swrm->dev, "%s: hw_clk_en: %d audio_core_clk_en: %d\n",
|
||||
__func__, swrm->hw_core_clk_en, swrm->aud_core_clk_en);
|
||||
trace_printk("%s: hw_clk_en: %d audio_core_clk_en: %d\n",
|
||||
__func__, swrm->hw_core_clk_en, swrm->aud_core_clk_en);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -548,8 +542,6 @@ static int swrm_clk_request(struct swr_mstr_ctrl *swrm, bool enable)
|
||||
}
|
||||
swrm->clk_ref_count++;
|
||||
if (swrm->clk_ref_count == 1) {
|
||||
trace_printk("%s: clock enable count %d\n",
|
||||
__func__, swrm->clk_ref_count);
|
||||
ret = swrm->clk(swrm->handle, true);
|
||||
if (ret) {
|
||||
dev_err_ratelimited(swrm->dev,
|
||||
@@ -559,8 +551,6 @@ static int swrm_clk_request(struct swr_mstr_ctrl *swrm, bool enable)
|
||||
}
|
||||
}
|
||||
} else if (--swrm->clk_ref_count == 0) {
|
||||
trace_printk("%s: clock disable count %d\n",
|
||||
__func__, swrm->clk_ref_count);
|
||||
swrm->clk(swrm->handle, false);
|
||||
complete(&swrm->clk_off_complete);
|
||||
}
|
||||
@@ -2073,7 +2063,6 @@ static irqreturn_t swr_mstr_interrupt(int irq, void *dev)
|
||||
struct swr_master *mstr = &swrm->master;
|
||||
int retry = 5;
|
||||
|
||||
trace_printk("%s enter\n", __func__);
|
||||
if (unlikely(swrm_lock_sleep(swrm) == false)) {
|
||||
dev_err_ratelimited(swrm->dev, "%s Failed to hold suspend\n", __func__);
|
||||
return IRQ_NONE;
|
||||
@@ -2100,7 +2089,6 @@ static irqreturn_t swr_mstr_interrupt(int irq, void *dev)
|
||||
intr_sts_masked = intr_sts & swrm->intr_mask;
|
||||
|
||||
dev_dbg(swrm->dev, "%s: status: 0x%x \n", __func__, intr_sts_masked);
|
||||
trace_printk("%s: status: 0x%x \n", __func__, intr_sts_masked);
|
||||
handle_irq:
|
||||
for (i = 0; i < SWRM_INTERRUPT_MAX; i++) {
|
||||
value = intr_sts_masked & (1 << i);
|
||||
@@ -2139,7 +2127,6 @@ handle_irq:
|
||||
handle_nested_irq(
|
||||
irq_find_mapping(
|
||||
swr_dev->slave_irq, 0));
|
||||
trace_printk("%s: slave_irq_pending\n", __func__);
|
||||
} while (swr_dev->slave_irq_pending && swrm->dev_up);
|
||||
}
|
||||
|
||||
@@ -2151,8 +2138,6 @@ handle_irq:
|
||||
break;
|
||||
case SWRM_INTERRUPT_STATUS_CHANGE_ENUM_SLAVE_STATUS:
|
||||
status = swr_master_read(swrm, SWRM_MCP_SLV_STATUS);
|
||||
trace_printk("%s: ENUM_SLAVE_STATUS 0x%x, slave_status 0x%x\n", __func__,
|
||||
status, swrm->slave_status);
|
||||
swrm_enable_slave_irq(swrm);
|
||||
if (status == swrm->slave_status) {
|
||||
dev_dbg(swrm->dev,
|
||||
@@ -2319,8 +2304,6 @@ handle_irq:
|
||||
if (intr_sts_masked && !pm_runtime_suspended(swrm->dev)) {
|
||||
dev_dbg(swrm->dev, "%s: new interrupt received 0x%x\n",
|
||||
__func__, intr_sts_masked);
|
||||
trace_printk("%s: new interrupt received 0x%x\n", __func__,
|
||||
intr_sts_masked);
|
||||
goto handle_irq;
|
||||
}
|
||||
|
||||
@@ -2334,7 +2317,6 @@ err_audio_hw_vote:
|
||||
exit:
|
||||
mutex_unlock(&swrm->reslock);
|
||||
swrm_unlock_sleep(swrm);
|
||||
trace_printk("%s exit\n", __func__);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -2348,7 +2330,6 @@ static irqreturn_t swrm_wakeup_interrupt(int irq, void *dev)
|
||||
return IRQ_NONE;
|
||||
}
|
||||
|
||||
trace_printk("%s enter\n", __func__);
|
||||
mutex_lock(&swrm->devlock);
|
||||
if (swrm->state == SWR_MSTR_SSR || !swrm->dev_up) {
|
||||
if (swrm->wake_irq > 0) {
|
||||
@@ -2387,7 +2368,6 @@ static irqreturn_t swrm_wakeup_interrupt(int irq, void *dev)
|
||||
pm_runtime_put_autosuspend(swrm->dev);
|
||||
swrm_unlock_sleep(swrm);
|
||||
exit:
|
||||
trace_printk("%s exit\n", __func__);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -2402,7 +2382,6 @@ static void swrm_wakeup_work(struct work_struct *work)
|
||||
return;
|
||||
}
|
||||
|
||||
trace_printk("%s enter\n", __func__);
|
||||
mutex_lock(&swrm->devlock);
|
||||
if (!swrm->dev_up) {
|
||||
mutex_unlock(&swrm->devlock);
|
||||
@@ -2418,7 +2397,6 @@ static void swrm_wakeup_work(struct work_struct *work)
|
||||
pm_runtime_put_autosuspend(swrm->dev);
|
||||
swrm_unlock_sleep(swrm);
|
||||
exit:
|
||||
trace_printk("%s exit\n", __func__);
|
||||
pm_relax(swrm->dev);
|
||||
}
|
||||
|
||||
@@ -3217,8 +3195,6 @@ static int swrm_runtime_resume(struct device *dev)
|
||||
|
||||
dev_dbg(dev, "%s: pm_runtime: resume, state:%d\n",
|
||||
__func__, swrm->state);
|
||||
trace_printk("%s: pm_runtime: resume, state:%d\n",
|
||||
__func__, swrm->state);
|
||||
mutex_lock(&swrm->runtime_lock);
|
||||
mutex_lock(&swrm->reslock);
|
||||
|
||||
@@ -3280,9 +3256,6 @@ static int swrm_runtime_resume(struct device *dev)
|
||||
dev_dbg(dev,
|
||||
"%s slave device up not implemented\n",
|
||||
__func__);
|
||||
trace_printk(
|
||||
"%s slave device up not implemented\n",
|
||||
__func__);
|
||||
ret = 0;
|
||||
} else if (ret) {
|
||||
dev_err_ratelimited(dev,
|
||||
@@ -3351,8 +3324,6 @@ exit:
|
||||
mutex_unlock(&swrm->reslock);
|
||||
mutex_unlock(&swrm->runtime_lock);
|
||||
|
||||
trace_printk("%s: pm_runtime: resume done, state:%d\n",
|
||||
__func__, swrm->state);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -3367,8 +3338,6 @@ static int swrm_runtime_suspend(struct device *dev)
|
||||
int current_state = 0;
|
||||
struct irq_data *irq_data = NULL;
|
||||
|
||||
trace_printk("%s: pm_runtime: suspend state: %d\n",
|
||||
__func__, swrm->state);
|
||||
dev_dbg(dev, "%s: pm_runtime: suspend state: %d\n",
|
||||
__func__, swrm->state);
|
||||
if (swrm->state == SWR_MSTR_SSR_RESET) {
|
||||
@@ -3395,7 +3364,6 @@ static int swrm_runtime_suspend(struct device *dev)
|
||||
if ((current_state != SWR_MSTR_SSR) &&
|
||||
swrm_is_port_en(&swrm->master)) {
|
||||
dev_dbg(dev, "%s ports are enabled\n", __func__);
|
||||
trace_printk("%s ports are enabled\n", __func__);
|
||||
ret = -EBUSY;
|
||||
goto exit;
|
||||
}
|
||||
@@ -3415,22 +3383,14 @@ static int swrm_runtime_suspend(struct device *dev)
|
||||
dev_dbg_ratelimited(dev,
|
||||
"%s slave device down not implemented\n",
|
||||
__func__);
|
||||
trace_printk(
|
||||
"%s slave device down not implemented\n",
|
||||
__func__);
|
||||
ret = 0;
|
||||
} else if (ret) {
|
||||
dev_err_ratelimited(dev,
|
||||
"%s: failed to shutdown swr dev %d\n",
|
||||
__func__, swr_dev->dev_num);
|
||||
trace_printk(
|
||||
"%s: failed to shutdown swr dev %d\n",
|
||||
__func__, swr_dev->dev_num);
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
trace_printk("%s: clk stop mode not supported or SSR exit\n",
|
||||
__func__);
|
||||
} else {
|
||||
/* Mask bus clash interrupt */
|
||||
swrm->intr_mask &= ~((u32)0x08);
|
||||
@@ -3484,8 +3444,6 @@ exit:
|
||||
swrm_request_hw_vote(swrm, LPASS_HW_CORE, false);
|
||||
mutex_unlock(&swrm->reslock);
|
||||
mutex_unlock(&swrm->runtime_lock);
|
||||
trace_printk("%s: pm_runtime: suspend done state: %d\n",
|
||||
__func__, swrm->state);
|
||||
dev_dbg(dev, "%s: pm_runtime: suspend done state: %d\n",
|
||||
__func__, swrm->state);
|
||||
pm_runtime_set_autosuspend_delay(dev, auto_suspend_timer);
|
||||
@@ -3500,7 +3458,6 @@ static int swrm_device_suspend(struct device *dev)
|
||||
int ret = 0;
|
||||
|
||||
dev_dbg(dev, "%s: swrm state: %d\n", __func__, swrm->state);
|
||||
trace_printk("%s: swrm state: %d\n", __func__, swrm->state);
|
||||
if (!pm_runtime_enabled(dev) || !pm_runtime_suspended(dev)) {
|
||||
ret = swrm_runtime_suspend(dev);
|
||||
if (!ret) {
|
||||
@@ -3519,7 +3476,6 @@ static int swrm_device_down(struct device *dev)
|
||||
struct swr_mstr_ctrl *swrm = platform_get_drvdata(pdev);
|
||||
|
||||
dev_dbg(dev, "%s: swrm state: %d\n", __func__, swrm->state);
|
||||
trace_printk("%s: swrm state: %d\n", __func__, swrm->state);
|
||||
|
||||
mutex_lock(&swrm->force_down_lock);
|
||||
swrm->state = SWR_MSTR_SSR;
|
||||
@@ -3697,7 +3653,6 @@ int swrm_wcd_notify(struct platform_device *pdev, u32 id, void *data)
|
||||
}
|
||||
break;
|
||||
case SWR_DEVICE_SSR_DOWN:
|
||||
trace_printk("%s: swr device down called\n", __func__);
|
||||
mutex_lock(&swrm->mlock);
|
||||
mutex_lock(&swrm->devlock);
|
||||
swrm->dev_up = false;
|
||||
@@ -3724,7 +3679,6 @@ int swrm_wcd_notify(struct platform_device *pdev, u32 id, void *data)
|
||||
break;
|
||||
case SWR_DEVICE_SSR_UP:
|
||||
/* wait for clk voting to be zero */
|
||||
trace_printk("%s: swr device up called\n", __func__);
|
||||
reinit_completion(&swrm->clk_off_complete);
|
||||
if (swrm->clk_ref_count &&
|
||||
!wait_for_completion_timeout(&swrm->clk_off_complete,
|
||||
@@ -3750,7 +3704,6 @@ int swrm_wcd_notify(struct platform_device *pdev, u32 id, void *data)
|
||||
break;
|
||||
case SWR_DEVICE_DOWN:
|
||||
dev_dbg(swrm->dev, "%s: swr master down called\n", __func__);
|
||||
trace_printk("%s: swr master down called\n", __func__);
|
||||
mutex_lock(&swrm->mlock);
|
||||
if (swrm->state == SWR_MSTR_DOWN)
|
||||
dev_dbg(swrm->dev, "%s:SWR master is already Down:%d\n",
|
||||
@@ -3761,7 +3714,6 @@ int swrm_wcd_notify(struct platform_device *pdev, u32 id, void *data)
|
||||
break;
|
||||
case SWR_DEVICE_UP:
|
||||
dev_dbg(swrm->dev, "%s: swr master up called\n", __func__);
|
||||
trace_printk("%s: swr master up called\n", __func__);
|
||||
mutex_lock(&swrm->devlock);
|
||||
if (!swrm->dev_up) {
|
||||
dev_dbg(swrm->dev, "SSR not complete yet\n");
|
||||
|
Reference in New Issue
Block a user