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>
186 static DECLARE_TLV_DB_SCALE(dac_tlv, -10200, 50, 0);
199 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in cs35l33_spkrdrv_event()
204 if (!priv->amp_cal) { in cs35l33_spkrdrv_event()
206 priv->amp_cal = true; in cs35l33_spkrdrv_event()
207 regmap_update_bits(priv->regmap, CS35L33_CLASSD_CTL, in cs35l33_spkrdrv_event()
209 dev_dbg(component->dev, "Amp calibration done\n"); in cs35l33_spkrdrv_event()
211 dev_dbg(component->dev, "Amp turned on\n"); in cs35l33_spkrdrv_event()
214 dev_dbg(component->dev, "Amp turned off\n"); in cs35l33_spkrdrv_event()
217 dev_err(component->dev, "Invalid event = 0x%x\n", event); in cs35l33_spkrdrv_event()
227 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in cs35l33_sdin_event()
233 regmap_update_bits(priv->regmap, CS35L33_PWRCTL1, in cs35l33_sdin_event()
235 val = priv->is_tdm_mode ? 0 : CS35L33_PDN_TDM; in cs35l33_sdin_event()
236 regmap_update_bits(priv->regmap, CS35L33_PWRCTL2, in cs35l33_sdin_event()
238 dev_dbg(component->dev, "BST turned on\n"); in cs35l33_sdin_event()
241 dev_dbg(component->dev, "SDIN turned on\n"); in cs35l33_sdin_event()
242 if (!priv->amp_cal) { in cs35l33_sdin_event()
243 regmap_update_bits(priv->regmap, CS35L33_CLASSD_CTL, in cs35l33_sdin_event()
245 dev_dbg(component->dev, "Amp calibration started\n"); in cs35l33_sdin_event()
250 regmap_update_bits(priv->regmap, CS35L33_PWRCTL2, in cs35l33_sdin_event()
253 regmap_update_bits(priv->regmap, CS35L33_PWRCTL1, in cs35l33_sdin_event()
255 dev_dbg(component->dev, "BST and SDIN turned off\n"); in cs35l33_sdin_event()
258 dev_err(component->dev, "Invalid event = 0x%x\n", event); in cs35l33_sdin_event()
268 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in cs35l33_sdout_event()
276 if (priv->is_tdm_mode) { in cs35l33_sdout_event()
287 dev_dbg(component->dev, "SDOUT turned on\n"); in cs35l33_sdout_event()
292 dev_dbg(component->dev, "SDOUT turned off\n"); in cs35l33_sdout_event()
295 dev_err(component->dev, "Invalid event = 0x%x\n", event); in cs35l33_sdout_event()
299 regmap_update_bits(priv->regmap, CS35L33_PWRCTL2, in cs35l33_sdout_event()
301 regmap_update_bits(priv->regmap, CS35L33_CLK_CTL, in cs35l33_sdout_event()
368 regmap_update_bits(priv->regmap, CS35L33_PWRCTL1, in cs35l33_set_bias_level()
370 regmap_update_bits(priv->regmap, CS35L33_CLK_CTL, in cs35l33_set_bias_level()
374 regmap_update_bits(priv->regmap, CS35L33_PWRCTL1, in cs35l33_set_bias_level()
376 regmap_read(priv->regmap, CS35L33_INT_STATUS_2, &val); in cs35l33_set_bias_level()
379 regmap_update_bits(priv->regmap, CS35L33_CLK_CTL, in cs35l33_set_bias_level()
385 return -EINVAL; in cs35l33_set_bias_level()
434 return -EINVAL; in cs35l33_get_mclk_coeff()
439 struct snd_soc_component *component = codec_dai->component; in cs35l33_set_dai_fmt()
444 regmap_update_bits(priv->regmap, CS35L33_ADSP_CTL, in cs35l33_set_dai_fmt()
446 dev_dbg(component->dev, "Audio port in master mode\n"); in cs35l33_set_dai_fmt()
449 regmap_update_bits(priv->regmap, CS35L33_ADSP_CTL, in cs35l33_set_dai_fmt()
451 dev_dbg(component->dev, "Audio port in slave mode\n"); in cs35l33_set_dai_fmt()
454 return -EINVAL; in cs35l33_set_dai_fmt()
460 * tdm mode in cs35l33 resembles dsp-a mode very in cs35l33_set_dai_fmt()
461 * closely, it is dsp-a with fsync shifted left by half bclk in cs35l33_set_dai_fmt()
463 priv->is_tdm_mode = true; in cs35l33_set_dai_fmt()
464 dev_dbg(component->dev, "Audio port in TDM mode\n"); in cs35l33_set_dai_fmt()
467 priv->is_tdm_mode = false; in cs35l33_set_dai_fmt()
468 dev_dbg(component->dev, "Audio port in I2S mode\n"); in cs35l33_set_dai_fmt()
471 return -EINVAL; in cs35l33_set_dai_fmt()
481 struct snd_soc_component *component = dai->component; in cs35l33_pcm_hw_params()
484 int coeff = cs35l33_get_mclk_coeff(priv->mclk_int, params_rate(params)); in cs35l33_pcm_hw_params()
489 regmap_update_bits(priv->regmap, CS35L33_CLK_CTL, in cs35l33_pcm_hw_params()
494 if (priv->is_tdm_mode) { in cs35l33_pcm_hw_params()
495 sample_size = (sample_size / 8) - 1; in cs35l33_pcm_hw_params()
498 regmap_update_bits(priv->regmap, CS35L33_RX_AUD, in cs35l33_pcm_hw_params()
503 dev_dbg(component->dev, "sample rate=%d, bits per sample=%d\n", in cs35l33_pcm_hw_params()
522 snd_pcm_hw_constraint_list(substream->runtime, 0, in cs35l33_pcm_startup()
530 struct snd_soc_component *component = dai->component; in cs35l33_set_tristate()
534 regmap_update_bits(priv->regmap, CS35L33_PWRCTL2, in cs35l33_set_tristate()
536 regmap_update_bits(priv->regmap, CS35L33_CLK_CTL, in cs35l33_set_tristate()
539 regmap_update_bits(priv->regmap, CS35L33_PWRCTL2, in cs35l33_set_tristate()
541 regmap_update_bits(priv->regmap, CS35L33_CLK_CTL, in cs35l33_set_tristate()
551 struct snd_soc_component *component = dai->component; in cs35l33_set_tdm_slot()
558 return -EINVAL; in cs35l33_set_tdm_slot()
561 slot = ffs(rx_mask) - 1; in cs35l33_set_tdm_slot()
563 regmap_update_bits(priv->regmap, CS35L33_RX_AUD, in cs35l33_set_tdm_slot()
565 dev_dbg(component->dev, "Audio starts from slots %d", slot); in cs35l33_set_tdm_slot()
572 slot = ffs(tx_mask) - 1; in cs35l33_set_tdm_slot()
577 regmap_update_bits(priv->regmap, CS35L33_TX_VPMON + i, in cs35l33_set_tdm_slot()
582 /* disconnect {vp,vbst}_mon routes: eanble later if set in tx_mask*/ in cs35l33_set_tdm_slot()
589 regmap_update_bits(priv->regmap, CS35L33_TX_VMON, in cs35l33_set_tdm_slot()
591 dev_dbg(component->dev, "VMON enabled in slots %d-%d", in cs35l33_set_tdm_slot()
597 regmap_update_bits(priv->regmap, CS35L33_TX_IMON, in cs35l33_set_tdm_slot()
599 dev_dbg(component->dev, "IMON enabled in slots %d-%d", in cs35l33_set_tdm_slot()
605 regmap_update_bits(priv->regmap, CS35L33_TX_VPMON, in cs35l33_set_tdm_slot()
609 dev_dbg(component->dev, "VPMON enabled in slots %d", slot); in cs35l33_set_tdm_slot()
614 regmap_update_bits(priv->regmap, CS35L33_TX_VBSTMON, in cs35l33_set_tdm_slot()
618 dev_dbg(component->dev, in cs35l33_set_tdm_slot()
623 reg = CS35L33_TX_EN4 - (slot/8); in cs35l33_set_tdm_slot()
624 bit_pos = slot - ((slot / 8) * (8)); in cs35l33_set_tdm_slot()
625 regmap_update_bits(priv->regmap, reg, in cs35l33_set_tdm_slot()
629 slot = ffs(tx_mask) - 1; in cs35l33_set_tdm_slot()
645 regmap_update_bits(cs35l33->regmap, CS35L33_CLK_CTL, in cs35l33_component_set_sysclk()
647 cs35l33->mclk_int = freq; in cs35l33_component_set_sysclk()
652 regmap_update_bits(cs35l33->regmap, CS35L33_CLK_CTL, in cs35l33_component_set_sysclk()
654 cs35l33->mclk_int = freq/2; in cs35l33_component_set_sysclk()
657 cs35l33->mclk_int = 0; in cs35l33_component_set_sysclk()
658 return -EINVAL; in cs35l33_component_set_sysclk()
661 dev_dbg(component->dev, "external mclk freq=%d, internal mclk freq=%d\n", in cs35l33_component_set_sysclk()
662 freq, cs35l33->mclk_int); in cs35l33_component_set_sysclk()
676 .name = "cs35l33-dai",
699 struct cs35l33_hg *hg_config = &pdata->hg_config; in cs35l33_set_hg_data()
703 if (hg_config->enable_hg_algo) { in cs35l33_set_hg_data()
704 regmap_update_bits(priv->regmap, CS35L33_HG_MEMLDO_CTL, in cs35l33_set_hg_data()
706 hg_config->mem_depth << CS35L33_MEM_DEPTH_SHIFT); in cs35l33_set_hg_data()
707 regmap_write(priv->regmap, CS35L33_HG_REL_RATE, in cs35l33_set_hg_data()
708 hg_config->release_rate); in cs35l33_set_hg_data()
709 regmap_update_bits(priv->regmap, CS35L33_HG_HEAD, in cs35l33_set_hg_data()
711 hg_config->hd_rm << CS35L33_HD_RM_SHIFT); in cs35l33_set_hg_data()
712 regmap_update_bits(priv->regmap, CS35L33_HG_MEMLDO_CTL, in cs35l33_set_hg_data()
714 hg_config->ldo_thld << CS35L33_LDO_THLD_SHIFT); in cs35l33_set_hg_data()
715 regmap_update_bits(priv->regmap, CS35L33_HG_MEMLDO_CTL, in cs35l33_set_hg_data()
717 hg_config->ldo_path_disable << in cs35l33_set_hg_data()
719 regmap_update_bits(priv->regmap, CS35L33_LDO_DEL, in cs35l33_set_hg_data()
721 hg_config->ldo_entry_delay << in cs35l33_set_hg_data()
723 if (hg_config->vp_hg_auto) { in cs35l33_set_hg_data()
724 regmap_update_bits(priv->regmap, CS35L33_HG_EN, in cs35l33_set_hg_data()
730 regmap_update_bits(priv->regmap, CS35L33_HG_EN, in cs35l33_set_hg_data()
732 hg_config->vp_hg << CS35L33_VP_HG_SHIFT); in cs35l33_set_hg_data()
733 regmap_update_bits(priv->regmap, CS35L33_LDO_DEL, in cs35l33_set_hg_data()
735 hg_config->vp_hg_rate << CS35L33_VP_HG_RATE_SHIFT); in cs35l33_set_hg_data()
736 regmap_update_bits(priv->regmap, CS35L33_LDO_DEL, in cs35l33_set_hg_data()
738 hg_config->vp_hg_va << CS35L33_VP_HG_VA_SHIFT); in cs35l33_set_hg_data()
739 regmap_update_bits(priv->regmap, CS35L33_HG_EN, in cs35l33_set_hg_data()
752 dev_err(component->dev, "Invalid boost current %d\n", bst); in cs35l33_set_bst_ipk()
753 ret = -EINVAL; in cs35l33_set_bst_ipk()
758 dev_err(component->dev, "Current not a multiple of 15625uA (%d)\n", in cs35l33_set_bst_ipk()
760 ret = -EINVAL; in cs35l33_set_bst_ipk()
765 bst -= 15625; in cs35l33_set_bst_ipk()
769 regmap_write(cs35l33->regmap, CS35L33_BST_PEAK_CTL, in cs35l33_set_bst_ipk()
780 cs35l33->component = component; in cs35l33_probe()
781 pm_runtime_get_sync(component->dev); in cs35l33_probe()
783 regmap_update_bits(cs35l33->regmap, CS35L33_PROTECT_CTL, in cs35l33_probe()
785 regmap_update_bits(cs35l33->regmap, CS35L33_BST_CTL2, in cs35l33_probe()
790 regmap_update_bits(cs35l33->regmap, CS35L33_BST_CTL1, in cs35l33_probe()
791 CS35L33_BST_CTL_MASK, cs35l33->pdata.boost_ctl); in cs35l33_probe()
792 regmap_update_bits(cs35l33->regmap, CS35L33_CLASSD_CTL, in cs35l33_probe()
794 cs35l33->pdata.amp_drv_sel << CS35L33_AMP_DRV_SEL_SHIFT); in cs35l33_probe()
796 if (cs35l33->pdata.boost_ipk) in cs35l33_probe()
797 cs35l33_set_bst_ipk(component, cs35l33->pdata.boost_ipk); in cs35l33_probe()
799 if (cs35l33->enable_soft_ramp) { in cs35l33_probe()
803 CS35L33_DSR_RATE, cs35l33->pdata.ramp_rate); in cs35l33_probe()
810 if (cs35l33->pdata.imon_adc_scale != 0x8) in cs35l33_probe()
812 CS35L33_IMON_SCALE, cs35l33->pdata.imon_adc_scale); in cs35l33_probe()
814 cs35l33_set_hg_data(component, &(cs35l33->pdata)); in cs35l33_probe()
820 regmap_update_bits(cs35l33->regmap, CS35L33_INT_MASK_1, in cs35l33_probe()
824 pm_runtime_put_sync(component->dev); in cs35l33_probe()
865 gpiod_set_value_cansleep(cs35l33->reset_gpio, 0); in cs35l33_runtime_resume()
867 ret = regulator_bulk_enable(cs35l33->num_core_supplies, in cs35l33_runtime_resume()
868 cs35l33->core_supplies); in cs35l33_runtime_resume()
874 regcache_cache_only(cs35l33->regmap, false); in cs35l33_runtime_resume()
876 gpiod_set_value_cansleep(cs35l33->reset_gpio, 1); in cs35l33_runtime_resume()
880 ret = regcache_sync(cs35l33->regmap); in cs35l33_runtime_resume()
889 regcache_cache_only(cs35l33->regmap, true); in cs35l33_runtime_resume()
890 regulator_bulk_disable(cs35l33->num_core_supplies, in cs35l33_runtime_resume()
891 cs35l33->core_supplies); in cs35l33_runtime_resume()
903 cs35l33->amp_cal = false; in cs35l33_runtime_suspend()
905 regcache_cache_only(cs35l33->regmap, true); in cs35l33_runtime_suspend()
906 regcache_mark_dirty(cs35l33->regmap); in cs35l33_runtime_suspend()
907 regulator_bulk_disable(cs35l33->num_core_supplies, in cs35l33_runtime_suspend()
908 cs35l33->core_supplies); in cs35l33_runtime_suspend()
923 struct cs35l33_hg *hg_config = &pdata->hg_config; in cs35l33_get_hg_data()
926 hg = of_get_child_by_name(np, "cirrus,hg-algo"); in cs35l33_get_hg_data()
927 hg_config->enable_hg_algo = hg ? true : false; in cs35l33_get_hg_data()
929 if (hg_config->enable_hg_algo) { in cs35l33_get_hg_data()
930 if (of_property_read_u32(hg, "cirrus,mem-depth", &val32) >= 0) in cs35l33_get_hg_data()
931 hg_config->mem_depth = val32; in cs35l33_get_hg_data()
932 if (of_property_read_u32(hg, "cirrus,release-rate", in cs35l33_get_hg_data()
934 hg_config->release_rate = val32; in cs35l33_get_hg_data()
935 if (of_property_read_u32(hg, "cirrus,ldo-thld", &val32) >= 0) in cs35l33_get_hg_data()
936 hg_config->ldo_thld = val32; in cs35l33_get_hg_data()
937 if (of_property_read_u32(hg, "cirrus,ldo-path-disable", in cs35l33_get_hg_data()
939 hg_config->ldo_path_disable = val32; in cs35l33_get_hg_data()
940 if (of_property_read_u32(hg, "cirrus,ldo-entry-delay", in cs35l33_get_hg_data()
942 hg_config->ldo_entry_delay = val32; in cs35l33_get_hg_data()
944 hg_config->vp_hg_auto = of_property_read_bool(hg, in cs35l33_get_hg_data()
945 "cirrus,vp-hg-auto"); in cs35l33_get_hg_data()
947 if (of_property_read_u32(hg, "cirrus,vp-hg", &val32) >= 0) in cs35l33_get_hg_data()
948 hg_config->vp_hg = val32; in cs35l33_get_hg_data()
949 if (of_property_read_u32(hg, "cirrus,vp-hg-rate", &val32) >= 0) in cs35l33_get_hg_data()
950 hg_config->vp_hg_rate = val32; in cs35l33_get_hg_data()
951 if (of_property_read_u32(hg, "cirrus,vp-hg-va", &val32) >= 0) in cs35l33_get_hg_data()
952 hg_config->vp_hg_va = val32; in cs35l33_get_hg_data()
963 struct snd_soc_component *component = cs35l33->component; in cs35l33_irq_thread()
966 regmap_read(cs35l33->regmap, CS35L33_INT_STATUS_2, in cs35l33_irq_thread()
968 regmap_read(cs35l33->regmap, CS35L33_INT_STATUS_1, in cs35l33_irq_thread()
970 regmap_read(cs35l33->regmap, CS35L33_INT_MASK_2, &mask2); in cs35l33_irq_thread()
971 regmap_read(cs35l33->regmap, CS35L33_INT_MASK_1, &mask1); in cs35l33_irq_thread()
979 regmap_read(cs35l33->regmap, CS35L33_INT_STATUS_1, in cs35l33_irq_thread()
985 dev_crit(component->dev, "Amp short error\n"); in cs35l33_irq_thread()
987 dev_dbg(component->dev, in cs35l33_irq_thread()
989 regmap_update_bits(cs35l33->regmap, in cs35l33_irq_thread()
992 regmap_update_bits(cs35l33->regmap, in cs35l33_irq_thread()
996 regmap_update_bits(cs35l33->regmap, in cs35l33_irq_thread()
1003 dev_err(component->dev, "Cal error\n"); in cs35l33_irq_thread()
1006 cs35l33->amp_cal = false; in cs35l33_irq_thread()
1009 dev_dbg(component->dev, "Cal error release\n"); in cs35l33_irq_thread()
1010 regmap_update_bits(cs35l33->regmap, in cs35l33_irq_thread()
1013 regmap_update_bits(cs35l33->regmap, in cs35l33_irq_thread()
1016 regmap_update_bits(cs35l33->regmap, in cs35l33_irq_thread()
1023 dev_crit(component->dev, "Over temperature error\n"); in cs35l33_irq_thread()
1025 dev_dbg(component->dev, in cs35l33_irq_thread()
1027 regmap_update_bits(cs35l33->regmap, in cs35l33_irq_thread()
1029 regmap_update_bits(cs35l33->regmap, in cs35l33_irq_thread()
1032 regmap_update_bits(cs35l33->regmap, in cs35l33_irq_thread()
1038 dev_err(component->dev, "Over temperature warning\n"); in cs35l33_irq_thread()
1040 dev_dbg(component->dev, in cs35l33_irq_thread()
1042 regmap_update_bits(cs35l33->regmap, in cs35l33_irq_thread()
1044 regmap_update_bits(cs35l33->regmap, in cs35l33_irq_thread()
1047 regmap_update_bits(cs35l33->regmap, in cs35l33_irq_thread()
1052 dev_err(component->dev, "ERROR: ADSPCLK Interrupt\n"); in cs35l33_irq_thread()
1055 dev_err(component->dev, "ERROR: MCLK Interrupt\n"); in cs35l33_irq_thread()
1058 dev_err(component->dev, in cs35l33_irq_thread()
1062 dev_err(component->dev, in cs35l33_irq_thread()
1066 dev_err(component->dev, in cs35l33_irq_thread()
1074 "VP",
1080 struct device_node *np = dev->of_node; in cs35l33_of_get_pdata()
1081 struct cs35l33_pdata *pdata = &cs35l33->pdata; in cs35l33_of_get_pdata()
1087 if (of_property_read_u32(np, "cirrus,boost-ctl", &val32) >= 0) { in cs35l33_of_get_pdata()
1088 pdata->boost_ctl = val32; in cs35l33_of_get_pdata()
1089 pdata->amp_drv_sel = 1; in cs35l33_of_get_pdata()
1092 if (of_property_read_u32(np, "cirrus,ramp-rate", &val32) >= 0) { in cs35l33_of_get_pdata()
1093 pdata->ramp_rate = val32; in cs35l33_of_get_pdata()
1094 cs35l33->enable_soft_ramp = true; in cs35l33_of_get_pdata()
1097 if (of_property_read_u32(np, "cirrus,boost-ipk", &val32) >= 0) in cs35l33_of_get_pdata()
1098 pdata->boost_ipk = val32; in cs35l33_of_get_pdata()
1100 if (of_property_read_u32(np, "cirrus,imon-adc-scale", &val32) >= 0) { in cs35l33_of_get_pdata()
1102 pdata->imon_adc_scale = val32; in cs35l33_of_get_pdata()
1105 pdata->imon_adc_scale = 0x8; in cs35l33_of_get_pdata()
1108 pdata->imon_adc_scale = 0x8; in cs35l33_of_get_pdata()
1119 struct cs35l33_pdata *pdata = dev_get_platdata(&i2c_client->dev); in cs35l33_i2c_probe()
1123 cs35l33 = devm_kzalloc(&i2c_client->dev, sizeof(struct cs35l33_private), in cs35l33_i2c_probe()
1126 return -ENOMEM; in cs35l33_i2c_probe()
1129 cs35l33->regmap = devm_regmap_init_i2c(i2c_client, &cs35l33_regmap); in cs35l33_i2c_probe()
1130 if (IS_ERR(cs35l33->regmap)) { in cs35l33_i2c_probe()
1131 ret = PTR_ERR(cs35l33->regmap); in cs35l33_i2c_probe()
1132 dev_err(&i2c_client->dev, "regmap_init() failed: %d\n", ret); in cs35l33_i2c_probe()
1136 regcache_cache_only(cs35l33->regmap, true); in cs35l33_i2c_probe()
1139 cs35l33->core_supplies[i].supply in cs35l33_i2c_probe()
1141 cs35l33->num_core_supplies = ARRAY_SIZE(cs35l33_core_supplies); in cs35l33_i2c_probe()
1143 ret = devm_regulator_bulk_get(&i2c_client->dev, in cs35l33_i2c_probe()
1144 cs35l33->num_core_supplies, in cs35l33_i2c_probe()
1145 cs35l33->core_supplies); in cs35l33_i2c_probe()
1147 dev_err(&i2c_client->dev, in cs35l33_i2c_probe()
1154 cs35l33->pdata = *pdata; in cs35l33_i2c_probe()
1156 cs35l33_of_get_pdata(&i2c_client->dev, cs35l33); in cs35l33_i2c_probe()
1157 pdata = &cs35l33->pdata; in cs35l33_i2c_probe()
1160 ret = devm_request_threaded_irq(&i2c_client->dev, i2c_client->irq, NULL, in cs35l33_i2c_probe()
1164 dev_warn(&i2c_client->dev, "Failed to request IRQ: %d\n", ret); in cs35l33_i2c_probe()
1167 cs35l33->reset_gpio = devm_gpiod_get_optional(&i2c_client->dev, in cs35l33_i2c_probe()
1169 if (IS_ERR(cs35l33->reset_gpio)) { in cs35l33_i2c_probe()
1170 dev_err(&i2c_client->dev, "%s ERROR: Can't get reset GPIO\n", in cs35l33_i2c_probe()
1172 return PTR_ERR(cs35l33->reset_gpio); in cs35l33_i2c_probe()
1175 ret = regulator_bulk_enable(cs35l33->num_core_supplies, in cs35l33_i2c_probe()
1176 cs35l33->core_supplies); in cs35l33_i2c_probe()
1178 dev_err(&i2c_client->dev, in cs35l33_i2c_probe()
1184 gpiod_set_value_cansleep(cs35l33->reset_gpio, 1); in cs35l33_i2c_probe()
1187 regcache_cache_only(cs35l33->regmap, false); in cs35l33_i2c_probe()
1190 devid = cirrus_read_device_id(cs35l33->regmap, CS35L33_DEVID_AB); in cs35l33_i2c_probe()
1193 dev_err(&i2c_client->dev, "Failed to read device ID: %d\n", ret); in cs35l33_i2c_probe()
1198 dev_err(&i2c_client->dev, in cs35l33_i2c_probe()
1201 ret = -EINVAL; in cs35l33_i2c_probe()
1205 ret = regmap_read(cs35l33->regmap, CS35L33_REV_ID, &reg); in cs35l33_i2c_probe()
1207 dev_err(&i2c_client->dev, "Get Revision ID failed\n"); in cs35l33_i2c_probe()
1211 dev_info(&i2c_client->dev, in cs35l33_i2c_probe()
1214 ret = regmap_register_patch(cs35l33->regmap, in cs35l33_i2c_probe()
1217 dev_err(&i2c_client->dev, in cs35l33_i2c_probe()
1223 regmap_update_bits(cs35l33->regmap, CS35L33_CLK_CTL, in cs35l33_i2c_probe()
1227 pm_runtime_set_autosuspend_delay(&i2c_client->dev, 100); in cs35l33_i2c_probe()
1228 pm_runtime_use_autosuspend(&i2c_client->dev); in cs35l33_i2c_probe()
1229 pm_runtime_set_active(&i2c_client->dev); in cs35l33_i2c_probe()
1230 pm_runtime_enable(&i2c_client->dev); in cs35l33_i2c_probe()
1232 ret = devm_snd_soc_register_component(&i2c_client->dev, in cs35l33_i2c_probe()
1235 dev_err(&i2c_client->dev, "%s: Register component failed\n", in cs35l33_i2c_probe()
1243 gpiod_set_value_cansleep(cs35l33->reset_gpio, 0); in cs35l33_i2c_probe()
1245 regulator_bulk_disable(cs35l33->num_core_supplies, in cs35l33_i2c_probe()
1246 cs35l33->core_supplies); in cs35l33_i2c_probe()
1255 gpiod_set_value_cansleep(cs35l33->reset_gpio, 0); in cs35l33_i2c_remove()
1257 pm_runtime_disable(&client->dev); in cs35l33_i2c_remove()
1258 regulator_bulk_disable(cs35l33->num_core_supplies, in cs35l33_i2c_remove()
1259 cs35l33->core_supplies); in cs35l33_i2c_remove()