• Home
  • Raw
  • Download

Lines Matching refs:sirf_audio_codec

27 struct sirf_audio_codec {  struct
123 struct sirf_audio_codec *sirf_audio_codec = snd_soc_component_get_drvdata(component); in atlas6_codec_enable_and_reset_event() local
126 enable_and_reset_codec(sirf_audio_codec->regmap, in atlas6_codec_enable_and_reset_event()
130 regmap_update_bits(sirf_audio_codec->regmap, in atlas6_codec_enable_and_reset_event()
146 struct sirf_audio_codec *sirf_audio_codec = snd_soc_component_get_drvdata(component); in prima2_codec_enable_and_reset_event() local
149 enable_and_reset_codec(sirf_audio_codec->regmap, in prima2_codec_enable_and_reset_event()
153 regmap_update_bits(sirf_audio_codec->regmap, in prima2_codec_enable_and_reset_event()
281 static void sirf_audio_codec_tx_enable(struct sirf_audio_codec *sirf_audio_codec) in sirf_audio_codec_tx_enable() argument
283 regmap_update_bits(sirf_audio_codec->regmap, AUDIO_PORT_IC_TXFIFO_OP, in sirf_audio_codec_tx_enable()
285 regmap_update_bits(sirf_audio_codec->regmap, AUDIO_PORT_IC_TXFIFO_OP, in sirf_audio_codec_tx_enable()
287 regmap_write(sirf_audio_codec->regmap, AUDIO_PORT_IC_TXFIFO_INT_MSK, 0); in sirf_audio_codec_tx_enable()
288 regmap_write(sirf_audio_codec->regmap, AUDIO_PORT_IC_TXFIFO_OP, 0); in sirf_audio_codec_tx_enable()
289 regmap_update_bits(sirf_audio_codec->regmap, AUDIO_PORT_IC_TXFIFO_OP, in sirf_audio_codec_tx_enable()
291 regmap_update_bits(sirf_audio_codec->regmap, in sirf_audio_codec_tx_enable()
295 static void sirf_audio_codec_tx_disable(struct sirf_audio_codec *sirf_audio_codec) in sirf_audio_codec_tx_disable() argument
297 regmap_write(sirf_audio_codec->regmap, AUDIO_PORT_IC_TXFIFO_OP, 0); in sirf_audio_codec_tx_disable()
298 regmap_update_bits(sirf_audio_codec->regmap, in sirf_audio_codec_tx_disable()
302 static void sirf_audio_codec_rx_enable(struct sirf_audio_codec *sirf_audio_codec, in sirf_audio_codec_rx_enable() argument
305 regmap_update_bits(sirf_audio_codec->regmap, AUDIO_PORT_IC_RXFIFO_OP, in sirf_audio_codec_rx_enable()
307 regmap_update_bits(sirf_audio_codec->regmap, AUDIO_PORT_IC_RXFIFO_OP, in sirf_audio_codec_rx_enable()
309 regmap_write(sirf_audio_codec->regmap, in sirf_audio_codec_rx_enable()
311 regmap_write(sirf_audio_codec->regmap, AUDIO_PORT_IC_RXFIFO_OP, 0); in sirf_audio_codec_rx_enable()
312 regmap_update_bits(sirf_audio_codec->regmap, AUDIO_PORT_IC_RXFIFO_OP, in sirf_audio_codec_rx_enable()
315 regmap_update_bits(sirf_audio_codec->regmap, in sirf_audio_codec_rx_enable()
319 regmap_update_bits(sirf_audio_codec->regmap, in sirf_audio_codec_rx_enable()
324 static void sirf_audio_codec_rx_disable(struct sirf_audio_codec *sirf_audio_codec) in sirf_audio_codec_rx_disable() argument
326 regmap_update_bits(sirf_audio_codec->regmap, in sirf_audio_codec_rx_disable()
336 struct sirf_audio_codec *sirf_audio_codec = snd_soc_component_get_drvdata(component); in sirf_audio_codec_trigger() local
350 sirf_audio_codec_tx_disable(sirf_audio_codec); in sirf_audio_codec_trigger()
352 sirf_audio_codec_rx_disable(sirf_audio_codec); in sirf_audio_codec_trigger()
358 sirf_audio_codec_tx_enable(sirf_audio_codec); in sirf_audio_codec_trigger()
362 sirf_audio_codec_rx_enable(sirf_audio_codec, in sirf_audio_codec_trigger()
460 struct sirf_audio_codec *sirf_audio_codec; in sirf_audio_codec_driver_probe() local
463 sirf_audio_codec = devm_kzalloc(&pdev->dev, in sirf_audio_codec_driver_probe()
464 sizeof(struct sirf_audio_codec), GFP_KERNEL); in sirf_audio_codec_driver_probe()
465 if (!sirf_audio_codec) in sirf_audio_codec_driver_probe()
468 platform_set_drvdata(pdev, sirf_audio_codec); in sirf_audio_codec_driver_probe()
474 sirf_audio_codec->regmap = devm_regmap_init_mmio(&pdev->dev, base, in sirf_audio_codec_driver_probe()
476 if (IS_ERR(sirf_audio_codec->regmap)) in sirf_audio_codec_driver_probe()
477 return PTR_ERR(sirf_audio_codec->regmap); in sirf_audio_codec_driver_probe()
479 sirf_audio_codec->clk = devm_clk_get(&pdev->dev, NULL); in sirf_audio_codec_driver_probe()
480 if (IS_ERR(sirf_audio_codec->clk)) { in sirf_audio_codec_driver_probe()
482 return PTR_ERR(sirf_audio_codec->clk); in sirf_audio_codec_driver_probe()
485 ret = clk_prepare_enable(sirf_audio_codec->clk); in sirf_audio_codec_driver_probe()
503 regmap_update_bits(sirf_audio_codec->regmap, AUDIO_IC_CODEC_CTRL0, in sirf_audio_codec_driver_probe()
507 regmap_update_bits(sirf_audio_codec->regmap, in sirf_audio_codec_driver_probe()
512 clk_disable_unprepare(sirf_audio_codec->clk); in sirf_audio_codec_driver_probe()
518 struct sirf_audio_codec *sirf_audio_codec = platform_get_drvdata(pdev); in sirf_audio_codec_driver_remove() local
520 clk_disable_unprepare(sirf_audio_codec->clk); in sirf_audio_codec_driver_remove()
528 struct sirf_audio_codec *sirf_audio_codec = dev_get_drvdata(dev); in sirf_audio_codec_suspend() local
530 regmap_read(sirf_audio_codec->regmap, AUDIO_IC_CODEC_CTRL0, in sirf_audio_codec_suspend()
531 &sirf_audio_codec->reg_ctrl0); in sirf_audio_codec_suspend()
532 regmap_read(sirf_audio_codec->regmap, AUDIO_IC_CODEC_CTRL1, in sirf_audio_codec_suspend()
533 &sirf_audio_codec->reg_ctrl1); in sirf_audio_codec_suspend()
534 clk_disable_unprepare(sirf_audio_codec->clk); in sirf_audio_codec_suspend()
541 struct sirf_audio_codec *sirf_audio_codec = dev_get_drvdata(dev); in sirf_audio_codec_resume() local
544 ret = clk_prepare_enable(sirf_audio_codec->clk); in sirf_audio_codec_resume()
548 regmap_write(sirf_audio_codec->regmap, AUDIO_IC_CODEC_CTRL0, in sirf_audio_codec_resume()
549 sirf_audio_codec->reg_ctrl0); in sirf_audio_codec_resume()
550 regmap_write(sirf_audio_codec->regmap, AUDIO_IC_CODEC_CTRL1, in sirf_audio_codec_resume()
551 sirf_audio_codec->reg_ctrl1); in sirf_audio_codec_resume()