• Home
  • Raw
  • Download

Lines Matching full:wcd

23 #include "wcd-clsh-v2.h"
96 /* As fine version info cannot be retrieved before wcd probe.
97 * Define three coarse versions for possible future use before wcd probe.
1186 static int wcd934x_set_sido_input_src(struct wcd934x_codec *wcd, int sido_src) in wcd934x_set_sido_input_src() argument
1188 if (sido_src == wcd->sido_input_src) in wcd934x_set_sido_input_src()
1192 regmap_update_bits(wcd->regmap, WCD934X_ANA_RCO, in wcd934x_set_sido_input_src()
1197 wcd->sido_input_src = sido_src; in wcd934x_set_sido_input_src()
1202 static int wcd934x_enable_ana_bias_and_sysclk(struct wcd934x_codec *wcd) in wcd934x_enable_ana_bias_and_sysclk() argument
1204 mutex_lock(&wcd->sysclk_mutex); in wcd934x_enable_ana_bias_and_sysclk()
1206 if (++wcd->sysclk_users != 1) { in wcd934x_enable_ana_bias_and_sysclk()
1207 mutex_unlock(&wcd->sysclk_mutex); in wcd934x_enable_ana_bias_and_sysclk()
1210 mutex_unlock(&wcd->sysclk_mutex); in wcd934x_enable_ana_bias_and_sysclk()
1212 regmap_update_bits(wcd->regmap, WCD934X_ANA_BIAS, in wcd934x_enable_ana_bias_and_sysclk()
1215 regmap_update_bits(wcd->regmap, WCD934X_ANA_BIAS, in wcd934x_enable_ana_bias_and_sysclk()
1223 regmap_update_bits(wcd->regmap, WCD934X_ANA_BIAS, in wcd934x_enable_ana_bias_and_sysclk()
1225 regmap_update_bits(wcd->regmap, WCD934X_ANA_BIAS, in wcd934x_enable_ana_bias_and_sysclk()
1233 regmap_update_bits(wcd->regmap, WCD934X_CLK_SYS_MCLK_PRG, in wcd934x_enable_ana_bias_and_sysclk()
1236 regmap_update_bits(wcd->regmap, WCD934X_CLK_SYS_MCLK_PRG, in wcd934x_enable_ana_bias_and_sysclk()
1239 regmap_update_bits(wcd->regmap, WCD934X_CLK_SYS_MCLK_PRG, in wcd934x_enable_ana_bias_and_sysclk()
1242 regmap_update_bits(wcd->regmap, WCD934X_CLK_SYS_MCLK_PRG, in wcd934x_enable_ana_bias_and_sysclk()
1244 regmap_update_bits(wcd->regmap, in wcd934x_enable_ana_bias_and_sysclk()
1248 regmap_update_bits(wcd->regmap, in wcd934x_enable_ana_bias_and_sysclk()
1252 regmap_update_bits(wcd->regmap, WCD934X_CODEC_RPM_CLK_GATE, in wcd934x_enable_ana_bias_and_sysclk()
1260 wcd934x_set_sido_input_src(wcd, SIDO_SOURCE_RCO_BG); in wcd934x_enable_ana_bias_and_sysclk()
1265 static int wcd934x_disable_ana_bias_and_syclk(struct wcd934x_codec *wcd) in wcd934x_disable_ana_bias_and_syclk() argument
1267 mutex_lock(&wcd->sysclk_mutex); in wcd934x_disable_ana_bias_and_syclk()
1268 if (--wcd->sysclk_users != 0) { in wcd934x_disable_ana_bias_and_syclk()
1269 mutex_unlock(&wcd->sysclk_mutex); in wcd934x_disable_ana_bias_and_syclk()
1272 mutex_unlock(&wcd->sysclk_mutex); in wcd934x_disable_ana_bias_and_syclk()
1274 regmap_update_bits(wcd->regmap, WCD934X_CLK_SYS_MCLK_PRG, in wcd934x_disable_ana_bias_and_syclk()
1277 regmap_update_bits(wcd->regmap, WCD934X_ANA_BIAS, in wcd934x_disable_ana_bias_and_syclk()
1279 regmap_update_bits(wcd->regmap, WCD934X_ANA_BIAS, in wcd934x_disable_ana_bias_and_syclk()
1285 static int __wcd934x_cdc_mclk_enable(struct wcd934x_codec *wcd, bool enable) in __wcd934x_cdc_mclk_enable() argument
1290 ret = clk_prepare_enable(wcd->extclk); in __wcd934x_cdc_mclk_enable()
1293 dev_err(wcd->dev, "%s: ext clk enable failed\n", in __wcd934x_cdc_mclk_enable()
1297 ret = wcd934x_enable_ana_bias_and_sysclk(wcd); in __wcd934x_cdc_mclk_enable()
1301 regmap_read(wcd->regmap, WCD934X_CDC_CLK_RST_CTRL_SWR_CONTROL, in __wcd934x_cdc_mclk_enable()
1308 wcd934x_disable_ana_bias_and_syclk(wcd); in __wcd934x_cdc_mclk_enable()
1309 clk_disable_unprepare(wcd->extclk); in __wcd934x_cdc_mclk_enable()
1319 struct wcd934x_codec *wcd = dev_get_drvdata(comp->dev); in wcd934x_codec_enable_mclk() local
1323 return __wcd934x_cdc_mclk_enable(wcd, true); in wcd934x_codec_enable_mclk()
1325 return __wcd934x_cdc_mclk_enable(wcd, false); in wcd934x_codec_enable_mclk()
1331 static int wcd934x_get_version(struct wcd934x_codec *wcd) in wcd934x_get_version() argument
1338 regmap = wcd->regmap; in wcd934x_get_version()
1368 wcd->version = ver; in wcd934x_get_version()
1369 dev_info(wcd->dev, "WCD934X Minor:0x%x Version:0x%x\n", id_minor, ver); in wcd934x_get_version()
1374 static void wcd934x_enable_efuse_sensing(struct wcd934x_codec *wcd) in wcd934x_enable_efuse_sensing() argument
1378 __wcd934x_cdc_mclk_enable(wcd, true); in wcd934x_enable_efuse_sensing()
1380 regmap_update_bits(wcd->regmap, in wcd934x_enable_efuse_sensing()
1384 regmap_update_bits(wcd->regmap, in wcd934x_enable_efuse_sensing()
1393 wcd934x_set_sido_input_src(wcd, SIDO_SOURCE_RCO_BG); in wcd934x_enable_efuse_sensing()
1395 rc = regmap_read(wcd->regmap, in wcd934x_enable_efuse_sensing()
1401 __wcd934x_cdc_mclk_enable(wcd, false); in wcd934x_enable_efuse_sensing()
1404 static int wcd934x_swrm_clock(struct wcd934x_codec *wcd, bool enable) in wcd934x_swrm_clock() argument
1407 __wcd934x_cdc_mclk_enable(wcd, true); in wcd934x_swrm_clock()
1408 regmap_update_bits(wcd->regmap, in wcd934x_swrm_clock()
1413 regmap_update_bits(wcd->regmap, in wcd934x_swrm_clock()
1416 __wcd934x_cdc_mclk_enable(wcd, false); in wcd934x_swrm_clock()
1426 struct wcd934x_codec *wcd = dev_get_drvdata(comp->dev); in wcd934x_set_prim_interpolator_rate() local
1431 list_for_each_entry(ch, &wcd->dai[dai->id].slim_ch_list, list) { in wcd934x_set_prim_interpolator_rate()
1464 dev_err(wcd->dev, in wcd934x_set_prim_interpolator_rate()
1483 struct wcd934x_codec *wcd = dev_get_drvdata(component->dev); in wcd934x_set_mix_interpolator_rate() local
1487 list_for_each_entry(ch, &wcd->dai[dai->id].slim_ch_list, list) { in wcd934x_set_mix_interpolator_rate()
1554 struct wcd934x_codec *wcd = snd_soc_component_get_drvdata(comp); in wcd934x_set_decimator_rate() local
1560 list_for_each_entry(ch, &wcd->dai[dai->id].slim_ch_list, list) { in wcd934x_set_decimator_rate()
1590 dev_err(wcd->dev, "Invalid SLIM TX%u port DAI ID:%d\n", in wcd934x_set_decimator_rate()
1617 dev_err(wcd->dev, "ERROR: Invalid tx_port: %d\n", in wcd934x_set_decimator_rate()
1631 static int wcd934x_slim_set_hw_params(struct wcd934x_codec *wcd, in wcd934x_slim_set_hw_params() argument
1661 ret = regmap_write(wcd->if_regmap, in wcd934x_slim_set_hw_params()
1669 ret = regmap_write(wcd->if_regmap, in wcd934x_slim_set_hw_params()
1675 ret = regmap_write(wcd->if_regmap, in wcd934x_slim_set_hw_params()
1682 ret = regmap_write(wcd->if_regmap, in wcd934x_slim_set_hw_params()
1689 ret = regmap_write(wcd->if_regmap, in wcd934x_slim_set_hw_params()
1698 dai_data->sruntime = slim_stream_allocate(wcd->sdev, "WCD934x-SLIM"); in wcd934x_slim_set_hw_params()
1703 dev_err(wcd->dev, "Error Setting slim hw params\n"); in wcd934x_slim_set_hw_params()
1714 struct wcd934x_codec *wcd; in wcd934x_hw_params() local
1717 wcd = snd_soc_component_get_drvdata(dai->component); in wcd934x_hw_params()
1723 dev_err(wcd->dev, "cannot set sample rate: %u\n", in wcd934x_hw_params()
1729 wcd->dai[dai->id].sconfig.bps = params_width(params); in wcd934x_hw_params()
1732 dev_err(wcd->dev, "Invalid format 0x%x\n", in wcd934x_hw_params()
1762 dev_err(wcd->dev, "Invalid TX sample rate: %d\n", in wcd934x_hw_params()
1771 dev_err(wcd->dev, "Cannot set TX Decimator rate\n"); in wcd934x_hw_params()
1776 wcd->dai[dai->id].sconfig.bps = params_width(params); in wcd934x_hw_params()
1779 dev_err(wcd->dev, "Invalid format 0x%x\n", in wcd934x_hw_params()
1785 dev_err(wcd->dev, "Invalid stream type %d\n", in wcd934x_hw_params()
1790 wcd->dai[dai->id].sconfig.rate = params_rate(params); in wcd934x_hw_params()
1792 return wcd934x_slim_set_hw_params(wcd, &wcd->dai[dai->id], substream->stream); in wcd934x_hw_params()
1799 struct wcd934x_codec *wcd; in wcd934x_hw_free() local
1801 wcd = snd_soc_component_get_drvdata(dai->component); in wcd934x_hw_free()
1803 dai_data = &wcd->dai[dai->id]; in wcd934x_hw_free()
1814 struct wcd934x_codec *wcd; in wcd934x_trigger() local
1817 wcd = snd_soc_component_get_drvdata(dai->component); in wcd934x_trigger()
1819 dai_data = &wcd->dai[dai->id]; in wcd934x_trigger()
1846 struct wcd934x_codec *wcd; in wcd934x_set_channel_map() local
1849 wcd = snd_soc_component_get_drvdata(dai->component); in wcd934x_set_channel_map()
1852 dev_err(wcd->dev, "Invalid tx %d or rx %d channel count\n", in wcd934x_set_channel_map()
1858 dev_err(wcd->dev, "Invalid tx_slot=%p, rx_slot=%p\n", in wcd934x_set_channel_map()
1863 wcd->num_rx_port = rx_num; in wcd934x_set_channel_map()
1865 wcd->rx_chs[i].ch_num = rx_slot[i]; in wcd934x_set_channel_map()
1866 INIT_LIST_HEAD(&wcd->rx_chs[i].list); in wcd934x_set_channel_map()
1869 wcd->num_tx_port = tx_num; in wcd934x_set_channel_map()
1871 wcd->tx_chs[i].ch_num = tx_slot[i]; in wcd934x_set_channel_map()
1872 INIT_LIST_HEAD(&wcd->tx_chs[i].list); in wcd934x_set_channel_map()
1883 struct wcd934x_codec *wcd; in wcd934x_get_channel_map() local
1886 wcd = snd_soc_component_get_drvdata(dai->component); in wcd934x_get_channel_map()
1894 dev_err(wcd->dev, "Invalid rx_slot %p or rx_num %p\n", in wcd934x_get_channel_map()
1899 list_for_each_entry(ch, &wcd->dai[dai->id].slim_ch_list, list) in wcd934x_get_channel_map()
1908 dev_err(wcd->dev, "Invalid tx_slot %p or tx_num %p\n", in wcd934x_get_channel_map()
1913 list_for_each_entry(ch, &wcd->dai[dai->id].slim_ch_list, list) in wcd934x_get_channel_map()
1919 dev_err(wcd->dev, "Invalid DAI ID %x\n", dai->id); in wcd934x_get_channel_map()
2047 struct wcd934x_codec *wcd = to_wcd934x_codec(hw); in swclk_gate_is_enabled() local
2050 regmap_read(wcd->regmap, WCD934X_CDC_CLK_RST_CTRL_SWR_CONTROL, &val); in swclk_gate_is_enabled()
2070 static struct clk *wcd934x_register_mclk_output(struct wcd934x_codec *wcd) in wcd934x_register_mclk_output() argument
2072 struct clk *parent = wcd->extclk; in wcd934x_register_mclk_output()
2073 struct device *dev = wcd->dev; in wcd934x_register_mclk_output()
2081 if (of_property_read_u32(np, "clock-frequency", &wcd->rate)) in wcd934x_register_mclk_output()
2093 wcd->hw.init = &init; in wcd934x_register_mclk_output()
2095 hw = &wcd->hw; in wcd934x_register_mclk_output()
2096 ret = clk_hw_register(wcd->dev->parent, hw); in wcd934x_register_mclk_output()
2129 struct wcd934x_codec *wcd = dev_get_drvdata(comp->dev); in wcd934x_init_dmic() local
2150 if (wcd->rate == WCD934X_MCLK_CLK_9P6MHZ) in wcd934x_init_dmic()
2155 wcd->dmic_sample_rate = def_dmic_rate; in wcd934x_init_dmic()
2164 static void wcd934x_hw_init(struct wcd934x_codec *wcd) in wcd934x_hw_init() argument
2166 struct regmap *rm = wcd->regmap; in wcd934x_hw_init()
2178 struct wcd934x_codec *wcd = dev_get_drvdata(component->dev); in wcd934x_comp_init() local
2180 wcd934x_hw_init(wcd); in wcd934x_comp_init()
2181 wcd934x_enable_efuse_sensing(wcd); in wcd934x_comp_init()
2182 wcd934x_get_version(wcd); in wcd934x_comp_init()
2189 struct wcd934x_codec *wcd = data; in wcd934x_slim_irq_handler() local
2199 regmap_read(wcd->if_regmap, i, &val); in wcd934x_slim_irq_handler()
2212 regmap_read(wcd->if_regmap, in wcd934x_slim_irq_handler()
2221 regmap_read(wcd->if_regmap, reg, &int_val); in wcd934x_slim_irq_handler()
2225 dev_err_ratelimited(wcd->dev, in wcd934x_slim_irq_handler()
2230 dev_err_ratelimited(wcd->dev, in wcd934x_slim_irq_handler()
2243 wcd->if_regmap, reg, &int_val); in wcd934x_slim_irq_handler()
2246 regmap_write(wcd->if_regmap, in wcd934x_slim_irq_handler()
2252 dev_err_ratelimited(wcd->dev, in wcd934x_slim_irq_handler()
2256 regmap_write(wcd->if_regmap, in wcd934x_slim_irq_handler()
2267 struct wcd934x_codec *wcd = dev_get_drvdata(component->dev); in wcd934x_comp_probe() local
2270 snd_soc_component_init_regmap(component, wcd->regmap); in wcd934x_comp_probe()
2271 wcd->component = component; in wcd934x_comp_probe()
2274 wcd->clsh_ctrl = wcd_clsh_ctrl_alloc(component, wcd->version); in wcd934x_comp_probe()
2275 if (IS_ERR(wcd->clsh_ctrl)) in wcd934x_comp_probe()
2276 return PTR_ERR(wcd->clsh_ctrl); in wcd934x_comp_probe()
2279 wcd->hph_mode = CLS_H_LOHIFI; in wcd934x_comp_probe()
2284 INIT_LIST_HEAD(&wcd->dai[i].slim_ch_list); in wcd934x_comp_probe()
2292 struct wcd934x_codec *wcd = dev_get_drvdata(comp->dev); in wcd934x_comp_remove() local
2294 wcd_clsh_ctrl_free(wcd->clsh_ctrl); in wcd934x_comp_remove()
2301 struct wcd934x_codec *wcd = dev_get_drvdata(comp->dev); in wcd934x_comp_set_sysclk() local
2304 wcd->rate = freq; in wcd934x_comp_set_sysclk()
2306 if (wcd->rate == WCD934X_MCLK_CLK_12P288MHZ) in wcd934x_comp_set_sysclk()
2313 return clk_set_rate(wcd->extclk, freq); in wcd934x_comp_set_sysclk()
2433 struct wcd934x_codec *wcd = dev_get_drvdata(component->dev); in wcd934x_compander_get() local
2435 ucontrol->value.integer.value[0] = wcd->comp_enabled[comp]; in wcd934x_compander_get()
2444 struct wcd934x_codec *wcd = dev_get_drvdata(component->dev); in wcd934x_compander_set() local
2449 if (wcd->comp_enabled[comp] == value) in wcd934x_compander_set()
2452 wcd->comp_enabled[comp] = value; in wcd934x_compander_set()
2485 struct wcd934x_codec *wcd = dev_get_drvdata(component->dev); in wcd934x_rx_hph_mode_get() local
2487 ucontrol->value.enumerated.item[0] = wcd->hph_mode; in wcd934x_rx_hph_mode_get()
2496 struct wcd934x_codec *wcd = dev_get_drvdata(component->dev); in wcd934x_rx_hph_mode_put() local
2501 if (mode_val == wcd->hph_mode) in wcd934x_rx_hph_mode_put()
2505 dev_err(wcd->dev, "Invalid HPH Mode, default to ClSH HiFi\n"); in wcd934x_rx_hph_mode_put()
2508 wcd->hph_mode = mode_val; in wcd934x_rx_hph_mode_put()
2518 struct wcd934x_codec *wcd = dev_get_drvdata(dapm->dev); in slim_rx_mux_get() local
2520 ucontrol->value.enumerated.item[0] = wcd->rx_port_value[w->shift]; in slim_rx_mux_get()
2554 struct wcd934x_codec *wcd = dev_get_drvdata(w->dapm->dev); in slim_rx_mux_put() local
2561 int prev_mux_idx = wcd->rx_port_value[port_id]; in slim_rx_mux_put()
2575 list_for_each_entry_safe(ch, c, &wcd->dai[aif_id].slim_ch_list, list) { in slim_rx_mux_put()
2591 if (list_empty(&wcd->rx_chs[port_id].list)) { in slim_rx_mux_put()
2592 list_add_tail(&wcd->rx_chs[port_id].list, in slim_rx_mux_put()
2593 &wcd->dai[aif_id].slim_ch_list); in slim_rx_mux_put()
2595 dev_err(wcd->dev ,"SLIM_RX%d PORT is busy\n", port_id); in slim_rx_mux_put()
2601 dev_err(wcd->dev, "Unknown AIF %d\n", mux_idx); in slim_rx_mux_put()
2605 wcd->rx_port_value[port_id] = mux_idx; in slim_rx_mux_put()
2606 snd_soc_dapm_mux_update_power(w->dapm, kc, wcd->rx_port_value[port_id], in slim_rx_mux_put()
3036 struct wcd934x_codec *wcd = dev_get_drvdata(dapm->dev); in slim_tx_mixer_get() local
3041 ucontrol->value.integer.value[0] = wcd->tx_port_value[port_id]; in slim_tx_mixer_get()
3050 struct wcd934x_codec *wcd = dev_get_drvdata(widget->dapm->dev); in slim_tx_mixer_put() local
3060 if (enable == wcd->tx_port_value[port_id]) in slim_tx_mixer_put()
3064 if (list_empty(&wcd->tx_chs[port_id].list)) { in slim_tx_mixer_put()
3065 list_add_tail(&wcd->tx_chs[port_id].list, in slim_tx_mixer_put()
3066 &wcd->dai[dai_id].slim_ch_list); in slim_tx_mixer_put()
3068 dev_err(wcd->dev ,"SLIM_TX%d PORT is busy\n", port_id); in slim_tx_mixer_put()
3074 list_for_each_entry_safe(ch, c, &wcd->dai[dai_id].slim_ch_list, list) { in slim_tx_mixer_put()
3077 list_del_init(&wcd->tx_chs[port_id].list); in slim_tx_mixer_put()
3085 wcd->tx_port_value[port_id] = enable; in slim_tx_mixer_put()
3353 struct wcd934x_codec *wcd = dev_get_drvdata(component->dev); in wcd934x_codec_enable_int_port() local
3365 regmap_read(wcd->if_regmap, reg, &val); in wcd934x_codec_enable_int_port()
3367 regmap_write(wcd->if_regmap, reg, in wcd934x_codec_enable_int_port()
3376 struct wcd934x_codec *wcd = snd_soc_component_get_drvdata(comp); in wcd934x_codec_enable_slim() local
3377 struct wcd_slim_codec_dai_data *dai = &wcd->dai[w->shift]; in wcd934x_codec_enable_slim()
3465 struct wcd934x_codec *wcd = dev_get_drvdata(comp->dev); in wcd934x_config_compander() local
3474 if (!wcd->comp_enabled[compander]) in wcd934x_config_compander()
3649 struct wcd934x_codec *wcd = dev_get_drvdata(comp->dev); in wcd934x_codec_ear_dac_event() local
3657 wcd_clsh_ctrl_set_state(wcd->clsh_ctrl, WCD_CLSH_EVENT_PRE_DAC, in wcd934x_codec_ear_dac_event()
3662 wcd_clsh_ctrl_set_state(wcd->clsh_ctrl, WCD_CLSH_EVENT_POST_PA, in wcd934x_codec_ear_dac_event()
3675 struct wcd934x_codec *wcd = dev_get_drvdata(comp->dev); in wcd934x_codec_hphl_dac_event() local
3676 int hph_mode = wcd->hph_mode; in wcd934x_codec_hphl_dac_event()
3699 wcd_clsh_ctrl_set_state(wcd->clsh_ctrl, WCD_CLSH_EVENT_PRE_DAC, in wcd934x_codec_hphl_dac_event()
3706 wcd_clsh_ctrl_set_state(wcd->clsh_ctrl, WCD_CLSH_EVENT_POST_PA, in wcd934x_codec_hphl_dac_event()
3727 struct wcd934x_codec *wcd = dev_get_drvdata(comp->dev); in wcd934x_codec_hphr_dac_event() local
3728 int hph_mode = wcd->hph_mode; in wcd934x_codec_hphr_dac_event()
3749 wcd_clsh_ctrl_set_state(wcd->clsh_ctrl, WCD_CLSH_EVENT_PRE_DAC, in wcd934x_codec_hphr_dac_event()
3757 wcd_clsh_ctrl_set_state(wcd->clsh_ctrl, WCD_CLSH_EVENT_POST_PA, in wcd934x_codec_hphr_dac_event()
3776 struct wcd934x_codec *wcd = dev_get_drvdata(comp->dev); in wcd934x_codec_lineout_dac_event() local
3780 wcd_clsh_ctrl_set_state(wcd->clsh_ctrl, WCD_CLSH_EVENT_PRE_DAC, in wcd934x_codec_lineout_dac_event()
3784 wcd_clsh_ctrl_set_state(wcd->clsh_ctrl, WCD_CLSH_EVENT_POST_PA, in wcd934x_codec_lineout_dac_event()
3917 struct wcd934x_codec *wcd) in wcd934x_get_dmic_sample_rate() argument
3951 if (wcd->dmic_sample_rate <= in wcd934x_get_dmic_sample_rate()
3953 dmic_fs = wcd->dmic_sample_rate; in wcd934x_get_dmic_sample_rate()
3959 dmic_fs = wcd->dmic_sample_rate; in wcd934x_get_dmic_sample_rate()
4019 struct wcd934x_codec *wcd = dev_get_drvdata(comp->dev); in wcd934x_codec_enable_dmic() local
4045 dmic_clk_cnt = &wcd->dmic_0_1_clk_cnt; in wcd934x_codec_enable_dmic()
4050 dmic_clk_cnt = &wcd->dmic_2_3_clk_cnt; in wcd934x_codec_enable_dmic()
4055 dmic_clk_cnt = &wcd->dmic_4_5_clk_cnt; in wcd934x_codec_enable_dmic()
4067 wcd); in wcd934x_codec_enable_dmic()
4068 dmic_rate_val = wcd934x_get_dmic_clk_val(comp, wcd->rate, in wcd934x_codec_enable_dmic()
5014 static int wcd934x_codec_parse_data(struct wcd934x_codec *wcd) in wcd934x_codec_parse_data() argument
5016 struct device *dev = &wcd->sdev->dev; in wcd934x_codec_parse_data()
5025 wcd->sidev = of_slim_get_device(wcd->sdev->ctrl, ifc_dev_np); in wcd934x_codec_parse_data()
5027 if (!wcd->sidev) { in wcd934x_codec_parse_data()
5032 slim_get_logical_addr(wcd->sidev); in wcd934x_codec_parse_data()
5033 wcd->if_regmap = regmap_init_slimbus(wcd->sidev, in wcd934x_codec_parse_data()
5035 if (IS_ERR(wcd->if_regmap)) { in wcd934x_codec_parse_data()
5037 return PTR_ERR(wcd->if_regmap); in wcd934x_codec_parse_data()
5041 &wcd->dmic_sample_rate); in wcd934x_codec_parse_data()
5049 struct wcd934x_codec *wcd; in wcd934x_codec_probe() local
5053 wcd = devm_kzalloc(&pdev->dev, sizeof(*wcd), GFP_KERNEL); in wcd934x_codec_probe()
5054 if (!wcd) in wcd934x_codec_probe()
5057 wcd->dev = dev; in wcd934x_codec_probe()
5058 wcd->regmap = data->regmap; in wcd934x_codec_probe()
5059 wcd->extclk = data->extclk; in wcd934x_codec_probe()
5060 wcd->sdev = to_slim_device(data->dev); in wcd934x_codec_probe()
5061 mutex_init(&wcd->sysclk_mutex); in wcd934x_codec_probe()
5063 ret = wcd934x_codec_parse_data(wcd); in wcd934x_codec_probe()
5065 dev_err(wcd->dev, "Failed to get SLIM IRQ\n"); in wcd934x_codec_probe()
5070 regmap_update_bits(wcd->regmap, WCD934X_CODEC_RPM_CLK_MCLK_CFG, in wcd934x_codec_probe()
5073 memcpy(wcd->rx_chs, wcd934x_rx_chs, sizeof(wcd934x_rx_chs)); in wcd934x_codec_probe()
5074 memcpy(wcd->tx_chs, wcd934x_tx_chs, sizeof(wcd934x_tx_chs)); in wcd934x_codec_probe()
5078 dev_err(wcd->dev, "Failed to get SLIM IRQ\n"); in wcd934x_codec_probe()
5085 "slim", wcd); in wcd934x_codec_probe()
5091 wcd934x_register_mclk_output(wcd); in wcd934x_codec_probe()
5092 platform_set_drvdata(pdev, wcd); in wcd934x_codec_probe()