Lines Matching +full:sun4i +full:- +full:a10 +full:- +full:cpu +full:- +full:clk

1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * Copyright 2015 Maxime Ripard <maxime.ripard@free-electrons.com>
7 * Copyright 2016 Chen-Yu Tsai <wens@csie.org>
22 #include <linux/clk.h>
124 * sun6i shares the same digital control and FIFO registers as sun4i,
238 struct clk *clk_apb;
239 struct clk *clk_module;
253 regmap_set_bits(scodec->regmap, SUN4I_CODEC_DAC_FIFOC, in sun4i_codec_start_playback()
257 regmap_set_bits(scodec->regmap, SUN4I_CODEC_DAC_FIFOC, in sun4i_codec_start_playback()
264 regmap_clear_bits(scodec->regmap, SUN4I_CODEC_DAC_FIFOC, in sun4i_codec_stop_playback()
271 regmap_field_set_bits(scodec->reg_adc_fifoc, in sun4i_codec_start_capture()
278 regmap_field_clear_bits(scodec->reg_adc_fifoc, in sun4i_codec_stop_capture()
286 struct sun4i_codec *scodec = snd_soc_card_get_drvdata(rtd->card); in sun4i_codec_trigger()
292 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in sun4i_codec_trigger()
301 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in sun4i_codec_trigger()
308 return -EINVAL; in sun4i_codec_trigger()
318 struct sun4i_codec *scodec = snd_soc_card_get_drvdata(rtd->card); in sun4i_codec_prepare_capture()
322 regmap_field_set_bits(scodec->reg_adc_fifoc, in sun4i_codec_prepare_capture()
327 regmap_field_update_bits(scodec->reg_adc_fifoc, in sun4i_codec_prepare_capture()
336 if (of_device_is_compatible(scodec->dev->of_node, in sun4i_codec_prepare_capture()
337 "allwinner,sun4i-a10-codec") || in sun4i_codec_prepare_capture()
338 of_device_is_compatible(scodec->dev->of_node, in sun4i_codec_prepare_capture()
339 "allwinner,sun7i-a20-codec")) { in sun4i_codec_prepare_capture()
340 regmap_update_bits(scodec->regmap, SUN4I_CODEC_ADC_ACTL, in sun4i_codec_prepare_capture()
345 if (of_device_is_compatible(scodec->dev->of_node, in sun4i_codec_prepare_capture()
346 "allwinner,sun7i-a20-codec")) in sun4i_codec_prepare_capture()
348 regmap_update_bits(scodec->regmap, SUN4I_CODEC_DAC_TUNE, in sun4i_codec_prepare_capture()
359 struct sun4i_codec *scodec = snd_soc_card_get_drvdata(rtd->card); in sun4i_codec_prepare_playback()
363 regmap_set_bits(scodec->regmap, SUN4I_CODEC_DAC_FIFOC, in sun4i_codec_prepare_playback()
367 regmap_update_bits(scodec->regmap, SUN4I_CODEC_DAC_FIFOC, in sun4i_codec_prepare_playback()
371 if (substream->runtime->rate > 32000) in sun4i_codec_prepare_playback()
378 regmap_update_bits(scodec->regmap, SUN4I_CODEC_DAC_FIFOC, in sun4i_codec_prepare_playback()
383 regmap_clear_bits(scodec->regmap, SUN4I_CODEC_DAC_FIFOC, in sun4i_codec_prepare_playback()
392 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in sun4i_codec_prepare()
466 return -EINVAL; in sun4i_codec_get_hw_rate()
475 regmap_field_update_bits(scodec->reg_adc_fifoc, in sun4i_codec_hw_params_capture()
481 regmap_field_set_bits(scodec->reg_adc_fifoc, in sun4i_codec_hw_params_capture()
484 regmap_field_clear_bits(scodec->reg_adc_fifoc, in sun4i_codec_hw_params_capture()
488 if (hw_param_interval(params, SNDRV_PCM_HW_PARAM_SAMPLE_BITS)->min == 32) { in sun4i_codec_hw_params_capture()
489 regmap_field_set_bits(scodec->reg_adc_fifoc, in sun4i_codec_hw_params_capture()
492 regmap_field_clear_bits(scodec->reg_adc_fifoc, in sun4i_codec_hw_params_capture()
495 scodec->capture_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; in sun4i_codec_hw_params_capture()
497 regmap_field_clear_bits(scodec->reg_adc_fifoc, in sun4i_codec_hw_params_capture()
501 regmap_field_set_bits(scodec->reg_adc_fifoc, in sun4i_codec_hw_params_capture()
504 scodec->capture_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES; in sun4i_codec_hw_params_capture()
517 regmap_update_bits(scodec->regmap, SUN4I_CODEC_DAC_FIFOC, in sun4i_codec_hw_params_playback()
527 regmap_update_bits(scodec->regmap, SUN4I_CODEC_DAC_FIFOC, in sun4i_codec_hw_params_playback()
532 if (hw_param_interval(params, SNDRV_PCM_HW_PARAM_SAMPLE_BITS)->min == 32) { in sun4i_codec_hw_params_playback()
533 regmap_set_bits(scodec->regmap, SUN4I_CODEC_DAC_FIFOC, in sun4i_codec_hw_params_playback()
537 regmap_clear_bits(scodec->regmap, SUN4I_CODEC_DAC_FIFOC, in sun4i_codec_hw_params_playback()
540 scodec->playback_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; in sun4i_codec_hw_params_playback()
542 regmap_clear_bits(scodec->regmap, SUN4I_CODEC_DAC_FIFOC, in sun4i_codec_hw_params_playback()
546 regmap_set_bits(scodec->regmap, SUN4I_CODEC_DAC_FIFOC, in sun4i_codec_hw_params_playback()
549 scodec->playback_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES; in sun4i_codec_hw_params_playback()
560 struct sun4i_codec *scodec = snd_soc_card_get_drvdata(rtd->card); in sun4i_codec_hw_params()
566 return -EINVAL; in sun4i_codec_hw_params()
568 ret = clk_set_rate(scodec->clk_module, clk_freq); in sun4i_codec_hw_params()
576 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in sun4i_codec_hw_params()
601 struct sun4i_codec *scodec = snd_soc_card_get_drvdata(rtd->card); in sun4i_codec_startup()
603 snd_pcm_hw_constraint_list(substream->runtime, 0, in sun4i_codec_startup()
610 regmap_set_bits(scodec->regmap, SUN4I_CODEC_DAC_FIFOC, in sun4i_codec_startup()
613 return clk_prepare_enable(scodec->clk_module); in sun4i_codec_startup()
620 struct sun4i_codec *scodec = snd_soc_card_get_drvdata(rtd->card); in sun4i_codec_shutdown()
622 clk_disable_unprepare(scodec->clk_module); in sun4i_codec_shutdown()
660 /*** sun4i Codec ***/
665 static DECLARE_TLV_DB_SCALE(sun4i_codec_pa_volume_scale, -6300, 100, 1);
666 static DECLARE_TLV_DB_SCALE(sun4i_codec_linein_loopback_gain_scale, -150, 150,
668 static DECLARE_TLV_DB_SCALE(sun4i_codec_linein_preamp_gain_scale, -1200, 300,
670 static DECLARE_TLV_DB_SCALE(sun4i_codec_fmin_loopback_gain_scale, -450, 150,
672 static DECLARE_TLV_DB_SCALE(sun4i_codec_micin_loopback_gain_scale, -450, 150,
799 /* Mic Pre-Amplifiers */
800 SND_SOC_DAPM_PGA("MIC1 Pre-Amplifier", SUN4I_CODEC_ADC_ACTL,
802 SND_SOC_DAPM_PGA("MIC2 Pre-Amplifier", SUN4I_CODEC_ADC_ACTL,
839 { "Right Mixer", "Mic1 Playback Switch", "MIC1 Pre-Amplifier" },
840 { "Right Mixer", "Mic2 Playback Switch", "MIC2 Pre-Amplifier" },
847 { "Left Mixer", "Mic1 Playback Switch", "MIC1 Pre-Amplifier" },
848 { "Left Mixer", "Mic2 Playback Switch", "MIC2 Pre-Amplifier" },
862 { "Left ADC", NULL, "MIC1 Pre-Amplifier" },
863 { "Right ADC", NULL, "MIC1 Pre-Amplifier" },
864 { "MIC1 Pre-Amplifier", NULL, "Mic1"},
868 { "Left ADC", NULL, "MIC2 Pre-Amplifier" },
869 { "Right ADC", NULL, "MIC2 Pre-Amplifier" },
870 { "MIC2 Pre-Amplifier", NULL, "Mic2"},
996 static const DECLARE_TLV_DB_SCALE(sun6i_codec_dvol_scale, -7308, 116, 0);
997 static const DECLARE_TLV_DB_SCALE(sun6i_codec_hp_vol_scale, -6300, 100, 1);
999 -450, 150, 0);
1002 2, 31, TLV_DB_SCALE_ITEM(-4350, 150, 0),
1029 /* Mixer pre-gains */
1233 .name = "sun4i-codec",
1236 .debugfs_prefix = "cpu",
1249 snd_soc_dai_init_dma_data(dai, &scodec->playback_dma_data, in sun4i_codec_dai_probe()
1250 &scodec->capture_dma_data); in sun4i_codec_dai_probe()
1256 .name = "sun4i-codec-cpu-dai",
1286 link->cpus = &dlc[0]; in sun4i_codec_create_link()
1287 link->codecs = &dlc[1]; in sun4i_codec_create_link()
1288 link->platforms = &dlc[2]; in sun4i_codec_create_link()
1290 link->num_cpus = 1; in sun4i_codec_create_link()
1291 link->num_codecs = 1; in sun4i_codec_create_link()
1292 link->num_platforms = 1; in sun4i_codec_create_link()
1294 link->name = "cdc"; in sun4i_codec_create_link()
1295 link->stream_name = "CDC PCM"; in sun4i_codec_create_link()
1296 link->codecs->dai_name = "Codec"; in sun4i_codec_create_link()
1297 link->cpus->dai_name = dev_name(dev); in sun4i_codec_create_link()
1298 link->codecs->name = dev_name(dev); in sun4i_codec_create_link()
1299 link->platforms->name = dev_name(dev); in sun4i_codec_create_link()
1300 link->dai_fmt = SND_SOC_DAIFMT_I2S; in sun4i_codec_create_link()
1310 struct sun4i_codec *scodec = snd_soc_card_get_drvdata(w->dapm->card); in sun4i_codec_spk_event()
1312 gpiod_set_value_cansleep(scodec->gpio_pa, in sun4i_codec_spk_event()
1342 return ERR_PTR(-ENOMEM); in sun4i_codec_create_card()
1344 card->dai_link = sun4i_codec_create_link(dev, &card->num_links); in sun4i_codec_create_card()
1345 if (!card->dai_link) in sun4i_codec_create_card()
1346 return ERR_PTR(-ENOMEM); in sun4i_codec_create_card()
1348 card->dev = dev; in sun4i_codec_create_card()
1349 card->owner = THIS_MODULE; in sun4i_codec_create_card()
1350 card->name = "sun4i-codec"; in sun4i_codec_create_card()
1351 card->dapm_widgets = sun4i_codec_card_dapm_widgets; in sun4i_codec_create_card()
1352 card->num_dapm_widgets = ARRAY_SIZE(sun4i_codec_card_dapm_widgets); in sun4i_codec_create_card()
1353 card->dapm_routes = sun4i_codec_card_dapm_routes; in sun4i_codec_create_card()
1354 card->num_dapm_routes = ARRAY_SIZE(sun4i_codec_card_dapm_routes); in sun4i_codec_create_card()
1375 return ERR_PTR(-ENOMEM); in sun6i_codec_create_card()
1377 card->dai_link = sun4i_codec_create_link(dev, &card->num_links); in sun6i_codec_create_card()
1378 if (!card->dai_link) in sun6i_codec_create_card()
1379 return ERR_PTR(-ENOMEM); in sun6i_codec_create_card()
1381 card->dev = dev; in sun6i_codec_create_card()
1382 card->owner = THIS_MODULE; in sun6i_codec_create_card()
1383 card->name = "A31 Audio Codec"; in sun6i_codec_create_card()
1384 card->dapm_widgets = sun6i_codec_card_dapm_widgets; in sun6i_codec_create_card()
1385 card->num_dapm_widgets = ARRAY_SIZE(sun6i_codec_card_dapm_widgets); in sun6i_codec_create_card()
1386 card->fully_routed = true; in sun6i_codec_create_card()
1388 ret = snd_soc_of_parse_audio_routing(card, "allwinner,audio-routing"); in sun6i_codec_create_card()
1390 dev_warn(dev, "failed to parse audio-routing: %d\n", ret); in sun6i_codec_create_card()
1421 return ERR_PTR(-ENOMEM); in sun8i_a23_codec_create_card()
1423 aux_dev.dlc.of_node = of_parse_phandle(dev->of_node, in sun8i_a23_codec_create_card()
1424 "allwinner,codec-analog-controls", in sun8i_a23_codec_create_card()
1428 return ERR_PTR(-EINVAL); in sun8i_a23_codec_create_card()
1431 card->dai_link = sun4i_codec_create_link(dev, &card->num_links); in sun8i_a23_codec_create_card()
1432 if (!card->dai_link) in sun8i_a23_codec_create_card()
1433 return ERR_PTR(-ENOMEM); in sun8i_a23_codec_create_card()
1435 card->dev = dev; in sun8i_a23_codec_create_card()
1436 card->owner = THIS_MODULE; in sun8i_a23_codec_create_card()
1437 card->name = "A23 Audio Codec"; in sun8i_a23_codec_create_card()
1438 card->dapm_widgets = sun6i_codec_card_dapm_widgets; in sun8i_a23_codec_create_card()
1439 card->num_dapm_widgets = ARRAY_SIZE(sun6i_codec_card_dapm_widgets); in sun8i_a23_codec_create_card()
1440 card->dapm_routes = sun8i_codec_card_routes; in sun8i_a23_codec_create_card()
1441 card->num_dapm_routes = ARRAY_SIZE(sun8i_codec_card_routes); in sun8i_a23_codec_create_card()
1442 card->aux_dev = &aux_dev; in sun8i_a23_codec_create_card()
1443 card->num_aux_devs = 1; in sun8i_a23_codec_create_card()
1444 card->fully_routed = true; in sun8i_a23_codec_create_card()
1446 ret = snd_soc_of_parse_audio_routing(card, "allwinner,audio-routing"); in sun8i_a23_codec_create_card()
1448 dev_warn(dev, "failed to parse audio-routing: %d\n", ret); in sun8i_a23_codec_create_card()
1460 return ERR_PTR(-ENOMEM); in sun8i_h3_codec_create_card()
1462 aux_dev.dlc.of_node = of_parse_phandle(dev->of_node, in sun8i_h3_codec_create_card()
1463 "allwinner,codec-analog-controls", in sun8i_h3_codec_create_card()
1467 return ERR_PTR(-EINVAL); in sun8i_h3_codec_create_card()
1470 card->dai_link = sun4i_codec_create_link(dev, &card->num_links); in sun8i_h3_codec_create_card()
1471 if (!card->dai_link) in sun8i_h3_codec_create_card()
1472 return ERR_PTR(-ENOMEM); in sun8i_h3_codec_create_card()
1474 card->dev = dev; in sun8i_h3_codec_create_card()
1475 card->owner = THIS_MODULE; in sun8i_h3_codec_create_card()
1476 card->name = "H3 Audio Codec"; in sun8i_h3_codec_create_card()
1477 card->dapm_widgets = sun6i_codec_card_dapm_widgets; in sun8i_h3_codec_create_card()
1478 card->num_dapm_widgets = ARRAY_SIZE(sun6i_codec_card_dapm_widgets); in sun8i_h3_codec_create_card()
1479 card->dapm_routes = sun8i_codec_card_routes; in sun8i_h3_codec_create_card()
1480 card->num_dapm_routes = ARRAY_SIZE(sun8i_codec_card_routes); in sun8i_h3_codec_create_card()
1481 card->aux_dev = &aux_dev; in sun8i_h3_codec_create_card()
1482 card->num_aux_devs = 1; in sun8i_h3_codec_create_card()
1483 card->fully_routed = true; in sun8i_h3_codec_create_card()
1485 ret = snd_soc_of_parse_audio_routing(card, "allwinner,audio-routing"); in sun8i_h3_codec_create_card()
1487 dev_warn(dev, "failed to parse audio-routing: %d\n", ret); in sun8i_h3_codec_create_card()
1499 return ERR_PTR(-ENOMEM); in sun8i_v3s_codec_create_card()
1501 aux_dev.dlc.of_node = of_parse_phandle(dev->of_node, in sun8i_v3s_codec_create_card()
1502 "allwinner,codec-analog-controls", in sun8i_v3s_codec_create_card()
1506 return ERR_PTR(-EINVAL); in sun8i_v3s_codec_create_card()
1509 card->dai_link = sun4i_codec_create_link(dev, &card->num_links); in sun8i_v3s_codec_create_card()
1510 if (!card->dai_link) in sun8i_v3s_codec_create_card()
1511 return ERR_PTR(-ENOMEM); in sun8i_v3s_codec_create_card()
1513 card->dev = dev; in sun8i_v3s_codec_create_card()
1514 card->owner = THIS_MODULE; in sun8i_v3s_codec_create_card()
1515 card->name = "V3s Audio Codec"; in sun8i_v3s_codec_create_card()
1516 card->dapm_widgets = sun6i_codec_card_dapm_widgets; in sun8i_v3s_codec_create_card()
1517 card->num_dapm_widgets = ARRAY_SIZE(sun6i_codec_card_dapm_widgets); in sun8i_v3s_codec_create_card()
1518 card->dapm_routes = sun8i_codec_card_routes; in sun8i_v3s_codec_create_card()
1519 card->num_dapm_routes = ARRAY_SIZE(sun8i_codec_card_routes); in sun8i_v3s_codec_create_card()
1520 card->aux_dev = &aux_dev; in sun8i_v3s_codec_create_card()
1521 card->num_aux_devs = 1; in sun8i_v3s_codec_create_card()
1522 card->fully_routed = true; in sun8i_v3s_codec_create_card()
1524 ret = snd_soc_of_parse_audio_routing(card, "allwinner,audio-routing"); in sun8i_v3s_codec_create_card()
1526 dev_warn(dev, "failed to parse audio-routing: %d\n", ret); in sun8i_v3s_codec_create_card()
1652 .compatible = "allwinner,sun4i-a10-codec",
1656 .compatible = "allwinner,sun6i-a31-codec",
1660 .compatible = "allwinner,sun7i-a20-codec",
1664 .compatible = "allwinner,sun8i-a23-codec",
1668 .compatible = "allwinner,sun8i-h3-codec",
1672 .compatible = "allwinner,sun8i-v3s-codec",
1688 scodec = devm_kzalloc(&pdev->dev, sizeof(*scodec), GFP_KERNEL); in sun4i_codec_probe()
1690 return -ENOMEM; in sun4i_codec_probe()
1692 scodec->dev = &pdev->dev; in sun4i_codec_probe()
1698 quirks = of_device_get_match_data(&pdev->dev); in sun4i_codec_probe()
1700 dev_err(&pdev->dev, "Failed to determine the quirks to use\n"); in sun4i_codec_probe()
1701 return -ENODEV; in sun4i_codec_probe()
1704 scodec->regmap = devm_regmap_init_mmio(&pdev->dev, base, in sun4i_codec_probe()
1705 quirks->regmap_config); in sun4i_codec_probe()
1706 if (IS_ERR(scodec->regmap)) { in sun4i_codec_probe()
1707 dev_err(&pdev->dev, "Failed to create our regmap\n"); in sun4i_codec_probe()
1708 return PTR_ERR(scodec->regmap); in sun4i_codec_probe()
1712 scodec->clk_apb = devm_clk_get(&pdev->dev, "apb"); in sun4i_codec_probe()
1713 if (IS_ERR(scodec->clk_apb)) { in sun4i_codec_probe()
1714 dev_err(&pdev->dev, "Failed to get the APB clock\n"); in sun4i_codec_probe()
1715 return PTR_ERR(scodec->clk_apb); in sun4i_codec_probe()
1718 scodec->clk_module = devm_clk_get(&pdev->dev, "codec"); in sun4i_codec_probe()
1719 if (IS_ERR(scodec->clk_module)) { in sun4i_codec_probe()
1720 dev_err(&pdev->dev, "Failed to get the module clock\n"); in sun4i_codec_probe()
1721 return PTR_ERR(scodec->clk_module); in sun4i_codec_probe()
1724 if (quirks->has_reset) { in sun4i_codec_probe()
1725 scodec->rst = devm_reset_control_get_exclusive(&pdev->dev, in sun4i_codec_probe()
1727 if (IS_ERR(scodec->rst)) { in sun4i_codec_probe()
1728 dev_err(&pdev->dev, "Failed to get reset control\n"); in sun4i_codec_probe()
1729 return PTR_ERR(scodec->rst); in sun4i_codec_probe()
1733 scodec->gpio_pa = devm_gpiod_get_optional(&pdev->dev, "allwinner,pa", in sun4i_codec_probe()
1735 if (IS_ERR(scodec->gpio_pa)) { in sun4i_codec_probe()
1736 ret = PTR_ERR(scodec->gpio_pa); in sun4i_codec_probe()
1737 dev_err_probe(&pdev->dev, ret, "Failed to get pa gpio\n"); in sun4i_codec_probe()
1742 scodec->reg_adc_fifoc = devm_regmap_field_alloc(&pdev->dev, in sun4i_codec_probe()
1743 scodec->regmap, in sun4i_codec_probe()
1744 quirks->reg_adc_fifoc); in sun4i_codec_probe()
1745 if (IS_ERR(scodec->reg_adc_fifoc)) { in sun4i_codec_probe()
1746 ret = PTR_ERR(scodec->reg_adc_fifoc); in sun4i_codec_probe()
1747 dev_err(&pdev->dev, "Failed to create regmap fields: %d\n", in sun4i_codec_probe()
1753 if (clk_prepare_enable(scodec->clk_apb)) { in sun4i_codec_probe()
1754 dev_err(&pdev->dev, "Failed to enable the APB clock\n"); in sun4i_codec_probe()
1755 return -EINVAL; in sun4i_codec_probe()
1759 if (scodec->rst) { in sun4i_codec_probe()
1760 ret = reset_control_deassert(scodec->rst); in sun4i_codec_probe()
1762 dev_err(&pdev->dev, in sun4i_codec_probe()
1769 scodec->playback_dma_data.addr = res->start + quirks->reg_dac_txdata; in sun4i_codec_probe()
1770 scodec->playback_dma_data.maxburst = 8; in sun4i_codec_probe()
1771 scodec->playback_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES; in sun4i_codec_probe()
1774 scodec->capture_dma_data.addr = res->start + quirks->reg_adc_rxdata; in sun4i_codec_probe()
1775 scodec->capture_dma_data.maxburst = 8; in sun4i_codec_probe()
1776 scodec->capture_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES; in sun4i_codec_probe()
1778 ret = devm_snd_soc_register_component(&pdev->dev, quirks->codec, in sun4i_codec_probe()
1781 dev_err(&pdev->dev, "Failed to register our codec\n"); in sun4i_codec_probe()
1785 ret = devm_snd_soc_register_component(&pdev->dev, in sun4i_codec_probe()
1789 dev_err(&pdev->dev, "Failed to register our DAI\n"); in sun4i_codec_probe()
1793 ret = devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0); in sun4i_codec_probe()
1795 dev_err(&pdev->dev, "Failed to register against DMAEngine\n"); in sun4i_codec_probe()
1799 card = quirks->create_card(&pdev->dev); in sun4i_codec_probe()
1802 dev_err(&pdev->dev, "Failed to create our card\n"); in sun4i_codec_probe()
1810 dev_err_probe(&pdev->dev, ret, "Failed to register our card\n"); in sun4i_codec_probe()
1817 if (scodec->rst) in sun4i_codec_probe()
1818 reset_control_assert(scodec->rst); in sun4i_codec_probe()
1820 clk_disable_unprepare(scodec->clk_apb); in sun4i_codec_probe()
1830 if (scodec->rst) in sun4i_codec_remove()
1831 reset_control_assert(scodec->rst); in sun4i_codec_remove()
1832 clk_disable_unprepare(scodec->clk_apb); in sun4i_codec_remove()
1839 .name = "sun4i-codec",
1847 MODULE_DESCRIPTION("Allwinner A10 codec driver");
1850 MODULE_AUTHOR("Maxime Ripard <maxime.ripard@free-electrons.com>");
1851 MODULE_AUTHOR("Chen-Yu Tsai <wens@csie.org>");