Lines Matching full:micfil
115 { .compatible = "fsl,imx8mm-micfil", .data = &fsl_micfil_imx8mm },
116 { .compatible = "fsl,imx8mp-micfil", .data = &fsl_micfil_imx8mp },
117 { .compatible = "fsl,imx93-micfil", .data = &fsl_micfil_imx93 },
137 static int micfil_set_quality(struct fsl_micfil *micfil) in micfil_set_quality() argument
141 switch (micfil->quality) { in micfil_set_quality()
162 return regmap_update_bits(micfil->regmap, REG_MICFIL_CTRL2, in micfil_set_quality()
171 struct fsl_micfil *micfil = snd_soc_component_get_drvdata(cmpnt); in micfil_quality_get() local
173 ucontrol->value.integer.value[0] = micfil->quality; in micfil_quality_get()
182 struct fsl_micfil *micfil = snd_soc_component_get_drvdata(cmpnt); in micfil_quality_set() local
184 micfil->quality = ucontrol->value.integer.value[0]; in micfil_quality_set()
186 return micfil_set_quality(micfil); in micfil_quality_set()
236 struct fsl_micfil *micfil = snd_soc_component_get_drvdata(comp); in micfil_put_dc_remover_state() local
245 micfil->dc_remover = val; in micfil_put_dc_remover_state()
264 struct fsl_micfil *micfil = snd_soc_component_get_drvdata(comp); in micfil_get_dc_remover_state() local
266 ucontrol->value.enumerated.item[0] = micfil->dc_remover; in micfil_get_dc_remover_state()
277 struct fsl_micfil *micfil = snd_soc_component_get_drvdata(comp); in hwvad_put_enable() local
280 micfil->vad_enabled = val; in hwvad_put_enable()
289 struct fsl_micfil *micfil = snd_soc_component_get_drvdata(comp); in hwvad_get_enable() local
291 ucontrol->value.enumerated.item[0] = micfil->vad_enabled; in hwvad_get_enable()
302 struct fsl_micfil *micfil = snd_soc_component_get_drvdata(comp); in hwvad_put_init_mode() local
308 micfil->vad_init_mode = val; in hwvad_put_init_mode()
317 struct fsl_micfil *micfil = snd_soc_component_get_drvdata(comp); in hwvad_get_init_mode() local
319 ucontrol->value.enumerated.item[0] = micfil->vad_init_mode; in hwvad_get_init_mode()
328 struct fsl_micfil *micfil = snd_soc_component_get_drvdata(comp); in hwvad_detected() local
330 ucontrol->value.enumerated.item[0] = micfil->vad_detected; in hwvad_detected()
374 SOC_ENUM_EXT("MICFIL Quality Select",
385 SOC_ENUM_EXT("MICFIL DC Remover Control", fsl_micfil_dc_remover_enum,
402 struct fsl_micfil *micfil = dev_get_drvdata(dev); in fsl_micfil_use_verid() local
406 if (!micfil->soc->use_verid) in fsl_micfil_use_verid()
409 ret = regmap_read(micfil->regmap, REG_MICFIL_VERID, &val); in fsl_micfil_use_verid()
415 micfil->verid.version = val & in fsl_micfil_use_verid()
417 micfil->verid.version >>= MICFIL_VERID_MINOR_SHIFT; in fsl_micfil_use_verid()
418 micfil->verid.feature = val & MICFIL_VERID_FEATURE_MASK; in fsl_micfil_use_verid()
420 ret = regmap_read(micfil->regmap, REG_MICFIL_PARAM, &val); in fsl_micfil_use_verid()
426 micfil->param.hwvad_num = (val & MICFIL_PARAM_NUM_HWVAD_MASK) >> in fsl_micfil_use_verid()
428 micfil->param.hwvad_zcd = val & MICFIL_PARAM_HWVAD_ZCD; in fsl_micfil_use_verid()
429 micfil->param.hwvad_energy_mode = val & MICFIL_PARAM_HWVAD_ENERGY_MODE; in fsl_micfil_use_verid()
430 micfil->param.hwvad = val & MICFIL_PARAM_HWVAD; in fsl_micfil_use_verid()
431 micfil->param.dc_out_bypass = val & MICFIL_PARAM_DC_OUT_BYPASS; in fsl_micfil_use_verid()
432 micfil->param.dc_in_bypass = val & MICFIL_PARAM_DC_IN_BYPASS; in fsl_micfil_use_verid()
433 micfil->param.low_power = val & MICFIL_PARAM_LOW_POWER; in fsl_micfil_use_verid()
434 micfil->param.fil_out_width = val & MICFIL_PARAM_FIL_OUT_WIDTH; in fsl_micfil_use_verid()
435 micfil->param.fifo_ptrwid = (val & MICFIL_PARAM_FIFO_PTRWID_MASK) >> in fsl_micfil_use_verid()
437 micfil->param.npair = (val & MICFIL_PARAM_NPAIR_MASK) >> in fsl_micfil_use_verid()
450 struct fsl_micfil *micfil = dev_get_drvdata(dev); in fsl_micfil_reset() local
453 ret = regmap_clear_bits(micfil->regmap, REG_MICFIL_CTRL1, in fsl_micfil_reset()
458 ret = regmap_set_bits(micfil->regmap, REG_MICFIL_CTRL1, in fsl_micfil_reset()
469 ret = regmap_clear_bits(micfil->regmap, REG_MICFIL_CTRL1, in fsl_micfil_reset()
478 ret = regmap_write_bits(micfil->regmap, REG_MICFIL_STAT, 0xFF, 0xFF); in fsl_micfil_reset()
488 struct fsl_micfil *micfil = snd_soc_dai_get_drvdata(dai); in fsl_micfil_startup() local
493 if (!micfil) { in fsl_micfil_startup()
494 dev_err(dai->dev, "micfil dai priv_data not set\n"); in fsl_micfil_startup()
498 micfil->constraint_rates.list = micfil->constraint_rates_list; in fsl_micfil_startup()
499 micfil->constraint_rates.count = 0; in fsl_micfil_startup()
503 clk_rate = clk_get_rate(micfil->clk_src[i]); in fsl_micfil_startup()
505 micfil->constraint_rates_list[k++] = rates[j]; in fsl_micfil_startup()
506 micfil->constraint_rates.count++; in fsl_micfil_startup()
512 if (micfil->constraint_rates.count > 0) in fsl_micfil_startup()
515 &micfil->constraint_rates); in fsl_micfil_startup()
521 static int fsl_micfil_configure_hwvad_interrupts(struct fsl_micfil *micfil, int enable) in fsl_micfil_configure_hwvad_interrupts() argument
527 regmap_update_bits(micfil->regmap, REG_MICFIL_VAD0_CTRL1, in fsl_micfil_configure_hwvad_interrupts()
531 regmap_update_bits(micfil->regmap, REG_MICFIL_VAD0_CTRL1, in fsl_micfil_configure_hwvad_interrupts()
538 static int fsl_micfil_init_hwvad_energy_mode(struct fsl_micfil *micfil) in fsl_micfil_init_hwvad_energy_mode() argument
541 regmap_clear_bits(micfil->regmap, REG_MICFIL_VAD0_CTRL2, in fsl_micfil_init_hwvad_energy_mode()
545 regmap_clear_bits(micfil->regmap, REG_MICFIL_VAD0_CTRL2, in fsl_micfil_init_hwvad_energy_mode()
549 regmap_clear_bits(micfil->regmap, REG_MICFIL_VAD0_SCONFIG, in fsl_micfil_init_hwvad_energy_mode()
553 regmap_clear_bits(micfil->regmap, REG_MICFIL_VAD0_SCONFIG, in fsl_micfil_init_hwvad_energy_mode()
557 regmap_set_bits(micfil->regmap, REG_MICFIL_VAD0_NCONFIG, in fsl_micfil_init_hwvad_energy_mode()
561 regmap_clear_bits(micfil->regmap, REG_MICFIL_VAD0_NCONFIG, in fsl_micfil_init_hwvad_energy_mode()
565 regmap_clear_bits(micfil->regmap, REG_MICFIL_VAD0_NCONFIG, in fsl_micfil_init_hwvad_energy_mode()
569 regmap_clear_bits(micfil->regmap, REG_MICFIL_VAD0_NCONFIG, in fsl_micfil_init_hwvad_energy_mode()
576 static int fsl_micfil_init_hwvad_envelope_mode(struct fsl_micfil *micfil) in fsl_micfil_init_hwvad_envelope_mode() argument
579 regmap_set_bits(micfil->regmap, REG_MICFIL_VAD0_CTRL2, in fsl_micfil_init_hwvad_envelope_mode()
583 regmap_set_bits(micfil->regmap, REG_MICFIL_VAD0_CTRL2, in fsl_micfil_init_hwvad_envelope_mode()
587 regmap_set_bits(micfil->regmap, REG_MICFIL_VAD0_SCONFIG, in fsl_micfil_init_hwvad_envelope_mode()
591 regmap_set_bits(micfil->regmap, REG_MICFIL_VAD0_SCONFIG, in fsl_micfil_init_hwvad_envelope_mode()
595 regmap_clear_bits(micfil->regmap, REG_MICFIL_VAD0_NCONFIG, in fsl_micfil_init_hwvad_envelope_mode()
599 regmap_set_bits(micfil->regmap, REG_MICFIL_VAD0_NCONFIG, in fsl_micfil_init_hwvad_envelope_mode()
603 regmap_set_bits(micfil->regmap, REG_MICFIL_VAD0_NCONFIG, in fsl_micfil_init_hwvad_envelope_mode()
607 regmap_set_bits(micfil->regmap, REG_MICFIL_VAD0_NCONFIG, in fsl_micfil_init_hwvad_envelope_mode()
623 * or reset only when the MICFIL isn't running i.e. when the BSY_FIL
626 static int fsl_micfil_hwvad_enable(struct fsl_micfil *micfil) in fsl_micfil_hwvad_enable() argument
630 micfil->vad_detected = 0; in fsl_micfil_hwvad_enable()
633 if (micfil->vad_init_mode == MICFIL_HWVAD_ENVELOPE_MODE) in fsl_micfil_hwvad_enable()
634 ret = fsl_micfil_init_hwvad_envelope_mode(micfil); in fsl_micfil_hwvad_enable()
636 ret = fsl_micfil_init_hwvad_energy_mode(micfil); in fsl_micfil_hwvad_enable()
641 regmap_set_bits(micfil->regmap, REG_MICFIL_VAD0_CTRL1, in fsl_micfil_hwvad_enable()
645 regmap_clear_bits(micfil->regmap, REG_MICFIL_VAD0_CTRL1, in fsl_micfil_hwvad_enable()
649 ret = fsl_micfil_configure_hwvad_interrupts(micfil, 1); in fsl_micfil_hwvad_enable()
654 regmap_set_bits(micfil->regmap, REG_MICFIL_VAD0_CTRL1, in fsl_micfil_hwvad_enable()
658 regmap_set_bits(micfil->regmap, REG_MICFIL_VAD0_CTRL1, in fsl_micfil_hwvad_enable()
664 static int fsl_micfil_hwvad_disable(struct fsl_micfil *micfil) in fsl_micfil_hwvad_disable() argument
666 struct device *dev = &micfil->pdev->dev; in fsl_micfil_hwvad_disable()
670 regmap_clear_bits(micfil->regmap, REG_MICFIL_VAD0_CTRL1, in fsl_micfil_hwvad_disable()
674 ret = fsl_micfil_configure_hwvad_interrupts(micfil, 0); in fsl_micfil_hwvad_disable()
684 struct fsl_micfil *micfil = snd_soc_dai_get_drvdata(dai); in fsl_micfil_trigger() local
685 struct device *dev = &micfil->pdev->dev; in fsl_micfil_trigger()
704 ret = regmap_update_bits(micfil->regmap, REG_MICFIL_CTRL1, in fsl_micfil_trigger()
711 ret = regmap_set_bits(micfil->regmap, REG_MICFIL_CTRL1, in fsl_micfil_trigger()
716 if (micfil->vad_enabled) in fsl_micfil_trigger()
717 fsl_micfil_hwvad_enable(micfil); in fsl_micfil_trigger()
723 if (micfil->vad_enabled) in fsl_micfil_trigger()
724 fsl_micfil_hwvad_disable(micfil); in fsl_micfil_trigger()
727 ret = regmap_clear_bits(micfil->regmap, REG_MICFIL_CTRL1, in fsl_micfil_trigger()
732 ret = regmap_update_bits(micfil->regmap, REG_MICFIL_CTRL1, in fsl_micfil_trigger()
744 static int fsl_micfil_reparent_rootclk(struct fsl_micfil *micfil, unsigned int sample_rate) in fsl_micfil_reparent_rootclk() argument
746 struct device *dev = &micfil->pdev->dev; in fsl_micfil_reparent_rootclk()
752 clk = micfil->mclk; in fsl_micfil_reparent_rootclk()
755 fsl_asoc_reparent_pll_clocks(dev, clk, micfil->pll8k_clk, in fsl_micfil_reparent_rootclk()
756 micfil->pll11k_clk, ratio); in fsl_micfil_reparent_rootclk()
768 struct fsl_micfil *micfil = snd_soc_dai_get_drvdata(dai); in fsl_micfil_hw_params() local
776 ret = regmap_clear_bits(micfil->regmap, REG_MICFIL_CTRL1, in fsl_micfil_hw_params()
782 ret = regmap_update_bits(micfil->regmap, REG_MICFIL_CTRL1, in fsl_micfil_hw_params()
787 ret = fsl_micfil_reparent_rootclk(micfil, rate); in fsl_micfil_hw_params()
791 micfil->mclk_flag = true; in fsl_micfil_hw_params()
793 ret = clk_set_rate(micfil->mclk, rate * clk_div * osr * 8); in fsl_micfil_hw_params()
797 ret = micfil_set_quality(micfil); in fsl_micfil_hw_params()
801 ret = regmap_update_bits(micfil->regmap, REG_MICFIL_CTRL2, in fsl_micfil_hw_params()
807 regmap_update_bits(micfil->regmap, REG_MICFIL_VAD0_CTRL1, in fsl_micfil_hw_params()
812 regmap_update_bits(micfil->regmap, REG_MICFIL_VAD0_CTRL1, in fsl_micfil_hw_params()
816 micfil->dma_params_rx.peripheral_config = &micfil->sdmacfg; in fsl_micfil_hw_params()
817 micfil->dma_params_rx.peripheral_size = sizeof(micfil->sdmacfg); in fsl_micfil_hw_params()
818 micfil->sdmacfg.n_fifos_src = channels; in fsl_micfil_hw_params()
819 micfil->sdmacfg.sw_done = true; in fsl_micfil_hw_params()
820 micfil->dma_params_rx.maxburst = channels * MICFIL_DMA_MAXBURST_RX; in fsl_micfil_hw_params()
821 if (micfil->soc->use_edma) in fsl_micfil_hw_params()
822 micfil->dma_params_rx.maxburst = channels; in fsl_micfil_hw_params()
830 struct fsl_micfil *micfil = snd_soc_dai_get_drvdata(dai); in fsl_micfil_hw_free() local
832 clk_disable_unprepare(micfil->mclk); in fsl_micfil_hw_free()
833 micfil->mclk_flag = false; in fsl_micfil_hw_free()
840 struct fsl_micfil *micfil = dev_get_drvdata(cpu_dai->dev); in fsl_micfil_dai_probe() local
845 micfil->quality = QUALITY_VLOW0; in fsl_micfil_dai_probe()
846 micfil->card = cpu_dai->component->card; in fsl_micfil_dai_probe()
849 regmap_write(micfil->regmap, REG_MICFIL_OUT_CTRL, 0x22222222); in fsl_micfil_dai_probe()
854 ret = regmap_update_bits(micfil->regmap, REG_MICFIL_DC_CTRL, in fsl_micfil_dai_probe()
860 micfil->dc_remover = MICFIL_DC_BYPASS; in fsl_micfil_dai_probe()
863 &micfil->dma_params_rx); in fsl_micfil_dai_probe()
866 ret = regmap_update_bits(micfil->regmap, REG_MICFIL_FIFO_CTRL, in fsl_micfil_dai_probe()
868 FIELD_PREP(MICFIL_FIFO_CTRL_FIFOWMK, micfil->soc->fifo_depth - 1)); in fsl_micfil_dai_probe()
877 struct fsl_micfil *micfil = snd_soc_component_get_drvdata(component); in fsl_micfil_component_probe() local
879 if (micfil->soc->volume_sx) in fsl_micfil_component_probe()
909 .name = "fsl-micfil-dai",
945 struct fsl_micfil *micfil = dev_get_drvdata(dev); in fsl_micfil_readable_reg() local
975 if (micfil->soc->use_verid) in fsl_micfil_readable_reg()
985 struct fsl_micfil *micfil = dev_get_drvdata(dev); in fsl_micfil_writeable_reg() local
1004 if (micfil->soc->use_verid) in fsl_micfil_writeable_reg()
1054 struct fsl_micfil *micfil = (struct fsl_micfil *)devid; in micfil_isr() local
1055 struct platform_device *pdev = micfil->pdev; in micfil_isr()
1062 regmap_read(micfil->regmap, REG_MICFIL_STAT, &stat_reg); in micfil_isr()
1063 regmap_read(micfil->regmap, REG_MICFIL_CTRL1, &ctrl1_reg); in micfil_isr()
1064 regmap_read(micfil->regmap, REG_MICFIL_FIFO_STAT, &fifo_stat_reg); in micfil_isr()
1077 regmap_write_bits(micfil->regmap, in micfil_isr()
1100 struct fsl_micfil *micfil = (struct fsl_micfil *)devid; in micfil_err_isr() local
1101 struct platform_device *pdev = micfil->pdev; in micfil_err_isr()
1106 regmap_read(micfil->regmap, REG_MICFIL_STAT, &stat_reg); in micfil_err_isr()
1116 regmap_write_bits(micfil->regmap, REG_MICFIL_STAT, in micfil_err_isr()
1120 regmap_read(micfil->regmap, REG_MICFIL_FIFO_STAT, &fifo_stat_reg); in micfil_err_isr()
1121 regmap_write_bits(micfil->regmap, REG_MICFIL_FIFO_STAT, in micfil_err_isr()
1124 regmap_read(micfil->regmap, REG_MICFIL_OUT_STAT, &out_stat_reg); in micfil_err_isr()
1125 regmap_write_bits(micfil->regmap, REG_MICFIL_OUT_STAT, in micfil_err_isr()
1133 struct fsl_micfil *micfil = (struct fsl_micfil *)devid; in voice_detected_fn() local
1136 if (!micfil->card) in voice_detected_fn()
1139 kctl = snd_soc_card_get_kcontrol(micfil->card, "VAD Detected"); in voice_detected_fn()
1143 if (micfil->vad_detected) in voice_detected_fn()
1144 snd_ctl_notify(micfil->card->snd_card, in voice_detected_fn()
1153 struct fsl_micfil *micfil = (struct fsl_micfil *)devid; in hwvad_isr() local
1154 struct device *dev = &micfil->pdev->dev; in hwvad_isr()
1158 regmap_read(micfil->regmap, REG_MICFIL_VAD0_STAT, &vad0_reg); in hwvad_isr()
1168 regmap_write_bits(micfil->regmap, REG_MICFIL_VAD0_STAT, in hwvad_isr()
1172 micfil->vad_detected = 1; in hwvad_isr()
1175 ret = fsl_micfil_hwvad_disable(micfil); in hwvad_isr()
1184 struct fsl_micfil *micfil = (struct fsl_micfil *)devid; in hwvad_err_isr() local
1185 struct device *dev = &micfil->pdev->dev; in hwvad_err_isr()
1188 regmap_read(micfil->regmap, REG_MICFIL_VAD0_STAT, &vad0_reg); in hwvad_err_isr()
1202 struct fsl_micfil *micfil; in fsl_micfil_probe() local
1207 micfil = devm_kzalloc(&pdev->dev, sizeof(*micfil), GFP_KERNEL); in fsl_micfil_probe()
1208 if (!micfil) in fsl_micfil_probe()
1211 micfil->pdev = pdev; in fsl_micfil_probe()
1212 strscpy(micfil->name, np->name, sizeof(micfil->name)); in fsl_micfil_probe()
1214 micfil->soc = of_device_get_match_data(&pdev->dev); in fsl_micfil_probe()
1219 micfil->mclk = devm_clk_get(&pdev->dev, "ipg_clk_app"); in fsl_micfil_probe()
1220 if (IS_ERR(micfil->mclk)) { in fsl_micfil_probe()
1222 PTR_ERR(micfil->mclk)); in fsl_micfil_probe()
1223 return PTR_ERR(micfil->mclk); in fsl_micfil_probe()
1226 micfil->busclk = devm_clk_get(&pdev->dev, "ipg_clk"); in fsl_micfil_probe()
1227 if (IS_ERR(micfil->busclk)) { in fsl_micfil_probe()
1229 PTR_ERR(micfil->busclk)); in fsl_micfil_probe()
1230 return PTR_ERR(micfil->busclk); in fsl_micfil_probe()
1233 fsl_asoc_get_pll_clocks(&pdev->dev, &micfil->pll8k_clk, in fsl_micfil_probe()
1234 &micfil->pll11k_clk); in fsl_micfil_probe()
1236 micfil->clk_src[MICFIL_AUDIO_PLL1] = micfil->pll8k_clk; in fsl_micfil_probe()
1237 micfil->clk_src[MICFIL_AUDIO_PLL2] = micfil->pll11k_clk; in fsl_micfil_probe()
1238 micfil->clk_src[MICFIL_CLK_EXT3] = devm_clk_get(&pdev->dev, "clkext3"); in fsl_micfil_probe()
1239 if (IS_ERR(micfil->clk_src[MICFIL_CLK_EXT3])) in fsl_micfil_probe()
1240 micfil->clk_src[MICFIL_CLK_EXT3] = NULL; in fsl_micfil_probe()
1247 micfil->regmap = devm_regmap_init_mmio(&pdev->dev, in fsl_micfil_probe()
1250 if (IS_ERR(micfil->regmap)) { in fsl_micfil_probe()
1251 dev_err(&pdev->dev, "failed to init MICFIL regmap: %ld\n", in fsl_micfil_probe()
1252 PTR_ERR(micfil->regmap)); in fsl_micfil_probe()
1253 return PTR_ERR(micfil->regmap); in fsl_micfil_probe()
1260 &micfil->dataline); in fsl_micfil_probe()
1262 micfil->dataline = 1; in fsl_micfil_probe()
1264 if (micfil->dataline & ~micfil->soc->dataline) { in fsl_micfil_probe()
1266 micfil->soc->dataline); in fsl_micfil_probe()
1272 micfil->irq[i] = platform_get_irq(pdev, i); in fsl_micfil_probe()
1273 if (micfil->irq[i] < 0) in fsl_micfil_probe()
1274 return micfil->irq[i]; in fsl_micfil_probe()
1278 ret = devm_request_irq(&pdev->dev, micfil->irq[0], in fsl_micfil_probe()
1280 micfil->name, micfil); in fsl_micfil_probe()
1283 micfil->irq[0]); in fsl_micfil_probe()
1288 ret = devm_request_irq(&pdev->dev, micfil->irq[1], in fsl_micfil_probe()
1290 micfil->name, micfil); in fsl_micfil_probe()
1293 micfil->irq[1]); in fsl_micfil_probe()
1298 ret = devm_request_threaded_irq(&pdev->dev, micfil->irq[2], in fsl_micfil_probe()
1300 IRQF_SHARED, micfil->name, micfil); in fsl_micfil_probe()
1303 micfil->irq[0]); in fsl_micfil_probe()
1308 ret = devm_request_irq(&pdev->dev, micfil->irq[3], in fsl_micfil_probe()
1310 micfil->name, micfil); in fsl_micfil_probe()
1313 micfil->irq[1]); in fsl_micfil_probe()
1317 micfil->dma_params_rx.chan_name = "rx"; in fsl_micfil_probe()
1318 micfil->dma_params_rx.addr = res->start + REG_MICFIL_DATACH0; in fsl_micfil_probe()
1319 micfil->dma_params_rx.maxburst = MICFIL_DMA_MAXBURST_RX; in fsl_micfil_probe()
1321 platform_set_drvdata(pdev, micfil); in fsl_micfil_probe()
1334 /* Get micfil version */ in fsl_micfil_probe()
1337 dev_warn(&pdev->dev, "Error reading MICFIL version: %d\n", ret); in fsl_micfil_probe()
1343 regcache_cache_only(micfil->regmap, true); in fsl_micfil_probe()
1355 fsl_micfil_dai.capture.formats = micfil->soc->formats; in fsl_micfil_probe()
1383 struct fsl_micfil *micfil = dev_get_drvdata(dev); in fsl_micfil_runtime_suspend() local
1385 regcache_cache_only(micfil->regmap, true); in fsl_micfil_runtime_suspend()
1387 if (micfil->mclk_flag) in fsl_micfil_runtime_suspend()
1388 clk_disable_unprepare(micfil->mclk); in fsl_micfil_runtime_suspend()
1389 clk_disable_unprepare(micfil->busclk); in fsl_micfil_runtime_suspend()
1396 struct fsl_micfil *micfil = dev_get_drvdata(dev); in fsl_micfil_runtime_resume() local
1399 ret = clk_prepare_enable(micfil->busclk); in fsl_micfil_runtime_resume()
1403 if (micfil->mclk_flag) { in fsl_micfil_runtime_resume()
1404 ret = clk_prepare_enable(micfil->mclk); in fsl_micfil_runtime_resume()
1406 clk_disable_unprepare(micfil->busclk); in fsl_micfil_runtime_resume()
1411 regcache_cache_only(micfil->regmap, false); in fsl_micfil_runtime_resume()
1412 regcache_mark_dirty(micfil->regmap); in fsl_micfil_runtime_resume()
1413 regcache_sync(micfil->regmap); in fsl_micfil_runtime_resume()
1430 .name = "fsl-micfil-dai",
1438 MODULE_DESCRIPTION("NXP PDM Microphone Interface (MICFIL) driver");