Lines Matching +full:multi +full:- +full:protocol

1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) ST-Ericsson SA 2012
7 * for ST-Ericsson.
17 #include <linux/mfd/dbx500-prcmu.h>
20 #include <sound/soc-dai.h>
30 struct ux500_msp_i2s_drvdata *drvdata = dev_get_drvdata(dai->dev); in setup_pcm_multichan()
31 struct msp_multichannel_config *multi = in setup_pcm_multichan() local
32 &msp_config->multichannel_config; in setup_pcm_multichan()
34 if (drvdata->slots > 1) { in setup_pcm_multichan()
35 msp_config->multichannel_configured = 1; in setup_pcm_multichan()
37 multi->tx_multichannel_enable = true; in setup_pcm_multichan()
38 multi->rx_multichannel_enable = true; in setup_pcm_multichan()
39 multi->rx_comparison_enable_mode = MSP_COMPARISON_DISABLED; in setup_pcm_multichan()
41 multi->tx_channel_0_enable = drvdata->tx_mask; in setup_pcm_multichan()
42 multi->tx_channel_1_enable = 0; in setup_pcm_multichan()
43 multi->tx_channel_2_enable = 0; in setup_pcm_multichan()
44 multi->tx_channel_3_enable = 0; in setup_pcm_multichan()
46 multi->rx_channel_0_enable = drvdata->rx_mask; in setup_pcm_multichan()
47 multi->rx_channel_1_enable = 0; in setup_pcm_multichan()
48 multi->rx_channel_2_enable = 0; in setup_pcm_multichan()
49 multi->rx_channel_3_enable = 0; in setup_pcm_multichan()
51 dev_dbg(dai->dev, in setup_pcm_multichan()
53 __func__, drvdata->slots, multi->tx_channel_0_enable, in setup_pcm_multichan()
54 multi->rx_channel_0_enable); in setup_pcm_multichan()
63 struct ux500_msp_i2s_drvdata *drvdata = dev_get_drvdata(dai->dev); in setup_frameper()
65 switch (drvdata->slots) { in setup_frameper()
69 prot_desc->frame_period = in setup_frameper()
74 prot_desc->frame_period = in setup_frameper()
79 prot_desc->frame_period = in setup_frameper()
84 prot_desc->frame_period = in setup_frameper()
89 dev_err(dai->dev, in setup_frameper()
90 "%s: Error: Unsupported sample-rate (freq = %d)!\n", in setup_frameper()
92 return -EINVAL; in setup_frameper()
97 prot_desc->frame_period = FRAME_PER_2_SLOTS; in setup_frameper()
101 prot_desc->frame_period = FRAME_PER_8_SLOTS; in setup_frameper()
105 prot_desc->frame_period = FRAME_PER_16_SLOTS; in setup_frameper()
108 dev_err(dai->dev, in setup_frameper()
109 "%s: Error: Unsupported slot-count (slots = %d)!\n", in setup_frameper()
110 __func__, drvdata->slots); in setup_frameper()
111 return -EINVAL; in setup_frameper()
114 prot_desc->clocks_per_frame = in setup_frameper()
115 prot_desc->frame_period+1; in setup_frameper()
117 dev_dbg(dai->dev, "%s: Clocks per frame: %u\n", in setup_frameper()
119 prot_desc->clocks_per_frame); in setup_frameper()
127 struct ux500_msp_i2s_drvdata *drvdata = dev_get_drvdata(dai->dev); in setup_pcm_framing()
131 prot_desc->frame_width = 0; in setup_pcm_framing()
133 switch (drvdata->slots) { in setup_pcm_framing()
150 dev_err(dai->dev, in setup_pcm_framing()
151 "%s: Error: Unsupported slot-count (slots = %d)!\n", in setup_pcm_framing()
152 __func__, drvdata->slots); in setup_pcm_framing()
153 return -EINVAL; in setup_pcm_framing()
156 prot_desc->tx_frame_len_1 = frame_length; in setup_pcm_framing()
157 prot_desc->rx_frame_len_1 = frame_length; in setup_pcm_framing()
158 prot_desc->tx_frame_len_2 = frame_length; in setup_pcm_framing()
159 prot_desc->rx_frame_len_2 = frame_length; in setup_pcm_framing()
161 prot_desc->tx_elem_len_1 = MSP_ELEM_LEN_16; in setup_pcm_framing()
162 prot_desc->rx_elem_len_1 = MSP_ELEM_LEN_16; in setup_pcm_framing()
163 prot_desc->tx_elem_len_2 = MSP_ELEM_LEN_16; in setup_pcm_framing()
164 prot_desc->rx_elem_len_2 = MSP_ELEM_LEN_16; in setup_pcm_framing()
178 msp_config->tx_fsync_pol ^= 1 << TFSPOL_SHIFT; in setup_clocking()
179 msp_config->rx_fsync_pol ^= 1 << RFSPOL_SHIFT; in setup_clocking()
184 dev_err(dai->dev, in setup_clocking()
188 return -EINVAL; in setup_clocking()
193 dev_dbg(dai->dev, "%s: Codec is master.\n", __func__); in setup_clocking()
195 msp_config->iodelay = 0x20; in setup_clocking()
196 msp_config->rx_fsync_sel = 0; in setup_clocking()
197 msp_config->tx_fsync_sel = 1 << TFSSEL_SHIFT; in setup_clocking()
198 msp_config->tx_clk_sel = 0; in setup_clocking()
199 msp_config->rx_clk_sel = 0; in setup_clocking()
200 msp_config->srg_clk_sel = 0x2 << SCKSEL_SHIFT; in setup_clocking()
205 dev_dbg(dai->dev, "%s: Codec is slave.\n", __func__); in setup_clocking()
207 msp_config->tx_clk_sel = TX_CLK_SEL_SRG; in setup_clocking()
208 msp_config->tx_fsync_sel = TX_SYNC_SRG_PROG; in setup_clocking()
209 msp_config->rx_clk_sel = RX_CLK_SEL_SRG; in setup_clocking()
210 msp_config->rx_fsync_sel = RX_SYNC_SRG; in setup_clocking()
211 msp_config->srg_clk_sel = 1 << SCKSEL_SHIFT; in setup_clocking()
216 dev_err(dai->dev, "%s: Error: Unsupported master (fmt = 0x%x)!\n", in setup_clocking()
219 return -EINVAL; in setup_clocking()
229 prot_desc->rx_phase_mode = MSP_SINGLE_PHASE; in setup_pcm_protdesc()
230 prot_desc->tx_phase_mode = MSP_SINGLE_PHASE; in setup_pcm_protdesc()
231 prot_desc->rx_phase2_start_mode = MSP_PHASE2_START_MODE_IMEDIATE; in setup_pcm_protdesc()
232 prot_desc->tx_phase2_start_mode = MSP_PHASE2_START_MODE_IMEDIATE; in setup_pcm_protdesc()
233 prot_desc->rx_byte_order = MSP_BTF_MS_BIT_FIRST; in setup_pcm_protdesc()
234 prot_desc->tx_byte_order = MSP_BTF_MS_BIT_FIRST; in setup_pcm_protdesc()
235 prot_desc->tx_fsync_pol = MSP_FSYNC_POL(MSP_FSYNC_POL_ACT_HI); in setup_pcm_protdesc()
236 prot_desc->rx_fsync_pol = MSP_FSYNC_POL_ACT_HI << RFSPOL_SHIFT; in setup_pcm_protdesc()
239 dev_dbg(dai->dev, "%s: DSP_A.\n", __func__); in setup_pcm_protdesc()
240 prot_desc->rx_clk_pol = MSP_RISING_EDGE; in setup_pcm_protdesc()
241 prot_desc->tx_clk_pol = MSP_FALLING_EDGE; in setup_pcm_protdesc()
243 prot_desc->rx_data_delay = MSP_DELAY_1; in setup_pcm_protdesc()
244 prot_desc->tx_data_delay = MSP_DELAY_1; in setup_pcm_protdesc()
246 dev_dbg(dai->dev, "%s: DSP_B.\n", __func__); in setup_pcm_protdesc()
247 prot_desc->rx_clk_pol = MSP_FALLING_EDGE; in setup_pcm_protdesc()
248 prot_desc->tx_clk_pol = MSP_RISING_EDGE; in setup_pcm_protdesc()
250 prot_desc->rx_data_delay = MSP_DELAY_0; in setup_pcm_protdesc()
251 prot_desc->tx_data_delay = MSP_DELAY_0; in setup_pcm_protdesc()
254 prot_desc->rx_half_word_swap = MSP_SWAP_NONE; in setup_pcm_protdesc()
255 prot_desc->tx_half_word_swap = MSP_SWAP_NONE; in setup_pcm_protdesc()
256 prot_desc->compression_mode = MSP_COMPRESS_MODE_LINEAR; in setup_pcm_protdesc()
257 prot_desc->expansion_mode = MSP_EXPAND_MODE_LINEAR; in setup_pcm_protdesc()
258 prot_desc->frame_sync_ignore = MSP_FSYNC_IGNORE; in setup_pcm_protdesc()
265 prot_desc->rx_phase_mode = MSP_DUAL_PHASE; in setup_i2s_protdesc()
266 prot_desc->tx_phase_mode = MSP_DUAL_PHASE; in setup_i2s_protdesc()
267 prot_desc->rx_phase2_start_mode = MSP_PHASE2_START_MODE_FSYNC; in setup_i2s_protdesc()
268 prot_desc->tx_phase2_start_mode = MSP_PHASE2_START_MODE_FSYNC; in setup_i2s_protdesc()
269 prot_desc->rx_byte_order = MSP_BTF_MS_BIT_FIRST; in setup_i2s_protdesc()
270 prot_desc->tx_byte_order = MSP_BTF_MS_BIT_FIRST; in setup_i2s_protdesc()
271 prot_desc->tx_fsync_pol = MSP_FSYNC_POL(MSP_FSYNC_POL_ACT_LO); in setup_i2s_protdesc()
272 prot_desc->rx_fsync_pol = MSP_FSYNC_POL_ACT_LO << RFSPOL_SHIFT; in setup_i2s_protdesc()
274 prot_desc->rx_frame_len_1 = MSP_FRAME_LEN_1; in setup_i2s_protdesc()
275 prot_desc->rx_frame_len_2 = MSP_FRAME_LEN_1; in setup_i2s_protdesc()
276 prot_desc->tx_frame_len_1 = MSP_FRAME_LEN_1; in setup_i2s_protdesc()
277 prot_desc->tx_frame_len_2 = MSP_FRAME_LEN_1; in setup_i2s_protdesc()
278 prot_desc->rx_elem_len_1 = MSP_ELEM_LEN_16; in setup_i2s_protdesc()
279 prot_desc->rx_elem_len_2 = MSP_ELEM_LEN_16; in setup_i2s_protdesc()
280 prot_desc->tx_elem_len_1 = MSP_ELEM_LEN_16; in setup_i2s_protdesc()
281 prot_desc->tx_elem_len_2 = MSP_ELEM_LEN_16; in setup_i2s_protdesc()
283 prot_desc->rx_clk_pol = MSP_RISING_EDGE; in setup_i2s_protdesc()
284 prot_desc->tx_clk_pol = MSP_FALLING_EDGE; in setup_i2s_protdesc()
286 prot_desc->rx_data_delay = MSP_DELAY_0; in setup_i2s_protdesc()
287 prot_desc->tx_data_delay = MSP_DELAY_0; in setup_i2s_protdesc()
289 prot_desc->tx_half_word_swap = MSP_SWAP_NONE; in setup_i2s_protdesc()
290 prot_desc->rx_half_word_swap = MSP_SWAP_NONE; in setup_i2s_protdesc()
291 prot_desc->compression_mode = MSP_COMPRESS_MODE_LINEAR; in setup_i2s_protdesc()
292 prot_desc->expansion_mode = MSP_EXPAND_MODE_LINEAR; in setup_i2s_protdesc()
293 prot_desc->frame_sync_ignore = MSP_FSYNC_IGNORE; in setup_i2s_protdesc()
302 struct ux500_msp_i2s_drvdata *drvdata = dev_get_drvdata(dai->dev); in setup_msp_config()
303 struct msp_protdesc *prot_desc = &msp_config->protdesc; in setup_msp_config()
304 struct snd_pcm_runtime *runtime = substream->runtime; in setup_msp_config()
305 unsigned int fmt = drvdata->fmt; in setup_msp_config()
310 msp_config->f_inputclk = drvdata->master_clk; in setup_msp_config()
312 msp_config->tx_fifo_config = TX_FIFO_ENABLE; in setup_msp_config()
313 msp_config->rx_fifo_config = RX_FIFO_ENABLE; in setup_msp_config()
314 msp_config->def_elem_len = 1; in setup_msp_config()
315 msp_config->direction = substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? in setup_msp_config()
317 msp_config->data_size = MSP_DATA_BITS_32; in setup_msp_config()
318 msp_config->frame_freq = runtime->rate; in setup_msp_config()
320 dev_dbg(dai->dev, "%s: f_inputclk = %u, frame_freq = %u.\n", in setup_msp_config()
321 __func__, msp_config->f_inputclk, msp_config->frame_freq); in setup_msp_config()
323 prot_desc->clocks_per_frame = 1; in setup_msp_config()
325 dev_dbg(dai->dev, "%s: rate: %u, channels: %d.\n", __func__, in setup_msp_config()
326 runtime->rate, runtime->channels); in setup_msp_config()
330 dev_dbg(dai->dev, "%s: SND_SOC_DAIFMT_I2S.\n", __func__); in setup_msp_config()
332 msp_config->default_protdesc = 1; in setup_msp_config()
333 msp_config->protocol = MSP_I2S_PROTOCOL; in setup_msp_config()
337 dev_dbg(dai->dev, "%s: SND_SOC_DAIFMT_I2S.\n", __func__); in setup_msp_config()
339 msp_config->data_size = MSP_DATA_BITS_16; in setup_msp_config()
340 msp_config->protocol = MSP_I2S_PROTOCOL; in setup_msp_config()
352 dev_dbg(dai->dev, "%s: PCM format.\n", __func__); in setup_msp_config()
354 msp_config->data_size = MSP_DATA_BITS_16; in setup_msp_config()
355 msp_config->protocol = MSP_PCM_PROTOCOL; in setup_msp_config()
365 ret = setup_pcm_framing(dai, runtime->rate, prot_desc); in setup_msp_config()
372 dev_err(dai->dev, "%s: Error: Unsupported format (%d)!\n", in setup_msp_config()
374 return -EINVAL; in setup_msp_config()
384 struct ux500_msp_i2s_drvdata *drvdata = dev_get_drvdata(dai->dev); in ux500_msp_dai_startup()
386 dev_dbg(dai->dev, "%s: MSP %d (%s): Enter.\n", __func__, dai->id, in ux500_msp_dai_startup()
390 ret = regulator_enable(drvdata->reg_vape); in ux500_msp_dai_startup()
392 dev_err(drvdata->msp->dev, in ux500_msp_dai_startup()
398 dev_dbg(dai->dev, "%s: Enabling MSP-clocks.\n", __func__); in ux500_msp_dai_startup()
399 ret = clk_prepare_enable(drvdata->pclk); in ux500_msp_dai_startup()
401 dev_err(drvdata->msp->dev, in ux500_msp_dai_startup()
406 ret = clk_prepare_enable(drvdata->clk); in ux500_msp_dai_startup()
408 dev_err(drvdata->msp->dev, in ux500_msp_dai_startup()
415 clk_disable_unprepare(drvdata->pclk); in ux500_msp_dai_startup()
417 regulator_disable(drvdata->reg_vape); in ux500_msp_dai_startup()
425 struct ux500_msp_i2s_drvdata *drvdata = dev_get_drvdata(dai->dev); in ux500_msp_dai_shutdown()
426 bool is_playback = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK); in ux500_msp_dai_shutdown()
428 dev_dbg(dai->dev, "%s: MSP %d (%s): Enter.\n", __func__, dai->id, in ux500_msp_dai_shutdown()
431 if (drvdata->vape_opp_constraint == 1) { in ux500_msp_dai_shutdown()
434 drvdata->vape_opp_constraint = 0; in ux500_msp_dai_shutdown()
437 if (ux500_msp_i2s_close(drvdata->msp, in ux500_msp_dai_shutdown()
439 dev_err(dai->dev, in ux500_msp_dai_shutdown()
441 __func__, dai->id, snd_pcm_stream_str(substream)); in ux500_msp_dai_shutdown()
445 clk_disable_unprepare(drvdata->clk); in ux500_msp_dai_shutdown()
446 clk_disable_unprepare(drvdata->pclk); in ux500_msp_dai_shutdown()
449 ret = regulator_disable(drvdata->reg_vape); in ux500_msp_dai_shutdown()
451 dev_err(dai->dev, in ux500_msp_dai_shutdown()
460 struct ux500_msp_i2s_drvdata *drvdata = dev_get_drvdata(dai->dev); in ux500_msp_dai_prepare()
461 struct snd_pcm_runtime *runtime = substream->runtime; in ux500_msp_dai_prepare()
464 dev_dbg(dai->dev, "%s: MSP %d (%s): Enter (rate = %d).\n", __func__, in ux500_msp_dai_prepare()
465 dai->id, snd_pcm_stream_str(substream), runtime->rate); in ux500_msp_dai_prepare()
469 ret = ux500_msp_i2s_open(drvdata->msp, &msp_config); in ux500_msp_dai_prepare()
471 dev_err(dai->dev, "%s: Error: msp_setup failed (ret = %d)!\n", in ux500_msp_dai_prepare()
476 /* Set OPP-level */ in ux500_msp_dai_prepare()
477 if ((drvdata->fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) && in ux500_msp_dai_prepare()
478 (drvdata->msp->f_bitclk > 19200000)) { in ux500_msp_dai_prepare()
479 /* If the bit-clock is higher than 19.2MHz, Vape should be in ux500_msp_dai_prepare()
480 * run in 100% OPP. Only when bit-clock is used (MSP master) in ux500_msp_dai_prepare()
483 "ux500-msp-i2s", 100); in ux500_msp_dai_prepare()
484 drvdata->vape_opp_constraint = 1; in ux500_msp_dai_prepare()
487 "ux500-msp-i2s", 50); in ux500_msp_dai_prepare()
488 drvdata->vape_opp_constraint = 0; in ux500_msp_dai_prepare()
499 struct snd_pcm_runtime *runtime = substream->runtime; in ux500_msp_dai_hw_params()
500 struct ux500_msp_i2s_drvdata *drvdata = dev_get_drvdata(dai->dev); in ux500_msp_dai_hw_params()
502 dev_dbg(dai->dev, "%s: MSP %d (%s): Enter.\n", in ux500_msp_dai_hw_params()
503 __func__, dai->id, snd_pcm_stream_str(substream)); in ux500_msp_dai_hw_params()
505 switch (drvdata->fmt & SND_SOC_DAIFMT_FORMAT_MASK) { in ux500_msp_dai_hw_params()
514 mask = substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? in ux500_msp_dai_hw_params()
515 drvdata->tx_mask : in ux500_msp_dai_hw_params()
516 drvdata->rx_mask; in ux500_msp_dai_hw_params()
519 dev_dbg(dai->dev, "TDM-slots active: %d", slots_active); in ux500_msp_dai_hw_params()
527 dev_err(dai->dev, in ux500_msp_dai_hw_params()
528 "%s: Error: Unsupported protocol (fmt = 0x%x)!\n", in ux500_msp_dai_hw_params()
529 __func__, drvdata->fmt); in ux500_msp_dai_hw_params()
530 return -EINVAL; in ux500_msp_dai_hw_params()
539 struct ux500_msp_i2s_drvdata *drvdata = dev_get_drvdata(dai->dev); in ux500_msp_dai_set_dai_fmt()
541 dev_dbg(dai->dev, "%s: MSP %d: Enter.\n", __func__, dai->id); in ux500_msp_dai_set_dai_fmt()
554 dev_err(dai->dev, in ux500_msp_dai_set_dai_fmt()
555 "%s: Error: Unsupported protocol/master (fmt = 0x%x)!\n", in ux500_msp_dai_set_dai_fmt()
556 __func__, drvdata->fmt); in ux500_msp_dai_set_dai_fmt()
557 return -EINVAL; in ux500_msp_dai_set_dai_fmt()
567 dev_err(dai->dev, in ux500_msp_dai_set_dai_fmt()
569 __func__, drvdata->fmt); in ux500_msp_dai_set_dai_fmt()
570 return -EINVAL; in ux500_msp_dai_set_dai_fmt()
573 drvdata->fmt = fmt; in ux500_msp_dai_set_dai_fmt()
582 struct ux500_msp_i2s_drvdata *drvdata = dev_get_drvdata(dai->dev); in ux500_msp_dai_set_tdm_slot()
599 dev_err(dai->dev, "%s: Error: Unsupported slot-count (%d)!\n", in ux500_msp_dai_set_tdm_slot()
601 return -EINVAL; in ux500_msp_dai_set_tdm_slot()
603 drvdata->slots = slots; in ux500_msp_dai_set_tdm_slot()
606 dev_err(dai->dev, "%s: Error: Unsupported slot-width (%d)!\n", in ux500_msp_dai_set_tdm_slot()
608 return -EINVAL; in ux500_msp_dai_set_tdm_slot()
610 drvdata->slot_width = slot_width; in ux500_msp_dai_set_tdm_slot()
612 drvdata->tx_mask = tx_mask & cap; in ux500_msp_dai_set_tdm_slot()
613 drvdata->rx_mask = rx_mask & cap; in ux500_msp_dai_set_tdm_slot()
621 struct ux500_msp_i2s_drvdata *drvdata = dev_get_drvdata(dai->dev); in ux500_msp_dai_set_dai_sysclk()
623 dev_dbg(dai->dev, "%s: MSP %d: Enter. clk-id: %d, freq: %u.\n", in ux500_msp_dai_set_dai_sysclk()
624 __func__, dai->id, clk_id, freq); in ux500_msp_dai_set_dai_sysclk()
628 drvdata->master_clk = freq; in ux500_msp_dai_set_dai_sysclk()
632 dev_err(dai->dev, "%s: MSP %d: Invalid clk-id (%d)!\n", in ux500_msp_dai_set_dai_sysclk()
633 __func__, dai->id, clk_id); in ux500_msp_dai_set_dai_sysclk()
634 return -EINVAL; in ux500_msp_dai_set_dai_sysclk()
644 struct ux500_msp_i2s_drvdata *drvdata = dev_get_drvdata(dai->dev); in ux500_msp_dai_trigger()
646 dev_dbg(dai->dev, "%s: MSP %d (%s): Enter (msp->id = %d, cmd = %d).\n", in ux500_msp_dai_trigger()
647 __func__, dai->id, snd_pcm_stream_str(substream), in ux500_msp_dai_trigger()
648 (int)drvdata->msp->id, cmd); in ux500_msp_dai_trigger()
650 ret = ux500_msp_i2s_trigger(drvdata->msp, cmd, substream->stream); in ux500_msp_dai_trigger()
657 struct ux500_msp_i2s_drvdata *drvdata = dev_get_drvdata(dai->dev); in ux500_msp_dai_of_probe()
661 playback_dma_data = devm_kzalloc(dai->dev, in ux500_msp_dai_of_probe()
665 return -ENOMEM; in ux500_msp_dai_of_probe()
667 capture_dma_data = devm_kzalloc(dai->dev, in ux500_msp_dai_of_probe()
671 return -ENOMEM; in ux500_msp_dai_of_probe()
673 playback_dma_data->addr = drvdata->msp->tx_rx_addr; in ux500_msp_dai_of_probe()
674 capture_dma_data->addr = drvdata->msp->tx_rx_addr; in ux500_msp_dai_of_probe()
676 playback_dma_data->maxburst = 4; in ux500_msp_dai_of_probe()
677 capture_dma_data->maxburst = 4; in ux500_msp_dai_of_probe()
711 .name = "ux500-msp",
721 drvdata = devm_kzalloc(&pdev->dev, in ux500_msp_drv_probe()
725 return -ENOMEM; in ux500_msp_drv_probe()
727 drvdata->fmt = 0; in ux500_msp_drv_probe()
728 drvdata->slots = 1; in ux500_msp_drv_probe()
729 drvdata->tx_mask = 0x01; in ux500_msp_drv_probe()
730 drvdata->rx_mask = 0x01; in ux500_msp_drv_probe()
731 drvdata->slot_width = 16; in ux500_msp_drv_probe()
732 drvdata->master_clk = MSP_INPUT_FREQ_APB; in ux500_msp_drv_probe()
734 drvdata->reg_vape = devm_regulator_get(&pdev->dev, "v-ape"); in ux500_msp_drv_probe()
735 if (IS_ERR(drvdata->reg_vape)) { in ux500_msp_drv_probe()
736 ret = PTR_ERR(drvdata->reg_vape); in ux500_msp_drv_probe()
737 dev_err(&pdev->dev, in ux500_msp_drv_probe()
742 prcmu_qos_add_requirement(PRCMU_QOS_APE_OPP, (char *)pdev->name, 50); in ux500_msp_drv_probe()
744 drvdata->pclk = devm_clk_get(&pdev->dev, "apb_pclk"); in ux500_msp_drv_probe()
745 if (IS_ERR(drvdata->pclk)) { in ux500_msp_drv_probe()
746 ret = PTR_ERR(drvdata->pclk); in ux500_msp_drv_probe()
747 dev_err(&pdev->dev, in ux500_msp_drv_probe()
753 drvdata->clk = devm_clk_get(&pdev->dev, NULL); in ux500_msp_drv_probe()
754 if (IS_ERR(drvdata->clk)) { in ux500_msp_drv_probe()
755 ret = PTR_ERR(drvdata->clk); in ux500_msp_drv_probe()
756 dev_err(&pdev->dev, in ux500_msp_drv_probe()
762 ret = ux500_msp_i2s_init_msp(pdev, &drvdata->msp); in ux500_msp_drv_probe()
763 if (!drvdata->msp) { in ux500_msp_drv_probe()
764 dev_err(&pdev->dev, in ux500_msp_drv_probe()
765 "%s: ERROR: Failed to init MSP-struct (%d)!", in ux500_msp_drv_probe()
769 dev_set_drvdata(&pdev->dev, drvdata); in ux500_msp_drv_probe()
771 ret = snd_soc_register_component(&pdev->dev, &ux500_msp_component, in ux500_msp_drv_probe()
774 dev_err(&pdev->dev, "Error: %s: Failed to register MSP%d!\n", in ux500_msp_drv_probe()
775 __func__, drvdata->msp->id); in ux500_msp_drv_probe()
781 dev_err(&pdev->dev, in ux500_msp_drv_probe()
790 snd_soc_unregister_component(&pdev->dev); in ux500_msp_drv_probe()
796 struct ux500_msp_i2s_drvdata *drvdata = dev_get_drvdata(&pdev->dev); in ux500_msp_drv_remove()
800 snd_soc_unregister_component(&pdev->dev); in ux500_msp_drv_remove()
804 ux500_msp_i2s_cleanup_msp(pdev, drvdata->msp); in ux500_msp_drv_remove()
808 { .compatible = "stericsson,ux500-msp-i2s", },
815 .name = "ux500-msp-i2s",