Lines Matching +full:vp +full:- +full:supply
1 // SPDX-License-Identifier: GPL-2.0-only
3 * cs35l33.c -- CS35L33 ALSA SoC audio driver
22 #include <sound/soc-dapm.h>
184 static DECLARE_TLV_DB_SCALE(dac_tlv, -10200, 50, 0);
197 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in cs35l33_spkrdrv_event()
202 if (!priv->amp_cal) { in cs35l33_spkrdrv_event()
204 priv->amp_cal = true; in cs35l33_spkrdrv_event()
205 regmap_update_bits(priv->regmap, CS35L33_CLASSD_CTL, in cs35l33_spkrdrv_event()
207 dev_dbg(component->dev, "Amp calibration done\n"); in cs35l33_spkrdrv_event()
209 dev_dbg(component->dev, "Amp turned on\n"); in cs35l33_spkrdrv_event()
212 dev_dbg(component->dev, "Amp turned off\n"); in cs35l33_spkrdrv_event()
215 dev_err(component->dev, "Invalid event = 0x%x\n", event); in cs35l33_spkrdrv_event()
225 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in cs35l33_sdin_event()
231 regmap_update_bits(priv->regmap, CS35L33_PWRCTL1, in cs35l33_sdin_event()
233 val = priv->is_tdm_mode ? 0 : CS35L33_PDN_TDM; in cs35l33_sdin_event()
234 regmap_update_bits(priv->regmap, CS35L33_PWRCTL2, in cs35l33_sdin_event()
236 dev_dbg(component->dev, "BST turned on\n"); in cs35l33_sdin_event()
239 dev_dbg(component->dev, "SDIN turned on\n"); in cs35l33_sdin_event()
240 if (!priv->amp_cal) { in cs35l33_sdin_event()
241 regmap_update_bits(priv->regmap, CS35L33_CLASSD_CTL, in cs35l33_sdin_event()
243 dev_dbg(component->dev, "Amp calibration started\n"); in cs35l33_sdin_event()
248 regmap_update_bits(priv->regmap, CS35L33_PWRCTL2, in cs35l33_sdin_event()
251 regmap_update_bits(priv->regmap, CS35L33_PWRCTL1, in cs35l33_sdin_event()
253 dev_dbg(component->dev, "BST and SDIN turned off\n"); in cs35l33_sdin_event()
256 dev_err(component->dev, "Invalid event = 0x%x\n", event); in cs35l33_sdin_event()
266 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in cs35l33_sdout_event()
274 if (priv->is_tdm_mode) { in cs35l33_sdout_event()
285 dev_dbg(component->dev, "SDOUT turned on\n"); in cs35l33_sdout_event()
290 dev_dbg(component->dev, "SDOUT turned off\n"); in cs35l33_sdout_event()
293 dev_err(component->dev, "Invalid event = 0x%x\n", event); in cs35l33_sdout_event()
297 regmap_update_bits(priv->regmap, CS35L33_PWRCTL2, in cs35l33_sdout_event()
299 regmap_update_bits(priv->regmap, CS35L33_CLK_CTL, in cs35l33_sdout_event()
366 regmap_update_bits(priv->regmap, CS35L33_PWRCTL1, in cs35l33_set_bias_level()
368 regmap_update_bits(priv->regmap, CS35L33_CLK_CTL, in cs35l33_set_bias_level()
372 regmap_update_bits(priv->regmap, CS35L33_PWRCTL1, in cs35l33_set_bias_level()
374 regmap_read(priv->regmap, CS35L33_INT_STATUS_2, &val); in cs35l33_set_bias_level()
377 regmap_update_bits(priv->regmap, CS35L33_CLK_CTL, in cs35l33_set_bias_level()
383 return -EINVAL; in cs35l33_set_bias_level()
432 return -EINVAL; in cs35l33_get_mclk_coeff()
437 struct snd_soc_component *component = codec_dai->component; in cs35l33_set_dai_fmt()
442 regmap_update_bits(priv->regmap, CS35L33_ADSP_CTL, in cs35l33_set_dai_fmt()
444 dev_dbg(component->dev, "Audio port in master mode\n"); in cs35l33_set_dai_fmt()
447 regmap_update_bits(priv->regmap, CS35L33_ADSP_CTL, in cs35l33_set_dai_fmt()
449 dev_dbg(component->dev, "Audio port in slave mode\n"); in cs35l33_set_dai_fmt()
452 return -EINVAL; in cs35l33_set_dai_fmt()
458 * tdm mode in cs35l33 resembles dsp-a mode very in cs35l33_set_dai_fmt()
459 * closely, it is dsp-a with fsync shifted left by half bclk in cs35l33_set_dai_fmt()
461 priv->is_tdm_mode = true; in cs35l33_set_dai_fmt()
462 dev_dbg(component->dev, "Audio port in TDM mode\n"); in cs35l33_set_dai_fmt()
465 priv->is_tdm_mode = false; in cs35l33_set_dai_fmt()
466 dev_dbg(component->dev, "Audio port in I2S mode\n"); in cs35l33_set_dai_fmt()
469 return -EINVAL; in cs35l33_set_dai_fmt()
479 struct snd_soc_component *component = dai->component; in cs35l33_pcm_hw_params()
482 int coeff = cs35l33_get_mclk_coeff(priv->mclk_int, params_rate(params)); in cs35l33_pcm_hw_params()
487 regmap_update_bits(priv->regmap, CS35L33_CLK_CTL, in cs35l33_pcm_hw_params()
492 if (priv->is_tdm_mode) { in cs35l33_pcm_hw_params()
493 sample_size = (sample_size / 8) - 1; in cs35l33_pcm_hw_params()
496 regmap_update_bits(priv->regmap, CS35L33_RX_AUD, in cs35l33_pcm_hw_params()
501 dev_dbg(component->dev, "sample rate=%d, bits per sample=%d\n", in cs35l33_pcm_hw_params()
520 snd_pcm_hw_constraint_list(substream->runtime, 0, in cs35l33_pcm_startup()
528 struct snd_soc_component *component = dai->component; in cs35l33_set_tristate()
532 regmap_update_bits(priv->regmap, CS35L33_PWRCTL2, in cs35l33_set_tristate()
534 regmap_update_bits(priv->regmap, CS35L33_CLK_CTL, in cs35l33_set_tristate()
537 regmap_update_bits(priv->regmap, CS35L33_PWRCTL2, in cs35l33_set_tristate()
539 regmap_update_bits(priv->regmap, CS35L33_CLK_CTL, in cs35l33_set_tristate()
549 struct snd_soc_component *component = dai->component; in cs35l33_set_tdm_slot()
556 return -EINVAL; in cs35l33_set_tdm_slot()
559 slot = ffs(rx_mask) - 1; in cs35l33_set_tdm_slot()
561 regmap_update_bits(priv->regmap, CS35L33_RX_AUD, in cs35l33_set_tdm_slot()
563 dev_dbg(component->dev, "Audio starts from slots %d", slot); in cs35l33_set_tdm_slot()
570 slot = ffs(tx_mask) - 1; in cs35l33_set_tdm_slot()
575 regmap_update_bits(priv->regmap, CS35L33_TX_VPMON + i, in cs35l33_set_tdm_slot()
580 /* disconnect {vp,vbst}_mon routes: eanble later if set in tx_mask*/ in cs35l33_set_tdm_slot()
587 regmap_update_bits(priv->regmap, CS35L33_TX_VMON, in cs35l33_set_tdm_slot()
589 dev_dbg(component->dev, "VMON enabled in slots %d-%d", in cs35l33_set_tdm_slot()
595 regmap_update_bits(priv->regmap, CS35L33_TX_IMON, in cs35l33_set_tdm_slot()
597 dev_dbg(component->dev, "IMON enabled in slots %d-%d", in cs35l33_set_tdm_slot()
603 regmap_update_bits(priv->regmap, CS35L33_TX_VPMON, in cs35l33_set_tdm_slot()
607 dev_dbg(component->dev, "VPMON enabled in slots %d", slot); in cs35l33_set_tdm_slot()
612 regmap_update_bits(priv->regmap, CS35L33_TX_VBSTMON, in cs35l33_set_tdm_slot()
616 dev_dbg(component->dev, in cs35l33_set_tdm_slot()
621 reg = CS35L33_TX_EN4 - (slot/8); in cs35l33_set_tdm_slot()
622 bit_pos = slot - ((slot / 8) * (8)); in cs35l33_set_tdm_slot()
623 regmap_update_bits(priv->regmap, reg, in cs35l33_set_tdm_slot()
627 slot = ffs(tx_mask) - 1; in cs35l33_set_tdm_slot()
643 regmap_update_bits(cs35l33->regmap, CS35L33_CLK_CTL, in cs35l33_component_set_sysclk()
645 cs35l33->mclk_int = freq; in cs35l33_component_set_sysclk()
650 regmap_update_bits(cs35l33->regmap, CS35L33_CLK_CTL, in cs35l33_component_set_sysclk()
652 cs35l33->mclk_int = freq/2; in cs35l33_component_set_sysclk()
655 cs35l33->mclk_int = 0; in cs35l33_component_set_sysclk()
656 return -EINVAL; in cs35l33_component_set_sysclk()
659 dev_dbg(component->dev, "external mclk freq=%d, internal mclk freq=%d\n", in cs35l33_component_set_sysclk()
660 freq, cs35l33->mclk_int); in cs35l33_component_set_sysclk()
674 .name = "cs35l33-dai",
697 struct cs35l33_hg *hg_config = &pdata->hg_config; in cs35l33_set_hg_data()
701 if (hg_config->enable_hg_algo) { in cs35l33_set_hg_data()
702 regmap_update_bits(priv->regmap, CS35L33_HG_MEMLDO_CTL, in cs35l33_set_hg_data()
704 hg_config->mem_depth << CS35L33_MEM_DEPTH_SHIFT); in cs35l33_set_hg_data()
705 regmap_write(priv->regmap, CS35L33_HG_REL_RATE, in cs35l33_set_hg_data()
706 hg_config->release_rate); in cs35l33_set_hg_data()
707 regmap_update_bits(priv->regmap, CS35L33_HG_HEAD, in cs35l33_set_hg_data()
709 hg_config->hd_rm << CS35L33_HD_RM_SHIFT); in cs35l33_set_hg_data()
710 regmap_update_bits(priv->regmap, CS35L33_HG_MEMLDO_CTL, in cs35l33_set_hg_data()
712 hg_config->ldo_thld << CS35L33_LDO_THLD_SHIFT); in cs35l33_set_hg_data()
713 regmap_update_bits(priv->regmap, CS35L33_HG_MEMLDO_CTL, in cs35l33_set_hg_data()
715 hg_config->ldo_path_disable << in cs35l33_set_hg_data()
717 regmap_update_bits(priv->regmap, CS35L33_LDO_DEL, in cs35l33_set_hg_data()
719 hg_config->ldo_entry_delay << in cs35l33_set_hg_data()
721 if (hg_config->vp_hg_auto) { in cs35l33_set_hg_data()
722 regmap_update_bits(priv->regmap, CS35L33_HG_EN, in cs35l33_set_hg_data()
728 regmap_update_bits(priv->regmap, CS35L33_HG_EN, in cs35l33_set_hg_data()
730 hg_config->vp_hg << CS35L33_VP_HG_SHIFT); in cs35l33_set_hg_data()
731 regmap_update_bits(priv->regmap, CS35L33_LDO_DEL, in cs35l33_set_hg_data()
733 hg_config->vp_hg_rate << CS35L33_VP_HG_RATE_SHIFT); in cs35l33_set_hg_data()
734 regmap_update_bits(priv->regmap, CS35L33_LDO_DEL, in cs35l33_set_hg_data()
736 hg_config->vp_hg_va << CS35L33_VP_HG_VA_SHIFT); in cs35l33_set_hg_data()
737 regmap_update_bits(priv->regmap, CS35L33_HG_EN, in cs35l33_set_hg_data()
750 dev_err(component->dev, "Invalid boost current %d\n", bst); in cs35l33_set_bst_ipk()
751 ret = -EINVAL; in cs35l33_set_bst_ipk()
756 dev_err(component->dev, "Current not a multiple of 15625uA (%d)\n", in cs35l33_set_bst_ipk()
758 ret = -EINVAL; in cs35l33_set_bst_ipk()
763 bst -= 15625; in cs35l33_set_bst_ipk()
767 regmap_write(cs35l33->regmap, CS35L33_BST_PEAK_CTL, in cs35l33_set_bst_ipk()
778 cs35l33->component = component; in cs35l33_probe()
779 pm_runtime_get_sync(component->dev); in cs35l33_probe()
781 regmap_update_bits(cs35l33->regmap, CS35L33_PROTECT_CTL, in cs35l33_probe()
783 regmap_update_bits(cs35l33->regmap, CS35L33_BST_CTL2, in cs35l33_probe()
788 regmap_update_bits(cs35l33->regmap, CS35L33_BST_CTL1, in cs35l33_probe()
789 CS35L33_BST_CTL_MASK, cs35l33->pdata.boost_ctl); in cs35l33_probe()
790 regmap_update_bits(cs35l33->regmap, CS35L33_CLASSD_CTL, in cs35l33_probe()
792 cs35l33->pdata.amp_drv_sel << CS35L33_AMP_DRV_SEL_SHIFT); in cs35l33_probe()
794 if (cs35l33->pdata.boost_ipk) in cs35l33_probe()
795 cs35l33_set_bst_ipk(component, cs35l33->pdata.boost_ipk); in cs35l33_probe()
797 if (cs35l33->enable_soft_ramp) { in cs35l33_probe()
801 CS35L33_DSR_RATE, cs35l33->pdata.ramp_rate); in cs35l33_probe()
808 if (cs35l33->pdata.imon_adc_scale != 0x8) in cs35l33_probe()
810 CS35L33_IMON_SCALE, cs35l33->pdata.imon_adc_scale); in cs35l33_probe()
812 cs35l33_set_hg_data(component, &(cs35l33->pdata)); in cs35l33_probe()
818 regmap_update_bits(cs35l33->regmap, CS35L33_INT_MASK_1, in cs35l33_probe()
822 pm_runtime_put_sync(component->dev); in cs35l33_probe()
863 gpiod_set_value_cansleep(cs35l33->reset_gpio, 0); in cs35l33_runtime_resume()
865 ret = regulator_bulk_enable(cs35l33->num_core_supplies, in cs35l33_runtime_resume()
866 cs35l33->core_supplies); in cs35l33_runtime_resume()
872 regcache_cache_only(cs35l33->regmap, false); in cs35l33_runtime_resume()
874 gpiod_set_value_cansleep(cs35l33->reset_gpio, 1); in cs35l33_runtime_resume()
878 ret = regcache_sync(cs35l33->regmap); in cs35l33_runtime_resume()
887 regcache_cache_only(cs35l33->regmap, true); in cs35l33_runtime_resume()
888 regulator_bulk_disable(cs35l33->num_core_supplies, in cs35l33_runtime_resume()
889 cs35l33->core_supplies); in cs35l33_runtime_resume()
901 cs35l33->amp_cal = false; in cs35l33_runtime_suspend()
903 regcache_cache_only(cs35l33->regmap, true); in cs35l33_runtime_suspend()
904 regcache_mark_dirty(cs35l33->regmap); in cs35l33_runtime_suspend()
905 regulator_bulk_disable(cs35l33->num_core_supplies, in cs35l33_runtime_suspend()
906 cs35l33->core_supplies); in cs35l33_runtime_suspend()
921 struct cs35l33_hg *hg_config = &pdata->hg_config; in cs35l33_get_hg_data()
924 hg = of_get_child_by_name(np, "cirrus,hg-algo"); in cs35l33_get_hg_data()
925 hg_config->enable_hg_algo = hg ? true : false; in cs35l33_get_hg_data()
927 if (hg_config->enable_hg_algo) { in cs35l33_get_hg_data()
928 if (of_property_read_u32(hg, "cirrus,mem-depth", &val32) >= 0) in cs35l33_get_hg_data()
929 hg_config->mem_depth = val32; in cs35l33_get_hg_data()
930 if (of_property_read_u32(hg, "cirrus,release-rate", in cs35l33_get_hg_data()
932 hg_config->release_rate = val32; in cs35l33_get_hg_data()
933 if (of_property_read_u32(hg, "cirrus,ldo-thld", &val32) >= 0) in cs35l33_get_hg_data()
934 hg_config->ldo_thld = val32; in cs35l33_get_hg_data()
935 if (of_property_read_u32(hg, "cirrus,ldo-path-disable", in cs35l33_get_hg_data()
937 hg_config->ldo_path_disable = val32; in cs35l33_get_hg_data()
938 if (of_property_read_u32(hg, "cirrus,ldo-entry-delay", in cs35l33_get_hg_data()
940 hg_config->ldo_entry_delay = val32; in cs35l33_get_hg_data()
942 hg_config->vp_hg_auto = of_property_read_bool(hg, in cs35l33_get_hg_data()
943 "cirrus,vp-hg-auto"); in cs35l33_get_hg_data()
945 if (of_property_read_u32(hg, "cirrus,vp-hg", &val32) >= 0) in cs35l33_get_hg_data()
946 hg_config->vp_hg = val32; in cs35l33_get_hg_data()
947 if (of_property_read_u32(hg, "cirrus,vp-hg-rate", &val32) >= 0) in cs35l33_get_hg_data()
948 hg_config->vp_hg_rate = val32; in cs35l33_get_hg_data()
949 if (of_property_read_u32(hg, "cirrus,vp-hg-va", &val32) >= 0) in cs35l33_get_hg_data()
950 hg_config->vp_hg_va = val32; in cs35l33_get_hg_data()
961 struct snd_soc_component *component = cs35l33->component; in cs35l33_irq_thread()
964 regmap_read(cs35l33->regmap, CS35L33_INT_STATUS_2, in cs35l33_irq_thread()
966 regmap_read(cs35l33->regmap, CS35L33_INT_STATUS_1, in cs35l33_irq_thread()
968 regmap_read(cs35l33->regmap, CS35L33_INT_MASK_2, &mask2); in cs35l33_irq_thread()
969 regmap_read(cs35l33->regmap, CS35L33_INT_MASK_1, &mask1); in cs35l33_irq_thread()
977 regmap_read(cs35l33->regmap, CS35L33_INT_STATUS_1, in cs35l33_irq_thread()
983 dev_crit(component->dev, "Amp short error\n"); in cs35l33_irq_thread()
985 dev_dbg(component->dev, in cs35l33_irq_thread()
987 regmap_update_bits(cs35l33->regmap, in cs35l33_irq_thread()
990 regmap_update_bits(cs35l33->regmap, in cs35l33_irq_thread()
994 regmap_update_bits(cs35l33->regmap, in cs35l33_irq_thread()
1001 dev_err(component->dev, "Cal error\n"); in cs35l33_irq_thread()
1004 cs35l33->amp_cal = false; in cs35l33_irq_thread()
1007 dev_dbg(component->dev, "Cal error release\n"); in cs35l33_irq_thread()
1008 regmap_update_bits(cs35l33->regmap, in cs35l33_irq_thread()
1011 regmap_update_bits(cs35l33->regmap, in cs35l33_irq_thread()
1014 regmap_update_bits(cs35l33->regmap, in cs35l33_irq_thread()
1021 dev_crit(component->dev, "Over temperature error\n"); in cs35l33_irq_thread()
1023 dev_dbg(component->dev, in cs35l33_irq_thread()
1025 regmap_update_bits(cs35l33->regmap, in cs35l33_irq_thread()
1027 regmap_update_bits(cs35l33->regmap, in cs35l33_irq_thread()
1030 regmap_update_bits(cs35l33->regmap, in cs35l33_irq_thread()
1036 dev_err(component->dev, "Over temperature warning\n"); in cs35l33_irq_thread()
1038 dev_dbg(component->dev, in cs35l33_irq_thread()
1040 regmap_update_bits(cs35l33->regmap, in cs35l33_irq_thread()
1042 regmap_update_bits(cs35l33->regmap, in cs35l33_irq_thread()
1045 regmap_update_bits(cs35l33->regmap, in cs35l33_irq_thread()
1050 dev_err(component->dev, "ERROR: ADSPCLK Interrupt\n"); in cs35l33_irq_thread()
1053 dev_err(component->dev, "ERROR: MCLK Interrupt\n"); in cs35l33_irq_thread()
1056 dev_err(component->dev, in cs35l33_irq_thread()
1060 dev_err(component->dev, in cs35l33_irq_thread()
1064 dev_err(component->dev, in cs35l33_irq_thread()
1072 "VP",
1078 struct device_node *np = dev->of_node; in cs35l33_of_get_pdata()
1079 struct cs35l33_pdata *pdata = &cs35l33->pdata; in cs35l33_of_get_pdata()
1085 if (of_property_read_u32(np, "cirrus,boost-ctl", &val32) >= 0) { in cs35l33_of_get_pdata()
1086 pdata->boost_ctl = val32; in cs35l33_of_get_pdata()
1087 pdata->amp_drv_sel = 1; in cs35l33_of_get_pdata()
1090 if (of_property_read_u32(np, "cirrus,ramp-rate", &val32) >= 0) { in cs35l33_of_get_pdata()
1091 pdata->ramp_rate = val32; in cs35l33_of_get_pdata()
1092 cs35l33->enable_soft_ramp = true; in cs35l33_of_get_pdata()
1095 if (of_property_read_u32(np, "cirrus,boost-ipk", &val32) >= 0) in cs35l33_of_get_pdata()
1096 pdata->boost_ipk = val32; in cs35l33_of_get_pdata()
1098 if (of_property_read_u32(np, "cirrus,imon-adc-scale", &val32) >= 0) { in cs35l33_of_get_pdata()
1100 pdata->imon_adc_scale = val32; in cs35l33_of_get_pdata()
1103 pdata->imon_adc_scale = 0x8; in cs35l33_of_get_pdata()
1106 pdata->imon_adc_scale = 0x8; in cs35l33_of_get_pdata()
1117 struct cs35l33_pdata *pdata = dev_get_platdata(&i2c_client->dev); in cs35l33_i2c_probe()
1121 cs35l33 = devm_kzalloc(&i2c_client->dev, sizeof(struct cs35l33_private), in cs35l33_i2c_probe()
1124 return -ENOMEM; in cs35l33_i2c_probe()
1127 cs35l33->regmap = devm_regmap_init_i2c(i2c_client, &cs35l33_regmap); in cs35l33_i2c_probe()
1128 if (IS_ERR(cs35l33->regmap)) { in cs35l33_i2c_probe()
1129 ret = PTR_ERR(cs35l33->regmap); in cs35l33_i2c_probe()
1130 dev_err(&i2c_client->dev, "regmap_init() failed: %d\n", ret); in cs35l33_i2c_probe()
1134 regcache_cache_only(cs35l33->regmap, true); in cs35l33_i2c_probe()
1137 cs35l33->core_supplies[i].supply in cs35l33_i2c_probe()
1139 cs35l33->num_core_supplies = ARRAY_SIZE(cs35l33_core_supplies); in cs35l33_i2c_probe()
1141 ret = devm_regulator_bulk_get(&i2c_client->dev, in cs35l33_i2c_probe()
1142 cs35l33->num_core_supplies, in cs35l33_i2c_probe()
1143 cs35l33->core_supplies); in cs35l33_i2c_probe()
1145 dev_err(&i2c_client->dev, in cs35l33_i2c_probe()
1152 cs35l33->pdata = *pdata; in cs35l33_i2c_probe()
1154 cs35l33_of_get_pdata(&i2c_client->dev, cs35l33); in cs35l33_i2c_probe()
1155 pdata = &cs35l33->pdata; in cs35l33_i2c_probe()
1158 ret = devm_request_threaded_irq(&i2c_client->dev, i2c_client->irq, NULL, in cs35l33_i2c_probe()
1162 dev_warn(&i2c_client->dev, "Failed to request IRQ: %d\n", ret); in cs35l33_i2c_probe()
1165 cs35l33->reset_gpio = devm_gpiod_get_optional(&i2c_client->dev, in cs35l33_i2c_probe()
1167 if (IS_ERR(cs35l33->reset_gpio)) { in cs35l33_i2c_probe()
1168 dev_err(&i2c_client->dev, "%s ERROR: Can't get reset GPIO\n", in cs35l33_i2c_probe()
1170 return PTR_ERR(cs35l33->reset_gpio); in cs35l33_i2c_probe()
1173 ret = regulator_bulk_enable(cs35l33->num_core_supplies, in cs35l33_i2c_probe()
1174 cs35l33->core_supplies); in cs35l33_i2c_probe()
1176 dev_err(&i2c_client->dev, in cs35l33_i2c_probe()
1182 gpiod_set_value_cansleep(cs35l33->reset_gpio, 1); in cs35l33_i2c_probe()
1185 regcache_cache_only(cs35l33->regmap, false); in cs35l33_i2c_probe()
1188 devid = cirrus_read_device_id(cs35l33->regmap, CS35L33_DEVID_AB); in cs35l33_i2c_probe()
1191 dev_err(&i2c_client->dev, "Failed to read device ID: %d\n", ret); in cs35l33_i2c_probe()
1196 dev_err(&i2c_client->dev, in cs35l33_i2c_probe()
1199 ret = -EINVAL; in cs35l33_i2c_probe()
1203 ret = regmap_read(cs35l33->regmap, CS35L33_REV_ID, ®); in cs35l33_i2c_probe()
1205 dev_err(&i2c_client->dev, "Get Revision ID failed\n"); in cs35l33_i2c_probe()
1209 dev_info(&i2c_client->dev, in cs35l33_i2c_probe()
1212 ret = regmap_register_patch(cs35l33->regmap, in cs35l33_i2c_probe()
1215 dev_err(&i2c_client->dev, in cs35l33_i2c_probe()
1221 regmap_update_bits(cs35l33->regmap, CS35L33_CLK_CTL, in cs35l33_i2c_probe()
1225 pm_runtime_set_autosuspend_delay(&i2c_client->dev, 100); in cs35l33_i2c_probe()
1226 pm_runtime_use_autosuspend(&i2c_client->dev); in cs35l33_i2c_probe()
1227 pm_runtime_set_active(&i2c_client->dev); in cs35l33_i2c_probe()
1228 pm_runtime_enable(&i2c_client->dev); in cs35l33_i2c_probe()
1230 ret = devm_snd_soc_register_component(&i2c_client->dev, in cs35l33_i2c_probe()
1233 dev_err(&i2c_client->dev, "%s: Register component failed\n", in cs35l33_i2c_probe()
1241 gpiod_set_value_cansleep(cs35l33->reset_gpio, 0); in cs35l33_i2c_probe()
1243 regulator_bulk_disable(cs35l33->num_core_supplies, in cs35l33_i2c_probe()
1244 cs35l33->core_supplies); in cs35l33_i2c_probe()
1253 gpiod_set_value_cansleep(cs35l33->reset_gpio, 0); in cs35l33_i2c_remove()
1255 pm_runtime_disable(&client->dev); in cs35l33_i2c_remove()
1256 regulator_bulk_disable(cs35l33->num_core_supplies, in cs35l33_i2c_remove()
1257 cs35l33->core_supplies); in cs35l33_i2c_remove()