Lines Matching +full:tlv +full:- +full:layout

1 // SPDX-License-Identifier: GPL-2.0-only
2 // Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
12 #include <linux/clk-provider.h>
14 #include <sound/soc-dapm.h>
17 #include <sound/tlv.h>
19 #include "lpass-macro-common.h"
20 #include "lpass-wsa-macro.h"
352 {24000, -EINVAL},/* 24K */
377 * struct wsa_reg_layout - Register layout differences
382 * @compander1_reg_offset: offset between compander registers (compander1 - compander0)
384 * @softclip1_reg_offset: offset between compander registers (softclip1 - softclip0)
442 static const DECLARE_TLV_DB_SCALE(digital_gain, -8400, 100, -8400);
986 if (wsa->codec_version >= LPASS_CODEC_VERSION_2_5) in wsa_is_rw_register()
1047 if (wsa->codec_version >= LPASS_CODEC_VERSION_2_5) in wsa_is_readable_register()
1095 if (wsa->codec_version >= LPASS_CODEC_VERSION_2_5) in wsa_is_volatile_register()
1115 * wsa_macro_set_spkr_mode - Configures speaker compander and smartboost
1121 * Returns 0 on success or -EINVAL on error.
1127 wsa->spkr_mode = mode; in wsa_macro_set_spkr_mode()
1160 struct snd_soc_component *component = dai->component; in wsa_macro_set_prim_interpolator_rate()
1163 for_each_set_bit(port, &wsa->active_ch_mask[dai->id], WSA_MACRO_RX_MAX) { in wsa_macro_set_prim_interpolator_rate()
1166 dev_err(component->dev, "%s: Invalid RX port, Dai ID is %d\n", in wsa_macro_set_prim_interpolator_rate()
1167 __func__, dai->id); in wsa_macro_set_prim_interpolator_rate()
1168 return -EINVAL; in wsa_macro_set_prim_interpolator_rate()
1181 wsa->reg_layout->rx_intx_1_mix_inp0_sel_mask); in wsa_macro_set_prim_interpolator_rate()
1183 wsa->reg_layout->rx_intx_1_mix_inp1_sel_mask); in wsa_macro_set_prim_interpolator_rate()
1185 wsa->reg_layout->rx_intx_1_mix_inp2_sel_mask); in wsa_macro_set_prim_interpolator_rate()
1212 struct snd_soc_component *component = dai->component; in wsa_macro_set_mix_interpolator_rate()
1215 for_each_set_bit(port, &wsa->active_ch_mask[dai->id], WSA_MACRO_RX_MAX) { in wsa_macro_set_mix_interpolator_rate()
1218 dev_err(component->dev, "%s: Invalid RX port, Dai ID is %d\n", in wsa_macro_set_mix_interpolator_rate()
1219 __func__, dai->id); in wsa_macro_set_mix_interpolator_rate()
1220 return -EINVAL; in wsa_macro_set_mix_interpolator_rate()
1226 wsa->reg_layout->rx_intx_2_sel_mask); in wsa_macro_set_mix_interpolator_rate()
1271 return -EINVAL; in wsa_macro_set_interpolator_rate()
1282 struct snd_soc_component *component = dai->component; in wsa_macro_hw_params()
1285 switch (substream->stream) { in wsa_macro_hw_params()
1289 dev_err(component->dev, in wsa_macro_hw_params()
1305 struct snd_soc_component *component = dai->component; in wsa_macro_get_channel_map()
1309 switch (dai->id) { in wsa_macro_get_channel_map()
1311 *tx_slot = wsa->active_ch_mask[dai->id]; in wsa_macro_get_channel_map()
1312 *tx_num = wsa->active_ch_cnt[dai->id]; in wsa_macro_get_channel_map()
1316 for_each_set_bit(temp, &wsa->active_ch_mask[dai->id], in wsa_macro_get_channel_map()
1341 dev_err(component->dev, "%s: Invalid AIF\n", __func__); in wsa_macro_get_channel_map()
1413 struct regmap *regmap = wsa->regmap; in wsa_macro_mclk_enable()
1416 if (wsa->wsa_mclk_users == 0) { in wsa_macro_mclk_enable()
1430 wsa->wsa_mclk_users++; in wsa_macro_mclk_enable()
1432 if (wsa->wsa_mclk_users <= 0) { in wsa_macro_mclk_enable()
1433 dev_err(wsa->dev, "clock already disabled\n"); in wsa_macro_mclk_enable()
1434 wsa->wsa_mclk_users = 0; in wsa_macro_mclk_enable()
1437 wsa->wsa_mclk_users--; in wsa_macro_mclk_enable()
1438 if (wsa->wsa_mclk_users == 0) { in wsa_macro_mclk_enable()
1454 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in wsa_macro_mclk_event()
1465 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in wsa_macro_enable_vi_feedback()
1469 if (test_bit(WSA_MACRO_TX0, &wsa->active_ch_mask[WSA_MACRO_AIF_VI])) { in wsa_macro_enable_vi_feedback()
1472 } else if (test_bit(WSA_MACRO_TX1, &wsa->active_ch_mask[WSA_MACRO_AIF_VI])) { in wsa_macro_enable_vi_feedback()
1528 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in wsa_macro_enable_mix_path()
1532 switch (w->shift) { in wsa_macro_enable_mix_path()
1605 if (!wsa->comp_enabled[comp]) in wsa_macro_config_compander()
1609 (comp * wsa->reg_layout->compander1_reg_offset); in wsa_macro_config_compander()
1655 u16 softclip_clk_reg = wsa->reg_layout->softclip0_reg_base + in wsa_macro_enable_softclip_clk()
1656 (path * wsa->reg_layout->softclip1_reg_offset); in wsa_macro_enable_softclip_clk()
1661 if (wsa->softclip_clk_users[path] == 0) { in wsa_macro_enable_softclip_clk()
1670 wsa->softclip_clk_users[path]++; in wsa_macro_enable_softclip_clk()
1672 wsa->softclip_clk_users[path]--; in wsa_macro_enable_softclip_clk()
1673 if (wsa->softclip_clk_users[path] == 0) { in wsa_macro_enable_softclip_clk()
1697 if (!wsa->is_softclip_on[softclip_path]) in wsa_macro_config_softclip()
1701 (softclip_path * wsa->reg_layout->softclip1_reg_offset); in wsa_macro_config_softclip()
1734 wsa->reg_layout->rx_intx_1_mix_inp0_sel_mask); in wsa_macro_adie_lb()
1740 wsa->reg_layout->rx_intx_1_mix_inp1_sel_mask); in wsa_macro_adie_lb()
1746 wsa->reg_layout->rx_intx_1_mix_inp2_sel_mask); in wsa_macro_adie_lb()
1758 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in wsa_macro_enable_main_path()
1761 reg = CDC_WSA_RX0_RX_PATH_CTL + WSA_MACRO_RX_PATH_OFFSET * w->shift; in wsa_macro_enable_main_path()
1764 if (wsa_macro_adie_lb(component, w->shift)) { in wsa_macro_enable_main_path()
1807 wsa->prim_int_users[ind]++; in wsa_macro_enable_prim_interpolator()
1808 if (wsa->prim_int_users[ind] == 1) { in wsa_macro_enable_prim_interpolator()
1829 wsa->prim_int_users[ind]--; in wsa_macro_enable_prim_interpolator()
1830 if (wsa->prim_int_users[ind] == 0) { in wsa_macro_enable_prim_interpolator()
1848 switch (wsa->spkr_mode) { in wsa_macro_config_ear_spkr_gain()
1851 comp_gain_offset = -12; in wsa_macro_config_ear_spkr_gain()
1855 comp_gain_offset = -15; in wsa_macro_config_ear_spkr_gain()
1862 if (wsa->comp_enabled[WSA_MACRO_COMP1] && in wsa_macro_config_ear_spkr_gain()
1864 (wsa->ear_spkr_gain != 0)) { in wsa_macro_config_ear_spkr_gain()
1865 /* For example, val is -8(-12+5-1) for 4dB of gain */ in wsa_macro_config_ear_spkr_gain()
1866 val = comp_gain_offset + wsa->ear_spkr_gain - 1; in wsa_macro_config_ear_spkr_gain()
1873 * ear_spkr_gain is non-zero. in wsa_macro_config_ear_spkr_gain()
1875 if (wsa->comp_enabled[WSA_MACRO_COMP1] && in wsa_macro_config_ear_spkr_gain()
1877 (wsa->ear_spkr_gain != 0)) { in wsa_macro_config_ear_spkr_gain()
1890 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in wsa_macro_enable_interpolator()
1896 if (w->shift == WSA_MACRO_COMP1) { in wsa_macro_enable_interpolator()
1899 } else if (w->shift == WSA_MACRO_COMP2) { in wsa_macro_enable_interpolator()
1910 wsa_macro_config_compander(component, w->shift, event); in wsa_macro_enable_interpolator()
1911 wsa_macro_config_softclip(component, w->shift, event); in wsa_macro_enable_interpolator()
1913 if ((wsa->spkr_gain_offset == WSA_MACRO_GAIN_OFFSET_M1P5_DB) && in wsa_macro_enable_interpolator()
1914 (wsa->comp_enabled[WSA_MACRO_COMP1] || in wsa_macro_enable_interpolator()
1915 wsa->comp_enabled[WSA_MACRO_COMP2])) { in wsa_macro_enable_interpolator()
1939 wsa_macro_config_compander(component, w->shift, event); in wsa_macro_enable_interpolator()
1940 wsa_macro_config_softclip(component, w->shift, event); in wsa_macro_enable_interpolator()
1942 if ((wsa->spkr_gain_offset == WSA_MACRO_GAIN_OFFSET_M1P5_DB) && in wsa_macro_enable_interpolator()
1943 (wsa->comp_enabled[WSA_MACRO_COMP1] || in wsa_macro_enable_interpolator()
1944 wsa->comp_enabled[WSA_MACRO_COMP2])) { in wsa_macro_enable_interpolator()
1974 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in wsa_macro_spk_boost_event()
1989 dev_warn(component->dev, "Incorrect widget name in the driver\n"); in wsa_macro_spk_boost_event()
1990 return -EINVAL; in wsa_macro_spk_boost_event()
2025 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in wsa_macro_enable_echo()
2031 switch (w->shift) { in wsa_macro_enable_echo()
2034 ec_tx = val - 1; in wsa_macro_enable_echo()
2038 ec_tx = (val >> CDC_WSA_RX_MIX_TX1_SEL_SHFT) - 1; in wsa_macro_enable_echo()
2041 dev_err(component->dev, "%s: Invalid shift %u\n", in wsa_macro_enable_echo()
2042 __func__, w->shift); in wsa_macro_enable_echo()
2043 return -EINVAL; in wsa_macro_enable_echo()
2046 if (wsa->ec_hq[ec_tx]) { in wsa_macro_enable_echo()
2066 int ec_tx = ((struct soc_mixer_control *) kcontrol->private_value)->shift; in wsa_macro_get_ec_hq()
2069 ucontrol->value.integer.value[0] = wsa->ec_hq[ec_tx]; in wsa_macro_get_ec_hq()
2078 int ec_tx = ((struct soc_mixer_control *) kcontrol->private_value)->shift; in wsa_macro_set_ec_hq()
2079 int value = ucontrol->value.integer.value[0]; in wsa_macro_set_ec_hq()
2082 wsa->ec_hq[ec_tx] = value; in wsa_macro_set_ec_hq()
2092 int comp = ((struct soc_mixer_control *) kcontrol->private_value)->shift; in wsa_macro_get_compander()
2095 ucontrol->value.integer.value[0] = wsa->comp_enabled[comp]; in wsa_macro_get_compander()
2103 int comp = ((struct soc_mixer_control *) kcontrol->private_value)->shift; in wsa_macro_set_compander()
2104 int value = ucontrol->value.integer.value[0]; in wsa_macro_set_compander()
2107 wsa->comp_enabled[comp] = value; in wsa_macro_set_compander()
2118 ucontrol->value.integer.value[0] = wsa->ear_spkr_gain; in wsa_macro_ear_spkr_pa_gain_get()
2129 wsa->ear_spkr_gain = ucontrol->value.integer.value[0]; in wsa_macro_ear_spkr_pa_gain_put()
2140 snd_soc_dapm_to_component(widget->dapm); in wsa_macro_rx_mux_get()
2143 ucontrol->value.integer.value[0] = in wsa_macro_rx_mux_get()
2144 wsa->rx_port_value[widget->shift]; in wsa_macro_rx_mux_get()
2154 snd_soc_dapm_to_component(widget->dapm); in wsa_macro_rx_mux_put()
2155 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; in wsa_macro_rx_mux_put()
2157 u32 rx_port_value = ucontrol->value.integer.value[0]; in wsa_macro_rx_mux_put()
2162 aif_rst = wsa->rx_port_value[widget->shift]; in wsa_macro_rx_mux_put()
2167 dev_err(component->dev, "%s: Invalid AIF reset\n", __func__); in wsa_macro_rx_mux_put()
2171 wsa->rx_port_value[widget->shift] = rx_port_value; in wsa_macro_rx_mux_put()
2173 bit_input = widget->shift; in wsa_macro_rx_mux_put()
2177 if (wsa->active_ch_cnt[aif_rst]) { in wsa_macro_rx_mux_put()
2179 &wsa->active_ch_mask[aif_rst]); in wsa_macro_rx_mux_put()
2180 wsa->active_ch_cnt[aif_rst]--; in wsa_macro_rx_mux_put()
2186 &wsa->active_ch_mask[rx_port_value]); in wsa_macro_rx_mux_put()
2187 wsa->active_ch_cnt[rx_port_value]++; in wsa_macro_rx_mux_put()
2190 dev_err(component->dev, in wsa_macro_rx_mux_put()
2193 return -EINVAL; in wsa_macro_rx_mux_put()
2196 snd_soc_dapm_mux_update_power(widget->dapm, kcontrol, in wsa_macro_rx_mux_put()
2206 int path = ((struct soc_mixer_control *)kcontrol->private_value)->shift; in wsa_macro_soft_clip_enable_get()
2208 ucontrol->value.integer.value[0] = wsa->is_softclip_on[path]; in wsa_macro_soft_clip_enable_get()
2218 int path = ((struct soc_mixer_control *) kcontrol->private_value)->shift; in wsa_macro_soft_clip_enable_put()
2220 wsa->is_softclip_on[path] = ucontrol->value.integer.value[0]; in wsa_macro_soft_clip_enable_put()
2239 -84, 40, digital_gain),
2241 -84, 40, digital_gain),
2277 struct snd_soc_component *component = snd_soc_dapm_to_component(widget->dapm); in wsa_macro_vi_feed_mixer_get()
2278 struct soc_mixer_control *mixer = (struct soc_mixer_control *)kcontrol->private_value; in wsa_macro_vi_feed_mixer_get()
2280 u32 spk_tx_id = mixer->shift; in wsa_macro_vi_feed_mixer_get()
2281 u32 dai_id = widget->shift; in wsa_macro_vi_feed_mixer_get()
2283 if (test_bit(spk_tx_id, &wsa->active_ch_mask[dai_id])) in wsa_macro_vi_feed_mixer_get()
2284 ucontrol->value.integer.value[0] = 1; in wsa_macro_vi_feed_mixer_get()
2286 ucontrol->value.integer.value[0] = 0; in wsa_macro_vi_feed_mixer_get()
2295 struct snd_soc_component *component = snd_soc_dapm_to_component(widget->dapm); in wsa_macro_vi_feed_mixer_put()
2296 struct soc_mixer_control *mixer = (struct soc_mixer_control *)kcontrol->private_value; in wsa_macro_vi_feed_mixer_put()
2298 u32 enable = ucontrol->value.integer.value[0]; in wsa_macro_vi_feed_mixer_put()
2299 u32 spk_tx_id = mixer->shift; in wsa_macro_vi_feed_mixer_put()
2300 u32 dai_id = widget->shift; in wsa_macro_vi_feed_mixer_put()
2305 &wsa->active_ch_mask[dai_id])) { in wsa_macro_vi_feed_mixer_put()
2307 &wsa->active_ch_mask[dai_id]); in wsa_macro_vi_feed_mixer_put()
2308 wsa->active_ch_cnt[dai_id]++; in wsa_macro_vi_feed_mixer_put()
2312 &wsa->active_ch_mask[dai_id])) { in wsa_macro_vi_feed_mixer_put()
2314 &wsa->active_ch_mask[dai_id]); in wsa_macro_vi_feed_mixer_put()
2315 wsa->active_ch_cnt[dai_id]++; in wsa_macro_vi_feed_mixer_put()
2320 &wsa->active_ch_mask[dai_id])) { in wsa_macro_vi_feed_mixer_put()
2322 &wsa->active_ch_mask[dai_id]); in wsa_macro_vi_feed_mixer_put()
2323 wsa->active_ch_cnt[dai_id]--; in wsa_macro_vi_feed_mixer_put()
2327 &wsa->active_ch_mask[dai_id])) { in wsa_macro_vi_feed_mixer_put()
2329 &wsa->active_ch_mask[dai_id]); in wsa_macro_vi_feed_mixer_put()
2330 wsa->active_ch_cnt[dai_id]--; in wsa_macro_vi_feed_mixer_put()
2333 snd_soc_dapm_mixer_update_power(widget->dapm, kcontrol, enable, NULL); in wsa_macro_vi_feed_mixer_put()
2582 struct regmap *regmap = wsa->regmap; in wsa_swrm_clock()
2587 ret = clk_prepare_enable(wsa->mclk); in wsa_swrm_clock()
2589 dev_err(wsa->dev, "failed to enable mclk\n"); in wsa_swrm_clock()
2602 clk_disable_unprepare(wsa->mclk); in wsa_swrm_clock()
2615 snd_soc_component_init_regmap(comp, wsa->regmap); in wsa_macro_component_probe()
2617 wsa->spkr_gain_offset = WSA_MACRO_GAIN_OFFSET_M1P5_DB; in wsa_macro_component_probe()
2630 switch (wsa->codec_version) { in wsa_macro_component_probe()
2647 return -EINVAL; in wsa_macro_component_probe()
2668 regmap_read(wsa->regmap, CDC_WSA_CLK_RST_CTRL_SWR_CONTROL, &val); in swclk_gate_is_enabled()
2689 struct device *dev = wsa->dev; in wsa_macro_register_mclk_output()
2695 if (wsa->npl) in wsa_macro_register_mclk_output()
2696 parent_clk_name = __clk_get_name(wsa->npl); in wsa_macro_register_mclk_output()
2698 parent_clk_name = __clk_get_name(wsa->mclk); in wsa_macro_register_mclk_output()
2701 of_property_read_string(dev_of_node(dev), "clock-output-names", in wsa_macro_register_mclk_output()
2707 wsa->hw.init = &init; in wsa_macro_register_mclk_output()
2708 hw = &wsa->hw; in wsa_macro_register_mclk_output()
2709 ret = clk_hw_register(wsa->dev, hw); in wsa_macro_register_mclk_output()
2729 struct device *dev = &pdev->dev; in wsa_macro_probe()
2739 return -ENOMEM; in wsa_macro_probe()
2741 wsa->macro = devm_clk_get_optional(dev, "macro"); in wsa_macro_probe()
2742 if (IS_ERR(wsa->macro)) in wsa_macro_probe()
2743 return dev_err_probe(dev, PTR_ERR(wsa->macro), "unable to get macro clock\n"); in wsa_macro_probe()
2745 wsa->dcodec = devm_clk_get_optional(dev, "dcodec"); in wsa_macro_probe()
2746 if (IS_ERR(wsa->dcodec)) in wsa_macro_probe()
2747 return dev_err_probe(dev, PTR_ERR(wsa->dcodec), "unable to get dcodec clock\n"); in wsa_macro_probe()
2749 wsa->mclk = devm_clk_get(dev, "mclk"); in wsa_macro_probe()
2750 if (IS_ERR(wsa->mclk)) in wsa_macro_probe()
2751 return dev_err_probe(dev, PTR_ERR(wsa->mclk), "unable to get mclk clock\n"); in wsa_macro_probe()
2754 wsa->npl = devm_clk_get(dev, "npl"); in wsa_macro_probe()
2755 if (IS_ERR(wsa->npl)) in wsa_macro_probe()
2756 return dev_err_probe(dev, PTR_ERR(wsa->npl), "unable to get npl clock\n"); in wsa_macro_probe()
2759 wsa->fsgen = devm_clk_get(dev, "fsgen"); in wsa_macro_probe()
2760 if (IS_ERR(wsa->fsgen)) in wsa_macro_probe()
2761 return dev_err_probe(dev, PTR_ERR(wsa->fsgen), "unable to get fsgen clock\n"); in wsa_macro_probe()
2767 wsa->codec_version = lpass_macro_get_codec_version(); in wsa_macro_probe()
2770 switch (wsa->codec_version) { in wsa_macro_probe()
2776 wsa->reg_layout = &wsa_codec_v2_1; in wsa_macro_probe()
2781 return -ENOMEM; in wsa_macro_probe()
2791 wsa->reg_layout = &wsa_codec_v2_5; in wsa_macro_probe()
2796 return -ENOMEM; in wsa_macro_probe()
2803 dev_err(dev, "Unsupported Codec version (%d)\n", wsa->codec_version); in wsa_macro_probe()
2804 return -EINVAL; in wsa_macro_probe()
2811 return -ENOMEM; in wsa_macro_probe()
2813 reg_config->reg_defaults = reg_defaults; in wsa_macro_probe()
2814 reg_config->num_reg_defaults = def_count; in wsa_macro_probe()
2816 wsa->regmap = devm_regmap_init_mmio(dev, base, reg_config); in wsa_macro_probe()
2817 if (IS_ERR(wsa->regmap)) in wsa_macro_probe()
2818 return PTR_ERR(wsa->regmap); in wsa_macro_probe()
2822 wsa->dev = dev; in wsa_macro_probe()
2825 clk_set_rate(wsa->mclk, WSA_MACRO_MCLK_FREQ); in wsa_macro_probe()
2826 clk_set_rate(wsa->npl, WSA_MACRO_MCLK_FREQ); in wsa_macro_probe()
2828 ret = clk_prepare_enable(wsa->macro); in wsa_macro_probe()
2832 ret = clk_prepare_enable(wsa->dcodec); in wsa_macro_probe()
2836 ret = clk_prepare_enable(wsa->mclk); in wsa_macro_probe()
2840 ret = clk_prepare_enable(wsa->npl); in wsa_macro_probe()
2844 ret = clk_prepare_enable(wsa->fsgen); in wsa_macro_probe()
2849 regmap_update_bits(wsa->regmap, CDC_WSA_CLK_RST_CTRL_SWR_CONTROL, in wsa_macro_probe()
2852 regmap_update_bits(wsa->regmap, CDC_WSA_CLK_RST_CTRL_SWR_CONTROL, in wsa_macro_probe()
2856 regmap_update_bits(wsa->regmap, CDC_WSA_CLK_RST_CTRL_SWR_CONTROL, in wsa_macro_probe()
2878 clk_disable_unprepare(wsa->fsgen); in wsa_macro_probe()
2880 clk_disable_unprepare(wsa->npl); in wsa_macro_probe()
2882 clk_disable_unprepare(wsa->mclk); in wsa_macro_probe()
2884 clk_disable_unprepare(wsa->dcodec); in wsa_macro_probe()
2886 clk_disable_unprepare(wsa->macro); in wsa_macro_probe()
2894 struct wsa_macro *wsa = dev_get_drvdata(&pdev->dev); in wsa_macro_remove()
2896 clk_disable_unprepare(wsa->macro); in wsa_macro_remove()
2897 clk_disable_unprepare(wsa->dcodec); in wsa_macro_remove()
2898 clk_disable_unprepare(wsa->mclk); in wsa_macro_remove()
2899 clk_disable_unprepare(wsa->npl); in wsa_macro_remove()
2900 clk_disable_unprepare(wsa->fsgen); in wsa_macro_remove()
2907 regcache_cache_only(wsa->regmap, true); in wsa_macro_runtime_suspend()
2908 regcache_mark_dirty(wsa->regmap); in wsa_macro_runtime_suspend()
2910 clk_disable_unprepare(wsa->fsgen); in wsa_macro_runtime_suspend()
2911 clk_disable_unprepare(wsa->npl); in wsa_macro_runtime_suspend()
2912 clk_disable_unprepare(wsa->mclk); in wsa_macro_runtime_suspend()
2922 ret = clk_prepare_enable(wsa->mclk); in wsa_macro_runtime_resume()
2928 ret = clk_prepare_enable(wsa->npl); in wsa_macro_runtime_resume()
2934 ret = clk_prepare_enable(wsa->fsgen); in wsa_macro_runtime_resume()
2940 regcache_cache_only(wsa->regmap, false); in wsa_macro_runtime_resume()
2941 regcache_sync(wsa->regmap); in wsa_macro_runtime_resume()
2945 clk_disable_unprepare(wsa->npl); in wsa_macro_runtime_resume()
2947 clk_disable_unprepare(wsa->mclk); in wsa_macro_runtime_resume()
2958 .compatible = "qcom,sc7280-lpass-wsa-macro",
2961 .compatible = "qcom,sm8250-lpass-wsa-macro",
2964 .compatible = "qcom,sm8450-lpass-wsa-macro",
2967 .compatible = "qcom,sm8550-lpass-wsa-macro",
2969 .compatible = "qcom,sc8280xp-lpass-wsa-macro",