Lines Matching refs:cs35l45

46 static int cs35l45_set_cspl_mbox_cmd(struct cs35l45_private *cs35l45,  in cs35l45_set_cspl_mbox_cmd()  argument
53 if (!cs35l45->dsp.cs_dsp.running) { in cs35l45_set_cspl_mbox_cmd()
54 dev_err(cs35l45->dev, "DSP not running\n"); in cs35l45_set_cspl_mbox_cmd()
62 dev_err(cs35l45->dev, "Failed to write MBOX: %d\n", ret); in cs35l45_set_cspl_mbox_cmd()
72 dev_err(cs35l45->dev, "Failed to read MBOX STS: %d\n", ret); in cs35l45_set_cspl_mbox_cmd()
77 dev_dbg(cs35l45->dev, "[%u] cmd %u returned invalid sts %u", i, cmd, sts); in cs35l45_set_cspl_mbox_cmd()
83 dev_err(cs35l45->dev, "Failed to set mailbox cmd %u (status %u)\n", cmd, sts); in cs35l45_set_cspl_mbox_cmd()
92 struct cs35l45_private *cs35l45 = snd_soc_component_get_drvdata(component); in cs35l45_global_en_ev() local
94 dev_dbg(cs35l45->dev, "%s event : %x\n", __func__, event); in cs35l45_global_en_ev()
98 regmap_write(cs35l45->regmap, CS35L45_GLOBAL_ENABLES, in cs35l45_global_en_ev()
106 regmap_write(cs35l45->regmap, CS35L45_GLOBAL_ENABLES, 0); in cs35l45_global_en_ev()
119 struct cs35l45_private *cs35l45 = snd_soc_component_get_drvdata(component); in cs35l45_dsp_preload_ev() local
124 if (cs35l45->dsp.cs_dsp.booted) in cs35l45_dsp_preload_ev()
129 if (cs35l45->dsp.cs_dsp.running) in cs35l45_dsp_preload_ev()
132 regmap_set_bits(cs35l45->regmap, CS35L45_PWRMGT_CTL, in cs35l45_dsp_preload_ev()
137 if (cs35l45->dsp.preloaded) in cs35l45_dsp_preload_ev()
140 if (cs35l45->dsp.cs_dsp.running) { in cs35l45_dsp_preload_ev()
156 struct cs35l45_private *cs35l45 = snd_soc_component_get_drvdata(component); in cs35l45_dsp_audio_ev() local
160 return cs35l45_set_cspl_mbox_cmd(cs35l45, cs35l45->regmap, in cs35l45_dsp_audio_ev()
163 return cs35l45_set_cspl_mbox_cmd(cs35l45, cs35l45->regmap, in cs35l45_dsp_audio_ev()
203 struct cs35l45_private *cs35l45 = in cs35l45_amplifier_mode_get() local
206 ucontrol->value.integer.value[0] = cs35l45->amplifier_mode; in cs35l45_amplifier_mode_get()
216 struct cs35l45_private *cs35l45 = in cs35l45_amplifier_mode_put() local
223 if ((ucontrol->value.integer.value[0] == cs35l45->amplifier_mode) || in cs35l45_amplifier_mode_put()
229 ret = regmap_read(cs35l45->regmap, CS35L45_BLOCK_ENABLES, &amp_state); in cs35l45_amplifier_mode_put()
231 dev_err(cs35l45->dev, "Failed to read AMP state: %d\n", ret); in cs35l45_amplifier_mode_put()
236 regmap_clear_bits(cs35l45->regmap, CS35L45_BLOCK_ENABLES, in cs35l45_amplifier_mode_put()
242 regmap_clear_bits(cs35l45->regmap, CS35L45_BLOCK_ENABLES, in cs35l45_amplifier_mode_put()
245 regmap_update_bits(cs35l45->regmap, CS35L45_BLOCK_ENABLES, in cs35l45_amplifier_mode_put()
249 regmap_update_bits(cs35l45->regmap, CS35L45_HVLV_CONFIG, in cs35l45_amplifier_mode_put()
256 dev_err(cs35l45->dev, in cs35l45_amplifier_mode_put()
260 regmap_set_bits(cs35l45->regmap, CS35L45_BLOCK_ENABLES, in cs35l45_amplifier_mode_put()
263 regmap_update_bits(cs35l45->regmap, CS35L45_BLOCK_ENABLES, in cs35l45_amplifier_mode_put()
268 regmap_update_bits(cs35l45->regmap, CS35L45_HVLV_CONFIG, in cs35l45_amplifier_mode_put()
273 regmap_clear_bits(cs35l45->regmap, in cs35l45_amplifier_mode_put()
277 regmap_update_bits(cs35l45->regmap, CS35L45_AMP_GAIN, in cs35l45_amplifier_mode_put()
284 dev_err(cs35l45->dev, in cs35l45_amplifier_mode_put()
289 regmap_set_bits(cs35l45->regmap, CS35L45_BLOCK_ENABLES, in cs35l45_amplifier_mode_put()
296 cs35l45->amplifier_mode = ucontrol->value.integer.value[0]; in cs35l45_amplifier_mode_put()
614 static int cs35l45_set_pll(struct cs35l45_private *cs35l45, unsigned int freq) in cs35l45_set_pll() argument
621 dev_err(cs35l45->dev, "Invalid freq: %u\n", freq); in cs35l45_set_pll()
625 regmap_read(cs35l45->regmap, CS35L45_REFCLK_INPUT, &val); in cs35l45_set_pll()
630 regmap_set_bits(cs35l45->regmap, CS35L45_REFCLK_INPUT, CS35L45_PLL_OPEN_LOOP_MASK); in cs35l45_set_pll()
631 regmap_update_bits(cs35l45->regmap, CS35L45_REFCLK_INPUT, in cs35l45_set_pll()
634 regmap_clear_bits(cs35l45->regmap, CS35L45_REFCLK_INPUT, CS35L45_PLL_REFCLK_EN_MASK); in cs35l45_set_pll()
635 regmap_clear_bits(cs35l45->regmap, CS35L45_REFCLK_INPUT, CS35L45_PLL_OPEN_LOOP_MASK); in cs35l45_set_pll()
636 regmap_set_bits(cs35l45->regmap, CS35L45_REFCLK_INPUT, CS35L45_PLL_REFCLK_EN_MASK); in cs35l45_set_pll()
643 struct cs35l45_private *cs35l45 = snd_soc_component_get_drvdata(codec_dai->component); in cs35l45_asp_set_fmt() local
650 dev_err(cs35l45->dev, "Invalid DAI clocking\n"); in cs35l45_asp_set_fmt()
662 dev_err(cs35l45->dev, "Invalid DAI format\n"); in cs35l45_asp_set_fmt()
684 dev_warn(cs35l45->dev, "Invalid DAI clock polarity\n"); in cs35l45_asp_set_fmt()
688 regmap_update_bits(cs35l45->regmap, CS35L45_ASP_CONTROL2, in cs35l45_asp_set_fmt()
703 struct cs35l45_private *cs35l45 = snd_soc_component_get_drvdata(dai->component); in cs35l45_asp_hw_params() local
721 dev_warn(cs35l45->dev, "Unsupported sample rate (%d)\n", in cs35l45_asp_hw_params()
726 regmap_update_bits(cs35l45->regmap, CS35L45_GLOBAL_SAMPLE_RATE, in cs35l45_asp_hw_params()
732 if (cs35l45->slot_width) in cs35l45_asp_hw_params()
733 asp_width = cs35l45->slot_width; in cs35l45_asp_hw_params()
738 regmap_update_bits(cs35l45->regmap, CS35L45_ASP_CONTROL2, in cs35l45_asp_hw_params()
742 regmap_update_bits(cs35l45->regmap, CS35L45_ASP_DATA_CONTROL5, in cs35l45_asp_hw_params()
746 regmap_update_bits(cs35l45->regmap, CS35L45_ASP_CONTROL2, in cs35l45_asp_hw_params()
750 regmap_update_bits(cs35l45->regmap, CS35L45_ASP_DATA_CONTROL1, in cs35l45_asp_hw_params()
755 if (cs35l45->sysclk_set) in cs35l45_asp_hw_params()
759 regmap_read(cs35l45->regmap, CS35L45_ASP_CONTROL2, &asp_fmt); in cs35l45_asp_hw_params()
767 cs35l45->slot_count, slot_multiple); in cs35l45_asp_hw_params()
769 return cs35l45_set_pll(cs35l45, bclk); in cs35l45_asp_hw_params()
776 struct cs35l45_private *cs35l45 = snd_soc_component_get_drvdata(dai->component); in cs35l45_asp_set_tdm_slot() local
781 cs35l45->slot_width = slot_width; in cs35l45_asp_set_tdm_slot()
782 cs35l45->slot_count = slots; in cs35l45_asp_set_tdm_slot()
790 struct cs35l45_private *cs35l45 = snd_soc_component_get_drvdata(dai->component); in cs35l45_asp_set_sysclk() local
794 dev_err(cs35l45->dev, "Invalid clk_id %d\n", clk_id); in cs35l45_asp_set_sysclk()
798 cs35l45->sysclk_set = false; in cs35l45_asp_set_sysclk()
802 ret = cs35l45_set_pll(cs35l45, freq); in cs35l45_asp_set_sysclk()
806 cs35l45->sysclk_set = true; in cs35l45_asp_set_sysclk()
813 struct cs35l45_private *cs35l45 = snd_soc_component_get_drvdata(dai->component); in cs35l45_mute_stream() local
819 regmap_read(cs35l45->regmap, CS35L45_GLOBAL_SAMPLE_RATE, &global_fs); in cs35l45_mute_stream()
833 regmap_read(cs35l45->regmap, CS35L45_AMP_PCM_HPF_TST, &val); in cs35l45_mute_stream()
844 regmap_multi_reg_write(cs35l45->regmap, hpf_override_seq, in cs35l45_mute_stream()
884 struct cs35l45_private *cs35l45 = snd_soc_component_get_drvdata(component); in cs35l45_component_probe() local
886 return wm_adsp2_component_probe(&cs35l45->dsp, component); in cs35l45_component_probe()
891 struct cs35l45_private *cs35l45 = snd_soc_component_get_drvdata(component); in cs35l45_component_remove() local
893 wm_adsp2_component_remove(&cs35l45->dsp, component); in cs35l45_component_remove()
914 static void cs35l45_setup_hibernate(struct cs35l45_private *cs35l45) in cs35l45_setup_hibernate() argument
918 if (cs35l45->bus_type == CONTROL_BUS_I2C) in cs35l45_setup_hibernate()
923 regmap_update_bits(cs35l45->regmap, CS35L45_WAKESRC_CTL, in cs35l45_setup_hibernate()
927 regmap_set_bits(cs35l45->regmap, CS35L45_WAKESRC_CTL, in cs35l45_setup_hibernate()
930 regmap_update_bits(cs35l45->regmap, CS35L45_WKI2C_CTL, in cs35l45_setup_hibernate()
931 CS35L45_WKI2C_ADDR_MASK, cs35l45->i2c_addr); in cs35l45_setup_hibernate()
933 regmap_set_bits(cs35l45->regmap, CS35L45_WKI2C_CTL, in cs35l45_setup_hibernate()
937 static int cs35l45_enter_hibernate(struct cs35l45_private *cs35l45) in cs35l45_enter_hibernate() argument
939 dev_dbg(cs35l45->dev, "Enter hibernate\n"); in cs35l45_enter_hibernate()
941 cs35l45_setup_hibernate(cs35l45); in cs35l45_enter_hibernate()
943 regmap_set_bits(cs35l45->regmap, CS35L45_IRQ1_MASK_2, CS35L45_DSP_VIRT2_MBOX_MASK); in cs35l45_enter_hibernate()
946 regmap_write(cs35l45->regmap, CS35L45_DSP_VIRT1_MBOX_1, CSPL_MBOX_CMD_HIBERNATE); in cs35l45_enter_hibernate()
951 static int cs35l45_exit_hibernate(struct cs35l45_private *cs35l45) in cs35l45_exit_hibernate() argument
958 dev_dbg(cs35l45->dev, "Exit hibernate\n"); in cs35l45_exit_hibernate()
961 ret = cs35l45_set_cspl_mbox_cmd(cs35l45, cs35l45->regmap, in cs35l45_exit_hibernate()
964 dev_dbg(cs35l45->dev, "Wake success at cycle: %d\n", j); in cs35l45_exit_hibernate()
965 regmap_clear_bits(cs35l45->regmap, CS35L45_IRQ1_MASK_2, in cs35l45_exit_hibernate()
972 dev_err(cs35l45->dev, "Wake failed, re-enter hibernate: %d\n", ret); in cs35l45_exit_hibernate()
974 cs35l45_setup_hibernate(cs35l45); in cs35l45_exit_hibernate()
977 dev_err(cs35l45->dev, "Timed out waking device\n"); in cs35l45_exit_hibernate()
984 struct cs35l45_private *cs35l45 = dev_get_drvdata(dev); in cs35l45_runtime_suspend() local
986 if (!cs35l45->dsp.preloaded || !cs35l45->dsp.cs_dsp.running) in cs35l45_runtime_suspend()
989 cs35l45_enter_hibernate(cs35l45); in cs35l45_runtime_suspend()
991 regcache_cache_only(cs35l45->regmap, true); in cs35l45_runtime_suspend()
992 regcache_mark_dirty(cs35l45->regmap); in cs35l45_runtime_suspend()
994 dev_dbg(cs35l45->dev, "Runtime suspended\n"); in cs35l45_runtime_suspend()
1001 struct cs35l45_private *cs35l45 = dev_get_drvdata(dev); in cs35l45_runtime_resume() local
1004 if (!cs35l45->dsp.preloaded || !cs35l45->dsp.cs_dsp.running) in cs35l45_runtime_resume()
1007 dev_dbg(cs35l45->dev, "Runtime resume\n"); in cs35l45_runtime_resume()
1009 regcache_cache_only(cs35l45->regmap, false); in cs35l45_runtime_resume()
1011 ret = cs35l45_exit_hibernate(cs35l45); in cs35l45_runtime_resume()
1015 ret = regcache_sync(cs35l45->regmap); in cs35l45_runtime_resume()
1017 dev_warn(cs35l45->dev, "regcache_sync failed: %d\n", ret); in cs35l45_runtime_resume()
1020 regmap_clear_bits(cs35l45->regmap, CS35L45_ERROR_RELEASE, CS35L45_GLOBAL_ERR_RLS_MASK); in cs35l45_runtime_resume()
1021 regmap_set_bits(cs35l45->regmap, CS35L45_ERROR_RELEASE, CS35L45_GLOBAL_ERR_RLS_MASK); in cs35l45_runtime_resume()
1022 regmap_clear_bits(cs35l45->regmap, CS35L45_ERROR_RELEASE, CS35L45_GLOBAL_ERR_RLS_MASK); in cs35l45_runtime_resume()
1028 struct cs35l45_private *cs35l45 = dev_get_drvdata(dev); in cs35l45_sys_suspend() local
1030 dev_dbg(cs35l45->dev, "System suspend, disabling IRQ\n"); in cs35l45_sys_suspend()
1031 disable_irq(cs35l45->irq); in cs35l45_sys_suspend()
1038 struct cs35l45_private *cs35l45 = dev_get_drvdata(dev); in cs35l45_sys_suspend_noirq() local
1040 dev_dbg(cs35l45->dev, "Late system suspend, reenabling IRQ\n"); in cs35l45_sys_suspend_noirq()
1041 enable_irq(cs35l45->irq); in cs35l45_sys_suspend_noirq()
1048 struct cs35l45_private *cs35l45 = dev_get_drvdata(dev); in cs35l45_sys_resume_noirq() local
1050 dev_dbg(cs35l45->dev, "Early system resume, disabling IRQ\n"); in cs35l45_sys_resume_noirq()
1051 disable_irq(cs35l45->irq); in cs35l45_sys_resume_noirq()
1058 struct cs35l45_private *cs35l45 = dev_get_drvdata(dev); in cs35l45_sys_resume() local
1060 dev_dbg(cs35l45->dev, "System resume, reenabling IRQ\n"); in cs35l45_sys_resume()
1061 enable_irq(cs35l45->irq); in cs35l45_sys_resume()
1066 static int cs35l45_apply_property_config(struct cs35l45_private *cs35l45) in cs35l45_apply_property_config() argument
1068 struct device_node *node = cs35l45->dev->of_node; in cs35l45_apply_property_config()
1089 regmap_update_bits(cs35l45->regmap, gpio_regs[i], in cs35l45_apply_property_config()
1095 regmap_update_bits(cs35l45->regmap, gpio_regs[i], in cs35l45_apply_property_config()
1101 regmap_update_bits(cs35l45->regmap, gpio_regs[i], in cs35l45_apply_property_config()
1107 regmap_update_bits(cs35l45->regmap, gpio_regs[i], in cs35l45_apply_property_config()
1113 regmap_update_bits(cs35l45->regmap, pad_regs[i], in cs35l45_apply_property_config()
1119 regmap_update_bits(cs35l45->regmap, pad_regs[i], in cs35l45_apply_property_config()
1123 cs35l45->irq_invert = val; in cs35l45_apply_property_config()
1129 if (device_property_read_u32(cs35l45->dev, in cs35l45_apply_property_config()
1131 regmap_update_bits(cs35l45->regmap, CS35L45_ASP_CONTROL3, in cs35l45_apply_property_config()
1139 static int cs35l45_dsp_virt2_mbox3_irq_handle(struct cs35l45_private *cs35l45, in cs35l45_dsp_virt2_mbox3_irq_handle() argument
1159 dev_info(cs35l45->dev, "MBOX event (SPEAKER_STATUS): %s\n", in cs35l45_dsp_virt2_mbox3_irq_handle()
1163 dev_dbg(cs35l45->dev, "MBOX event (BOOT_DONE)\n"); in cs35l45_dsp_virt2_mbox3_irq_handle()
1166 dev_err(cs35l45->dev, "MBOX event not supported %u\n", cmd); in cs35l45_dsp_virt2_mbox3_irq_handle()
1175 struct cs35l45_private *cs35l45 = data; in cs35l45_dsp_virt2_mbox_cb() local
1179 ret = regmap_read(cs35l45->regmap, CS35L45_DSP_VIRT2_MBOX_3, &mbox_val); in cs35l45_dsp_virt2_mbox_cb()
1181 cs35l45_dsp_virt2_mbox3_irq_handle(cs35l45, mbox_val & CS35L45_MBOX3_CMD_MASK, in cs35l45_dsp_virt2_mbox_cb()
1185 ret = regmap_read(cs35l45->regmap, CS35L45_DSP_VIRT2_MBOX_4, &mbox_val); in cs35l45_dsp_virt2_mbox_cb()
1187 dev_err(cs35l45->dev, "Spurious DSP MBOX4 IRQ\n"); in cs35l45_dsp_virt2_mbox_cb()
1195 struct cs35l45_private *cs35l45 = data; in cs35l45_pll_unlock() local
1197 dev_dbg(cs35l45->dev, "PLL unlock detected!"); in cs35l45_pll_unlock()
1204 struct cs35l45_private *cs35l45 = data; in cs35l45_pll_lock() local
1206 dev_dbg(cs35l45->dev, "PLL lock detected!"); in cs35l45_pll_lock()
1230 struct cs35l45_private *cs35l45 = data; in cs35l45_spk_safe_err() local
1233 i = irq - regmap_irq_get_virq(cs35l45->irq_data, 0); in cs35l45_spk_safe_err()
1236 dev_err(cs35l45->dev, "Unspecified global error condition (%d) detected!\n", irq); in cs35l45_spk_safe_err()
1238 dev_err(cs35l45->dev, "%s condition detected!\n", cs35l45_irqs[i].name); in cs35l45_spk_safe_err()
1270 static int cs35l45_initialize(struct cs35l45_private *cs35l45) in cs35l45_initialize() argument
1272 struct device *dev = cs35l45->dev; in cs35l45_initialize()
1277 ret = regmap_read_poll_timeout(cs35l45->regmap, CS35L45_IRQ1_EINT_4, sts, in cs35l45_initialize()
1281 dev_err(cs35l45->dev, "Timeout waiting for OTP boot\n"); in cs35l45_initialize()
1285 ret = regmap_bulk_read(cs35l45->regmap, CS35L45_DEVID, dev_id, ARRAY_SIZE(dev_id)); in cs35l45_initialize()
1287 dev_err(cs35l45->dev, "Get Device ID failed: %d\n", ret); in cs35l45_initialize()
1296 dev_err(cs35l45->dev, "Bad DEVID 0x%x\n", dev_id[0]); in cs35l45_initialize()
1300 dev_info(cs35l45->dev, "Cirrus Logic CS35L45: REVID %02X OTPID %02X\n", in cs35l45_initialize()
1303 regmap_write(cs35l45->regmap, CS35L45_IRQ1_EINT_4, in cs35l45_initialize()
1306 ret = cs35l45_apply_patch(cs35l45); in cs35l45_initialize()
1312 ret = cs35l45_apply_property_config(cs35l45); in cs35l45_initialize()
1316 cs35l45->amplifier_mode = AMP_MODE_SPK; in cs35l45_initialize()
1348 static int cs35l45_dsp_init(struct cs35l45_private *cs35l45) in cs35l45_dsp_init() argument
1350 struct wm_adsp *dsp = &cs35l45->dsp; in cs35l45_dsp_init()
1359 dsp->cs_dsp.dev = cs35l45->dev; in cs35l45_dsp_init()
1360 dsp->cs_dsp.regmap = cs35l45->regmap; in cs35l45_dsp_init()
1369 regmap_multi_reg_write(cs35l45->regmap, cs35l45_fs_errata_patch, in cs35l45_dsp_init()
1375 int cs35l45_probe(struct cs35l45_private *cs35l45) in cs35l45_probe() argument
1377 struct device *dev = cs35l45->dev; in cs35l45_probe()
1381 cs35l45->vdd_batt = devm_regulator_get(dev, "vdd-batt"); in cs35l45_probe()
1382 if (IS_ERR(cs35l45->vdd_batt)) in cs35l45_probe()
1383 return dev_err_probe(dev, PTR_ERR(cs35l45->vdd_batt), in cs35l45_probe()
1386 cs35l45->vdd_a = devm_regulator_get(dev, "vdd-a"); in cs35l45_probe()
1387 if (IS_ERR(cs35l45->vdd_a)) in cs35l45_probe()
1388 return dev_err_probe(dev, PTR_ERR(cs35l45->vdd_a), in cs35l45_probe()
1392 ret = regulator_enable(cs35l45->vdd_batt); in cs35l45_probe()
1396 ret = regulator_enable(cs35l45->vdd_a); in cs35l45_probe()
1401 cs35l45->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW); in cs35l45_probe()
1402 if (IS_ERR(cs35l45->reset_gpio)) { in cs35l45_probe()
1403 ret = PTR_ERR(cs35l45->reset_gpio); in cs35l45_probe()
1404 cs35l45->reset_gpio = NULL; in cs35l45_probe()
1413 if (cs35l45->reset_gpio) { in cs35l45_probe()
1415 gpiod_set_value_cansleep(cs35l45->reset_gpio, 1); in cs35l45_probe()
1420 ret = cs35l45_initialize(cs35l45); in cs35l45_probe()
1424 ret = cs35l45_dsp_init(cs35l45); in cs35l45_probe()
1428 pm_runtime_set_autosuspend_delay(cs35l45->dev, 3000); in cs35l45_probe()
1429 pm_runtime_use_autosuspend(cs35l45->dev); in cs35l45_probe()
1430 pm_runtime_mark_last_busy(cs35l45->dev); in cs35l45_probe()
1431 pm_runtime_set_active(cs35l45->dev); in cs35l45_probe()
1432 pm_runtime_get_noresume(cs35l45->dev); in cs35l45_probe()
1433 pm_runtime_enable(cs35l45->dev); in cs35l45_probe()
1435 if (cs35l45->irq) { in cs35l45_probe()
1436 if (cs35l45->irq_invert) in cs35l45_probe()
1441 ret = devm_regmap_add_irq_chip(dev, cs35l45->regmap, cs35l45->irq, irq_pol, 0, in cs35l45_probe()
1442 &cs35l45_regmap_irq_chip, &cs35l45->irq_data); in cs35l45_probe()
1449 irq = regmap_irq_get_virq(cs35l45->irq_data, cs35l45_irqs[i].irq); in cs35l45_probe()
1457 irq_pol, cs35l45_irqs[i].name, cs35l45); in cs35l45_probe()
1472 pm_runtime_put_autosuspend(cs35l45->dev); in cs35l45_probe()
1477 pm_runtime_disable(cs35l45->dev); in cs35l45_probe()
1478 pm_runtime_put_noidle(cs35l45->dev); in cs35l45_probe()
1479 wm_adsp2_remove(&cs35l45->dsp); in cs35l45_probe()
1482 gpiod_set_value_cansleep(cs35l45->reset_gpio, 0); in cs35l45_probe()
1484 regulator_disable(cs35l45->vdd_a); in cs35l45_probe()
1485 regulator_disable(cs35l45->vdd_batt); in cs35l45_probe()
1491 void cs35l45_remove(struct cs35l45_private *cs35l45) in cs35l45_remove() argument
1493 pm_runtime_get_sync(cs35l45->dev); in cs35l45_remove()
1494 pm_runtime_disable(cs35l45->dev); in cs35l45_remove()
1495 wm_adsp2_remove(&cs35l45->dsp); in cs35l45_remove()
1497 gpiod_set_value_cansleep(cs35l45->reset_gpio, 0); in cs35l45_remove()
1499 pm_runtime_put_noidle(cs35l45->dev); in cs35l45_remove()
1500 regulator_disable(cs35l45->vdd_a); in cs35l45_remove()
1502 regulator_disable(cs35l45->vdd_batt); in cs35l45_remove()