• Home
  • Raw
  • Download

Lines Matching +full:auto +full:- +full:detect

1 // SPDX-License-Identifier: GPL-2.0-only
3 * cs42l42.c -- CS42L42 ALSA SoC audio driver
32 #include <sound/soc-dapm.h>
35 #include <dt-bindings/sound/cs42l42.h>
406 static DECLARE_TLV_DB_SCALE(adc_tlv, -9700, 100, true);
407 static DECLARE_TLV_DB_SCALE(mixer_tlv, -6300, 100, true);
436 SOC_SINGLE_S8_TLV("ADC Volume", CS42L42_ADC_VOLUME, -97, 12, adc_tlv),
459 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in cs42l42_hpdrv_evt()
485 dev_err(component->dev, "Invalid event 0x%x\n", event); in cs42l42_hpdrv_evt()
519 regcache_cache_only(cs42l42->regmap, false); in cs42l42_set_bias_level()
520 regcache_sync(cs42l42->regmap); in cs42l42_set_bias_level()
522 ARRAY_SIZE(cs42l42->supplies), in cs42l42_set_bias_level()
523 cs42l42->supplies); in cs42l42_set_bias_level()
525 dev_err(component->dev, in cs42l42_set_bias_level()
534 regcache_cache_only(cs42l42->regmap, true); in cs42l42_set_bias_level()
535 regulator_bulk_disable(ARRAY_SIZE(cs42l42->supplies), in cs42l42_set_bias_level()
536 cs42l42->supplies); in cs42l42_set_bias_level()
548 cs42l42->component = component; in cs42l42_component_probe()
582 * Table 4-5 from the Datasheet
609 if (pll_ratio_table[i].sclk == cs42l42->sclk) { in cs42l42_pll_config()
629 fsync = cs42l42->sclk / cs42l42->srate; in cs42l42_pll_config()
630 if (((fsync * cs42l42->srate) != cs42l42->sclk) in cs42l42_pll_config()
632 dev_err(component->dev, in cs42l42_pll_config()
634 cs42l42->sclk, in cs42l42_pll_config()
635 cs42l42->srate); in cs42l42_pll_config()
636 return -EINVAL; in cs42l42_pll_config()
642 CS42L42_FRAC0_VAL(fsync - 1) << in cs42l42_pll_config()
647 CS42L42_FRAC1_VAL(fsync - 1) << in cs42l42_pll_config()
654 CS42L42_FRAC0_VAL(fsync - 1) << in cs42l42_pll_config()
659 CS42L42_FRAC1_VAL(fsync - 1) << in cs42l42_pll_config()
683 /* Configure PLL per table 4-5 */ in cs42l42_pll_config()
732 return -EINVAL; in cs42l42_pll_config()
737 struct snd_soc_component *component = codec_dai->component; in cs42l42_set_dai_fmt()
750 return -EINVAL; in cs42l42_set_dai_fmt()
770 return -EINVAL; in cs42l42_set_dai_fmt()
801 struct snd_soc_component *component = dai->component; in cs42l42_pcm_hw_params()
803 unsigned int width = (params_width(params) / 8) - 1; in cs42l42_pcm_hw_params()
806 cs42l42->srate = params_rate(params); in cs42l42_pcm_hw_params()
808 switch(substream->stream) { in cs42l42_pcm_hw_params()
831 struct snd_soc_component *component = dai->component; in cs42l42_set_sysclk()
834 cs42l42->sclk = freq; in cs42l42_set_sysclk()
841 struct snd_soc_component *component = dai->component; in cs42l42_mute()
875 /* Un-mute the headphone, set the full scale volume flag */ in cs42l42_mute()
927 /* Mask the auto detect interrupt */ in cs42l42_process_hs_type_detect()
928 regmap_update_bits(cs42l42->regmap, in cs42l42_process_hs_type_detect()
935 /* Set hs detect to automatic, disabled mode */ in cs42l42_process_hs_type_detect()
936 regmap_update_bits(cs42l42->regmap, in cs42l42_process_hs_type_detect()
948 regmap_read(cs42l42->regmap, CS42L42_HS_DET_STATUS, &hs_det_status); in cs42l42_process_hs_type_detect()
950 cs42l42->hs_type = (hs_det_status & CS42L42_HSDET_TYPE_MASK) >> in cs42l42_process_hs_type_detect()
954 if ((cs42l42->hs_type == CS42L42_PLUG_CTIA) || in cs42l42_process_hs_type_detect()
955 (cs42l42->hs_type == CS42L42_PLUG_OMTP)) { in cs42l42_process_hs_type_detect()
956 /* Set auto HS bias settings to default */ in cs42l42_process_hs_type_detect()
957 regmap_update_bits(cs42l42->regmap, in cs42l42_process_hs_type_detect()
968 /* Set up hs detect level sensitivity */ in cs42l42_process_hs_type_detect()
969 regmap_update_bits(cs42l42->regmap, in cs42l42_process_hs_type_detect()
976 (cs42l42->bias_thresholds[0] << in cs42l42_process_hs_type_detect()
979 /* Set auto HS bias settings to default */ in cs42l42_process_hs_type_detect()
980 regmap_update_bits(cs42l42->regmap, in cs42l42_process_hs_type_detect()
991 /* Turn on level detect circuitry */ in cs42l42_process_hs_type_detect()
992 regmap_update_bits(cs42l42->regmap, in cs42l42_process_hs_type_detect()
1001 msleep(cs42l42->btn_det_init_dbnce); in cs42l42_process_hs_type_detect()
1004 regmap_read(cs42l42->regmap, CS42L42_DET_INT_STATUS2, in cs42l42_process_hs_type_detect()
1007 /* Unmask button detect interrupts */ in cs42l42_process_hs_type_detect()
1008 regmap_update_bits(cs42l42->regmap, in cs42l42_process_hs_type_detect()
1021 /* Make sure button detect and HS bias circuits are off */ in cs42l42_process_hs_type_detect()
1022 regmap_update_bits(cs42l42->regmap, in cs42l42_process_hs_type_detect()
1032 regmap_update_bits(cs42l42->regmap, in cs42l42_process_hs_type_detect()
1046 regmap_update_bits(cs42l42->regmap, in cs42l42_process_hs_type_detect()
1061 regmap_update_bits(cs42l42->regmap, in cs42l42_init_hs_type_detect()
1072 /* Make sure button detect and HS bias circuits are off */ in cs42l42_init_hs_type_detect()
1073 regmap_update_bits(cs42l42->regmap, in cs42l42_init_hs_type_detect()
1082 /* Set auto HS bias settings to default */ in cs42l42_init_hs_type_detect()
1083 regmap_update_bits(cs42l42->regmap, in cs42l42_init_hs_type_detect()
1094 /* Set hs detect to manual, disabled mode */ in cs42l42_init_hs_type_detect()
1095 regmap_update_bits(cs42l42->regmap, in cs42l42_init_hs_type_detect()
1106 regmap_update_bits(cs42l42->regmap, in cs42l42_init_hs_type_detect()
1120 regmap_update_bits(cs42l42->regmap, in cs42l42_init_hs_type_detect()
1130 msleep(cs42l42->hs_bias_ramp_time); in cs42l42_init_hs_type_detect()
1132 /* Unmask auto detect interrupt */ in cs42l42_init_hs_type_detect()
1133 regmap_update_bits(cs42l42->regmap, in cs42l42_init_hs_type_detect()
1140 /* Set hs detect to automatic, enabled mode */ in cs42l42_init_hs_type_detect()
1141 regmap_update_bits(cs42l42->regmap, in cs42l42_init_hs_type_detect()
1155 /* Mask button detect interrupts */ in cs42l42_cancel_hs_type_detect()
1156 regmap_update_bits(cs42l42->regmap, in cs42l42_cancel_hs_type_detect()
1170 regmap_update_bits(cs42l42->regmap, in cs42l42_cancel_hs_type_detect()
1179 /* Set auto HS bias settings to default */ in cs42l42_cancel_hs_type_detect()
1180 regmap_update_bits(cs42l42->regmap, in cs42l42_cancel_hs_type_detect()
1191 /* Set hs detect to manual, disabled mode */ in cs42l42_cancel_hs_type_detect()
1192 regmap_update_bits(cs42l42->regmap, in cs42l42_cancel_hs_type_detect()
1209 /* Mask button detect interrupts */ in cs42l42_handle_button_press()
1210 regmap_update_bits(cs42l42->regmap, in cs42l42_handle_button_press()
1223 usleep_range(cs42l42->btn_det_event_dbnce * 1000, in cs42l42_handle_button_press()
1224 cs42l42->btn_det_event_dbnce * 2000); in cs42l42_handle_button_press()
1226 /* Test all 4 level detect biases */ in cs42l42_handle_button_press()
1229 /* Adjust button detect level sensitivity */ in cs42l42_handle_button_press()
1230 regmap_update_bits(cs42l42->regmap, in cs42l42_handle_button_press()
1237 (cs42l42->bias_thresholds[bias_level] << in cs42l42_handle_button_press()
1240 regmap_read(cs42l42->regmap, CS42L42_DET_STATUS2, in cs42l42_handle_button_press()
1247 dev_dbg(cs42l42->component->dev, "Function C button press\n"); in cs42l42_handle_button_press()
1250 dev_dbg(cs42l42->component->dev, "Function B button press\n"); in cs42l42_handle_button_press()
1253 dev_dbg(cs42l42->component->dev, "Function D button press\n"); in cs42l42_handle_button_press()
1256 dev_dbg(cs42l42->component->dev, "Function A button press\n"); in cs42l42_handle_button_press()
1260 /* Set button detect level sensitivity back to default */ in cs42l42_handle_button_press()
1261 regmap_update_bits(cs42l42->regmap, in cs42l42_handle_button_press()
1268 (cs42l42->bias_thresholds[0] << CS42L42_HS_DET_LEVEL_SHIFT)); in cs42l42_handle_button_press()
1271 regmap_read(cs42l42->regmap, CS42L42_DET_INT_STATUS2, in cs42l42_handle_button_press()
1274 /* Unmask button detect interrupts */ in cs42l42_handle_button_press()
1275 regmap_update_bits(cs42l42->regmap, in cs42l42_handle_button_press()
1325 struct snd_soc_component *component = cs42l42->component; in cs42l42_irq_thread()
1334 regmap_read(cs42l42->regmap, irq_params_table[i].status_addr, in cs42l42_irq_thread()
1336 regmap_read(cs42l42->regmap, irq_params_table[i].mask_addr, in cs42l42_irq_thread()
1342 /* Read tip sense status before handling type detect */ in cs42l42_irq_thread()
1353 /* Check auto-detect status */ in cs42l42_irq_thread()
1357 dev_dbg(component->dev, in cs42l42_irq_thread()
1358 "Auto detect done (%d)\n", in cs42l42_irq_thread()
1359 cs42l42->hs_type); in cs42l42_irq_thread()
1367 if (cs42l42->plug_state != CS42L42_TS_PLUG) { in cs42l42_irq_thread()
1368 cs42l42->plug_state = CS42L42_TS_PLUG; in cs42l42_irq_thread()
1374 if (cs42l42->plug_state != CS42L42_TS_UNPLUG) { in cs42l42_irq_thread()
1375 cs42l42->plug_state = CS42L42_TS_UNPLUG; in cs42l42_irq_thread()
1377 dev_dbg(component->dev, in cs42l42_irq_thread()
1383 if (cs42l42->plug_state != CS42L42_TS_TRANS) in cs42l42_irq_thread()
1384 cs42l42->plug_state = CS42L42_TS_TRANS; in cs42l42_irq_thread()
1388 /* Check button detect status */ in cs42l42_irq_thread()
1395 dev_dbg(component->dev, in cs42l42_irq_thread()
1409 regmap_update_bits(cs42l42->regmap, CS42L42_ADC_OVFL_INT_MASK, in cs42l42_set_interrupt_masks()
1413 regmap_update_bits(cs42l42->regmap, CS42L42_MIXER_INT_MASK, in cs42l42_set_interrupt_masks()
1423 regmap_update_bits(cs42l42->regmap, CS42L42_SRC_INT_MASK, in cs42l42_set_interrupt_masks()
1433 regmap_update_bits(cs42l42->regmap, CS42L42_ASP_RX_INT_MASK, in cs42l42_set_interrupt_masks()
1445 regmap_update_bits(cs42l42->regmap, CS42L42_ASP_TX_INT_MASK, in cs42l42_set_interrupt_masks()
1455 regmap_update_bits(cs42l42->regmap, CS42L42_CODEC_INT_MASK, in cs42l42_set_interrupt_masks()
1461 regmap_update_bits(cs42l42->regmap, CS42L42_SRCPL_INT_MASK, in cs42l42_set_interrupt_masks()
1471 regmap_update_bits(cs42l42->regmap, CS42L42_DET_INT1_MASK, in cs42l42_set_interrupt_masks()
1479 regmap_update_bits(cs42l42->regmap, CS42L42_DET_INT2_MASK, in cs42l42_set_interrupt_masks()
1491 regmap_update_bits(cs42l42->regmap, CS42L42_VPMON_INT_MASK, in cs42l42_set_interrupt_masks()
1495 regmap_update_bits(cs42l42->regmap, CS42L42_PLL_LOCK_INT_MASK, in cs42l42_set_interrupt_masks()
1499 regmap_update_bits(cs42l42->regmap, CS42L42_TSRS_PLUG_INT_MASK, in cs42l42_set_interrupt_masks()
1514 cs42l42->hs_type = CS42L42_PLUG_INVALID; in cs42l42_setup_hs_type_detect()
1517 regmap_update_bits(cs42l42->regmap, CS42L42_MIC_DET_CTL1, in cs42l42_setup_hs_type_detect()
1523 (cs42l42->bias_thresholds[0] << in cs42l42_setup_hs_type_detect()
1526 /* Remove ground noise-suppression clamps */ in cs42l42_setup_hs_type_detect()
1527 regmap_update_bits(cs42l42->regmap, in cs42l42_setup_hs_type_detect()
1533 regmap_update_bits(cs42l42->regmap, CS42L42_TIPSENSE_CTL, in cs42l42_setup_hs_type_detect()
1542 regmap_read(cs42l42->regmap, in cs42l42_setup_hs_type_detect()
1545 cs42l42->plug_state = (((char) reg) & in cs42l42_setup_hs_type_detect()
1560 struct device_node *np = i2c_client->dev.of_node; in cs42l42_handle_device_data()
1566 ret = of_property_read_u32(np, "cirrus,ts-inv", &val); in cs42l42_handle_device_data()
1572 cs42l42->ts_inv = val; in cs42l42_handle_device_data()
1575 dev_err(&i2c_client->dev, in cs42l42_handle_device_data()
1576 "Wrong cirrus,ts-inv DT value %d\n", in cs42l42_handle_device_data()
1578 cs42l42->ts_inv = CS42L42_TS_INV_DIS; in cs42l42_handle_device_data()
1581 cs42l42->ts_inv = CS42L42_TS_INV_DIS; in cs42l42_handle_device_data()
1584 regmap_update_bits(cs42l42->regmap, CS42L42_TSENSE_CTL, in cs42l42_handle_device_data()
1586 (cs42l42->ts_inv << CS42L42_TS_INV_SHIFT)); in cs42l42_handle_device_data()
1588 ret = of_property_read_u32(np, "cirrus,ts-dbnc-rise", &val); in cs42l42_handle_device_data()
1600 cs42l42->ts_dbnc_rise = val; in cs42l42_handle_device_data()
1603 dev_err(&i2c_client->dev, in cs42l42_handle_device_data()
1604 "Wrong cirrus,ts-dbnc-rise DT value %d\n", in cs42l42_handle_device_data()
1606 cs42l42->ts_dbnc_rise = CS42L42_TS_DBNCE_1000; in cs42l42_handle_device_data()
1609 cs42l42->ts_dbnc_rise = CS42L42_TS_DBNCE_1000; in cs42l42_handle_device_data()
1612 regmap_update_bits(cs42l42->regmap, CS42L42_TSENSE_CTL, in cs42l42_handle_device_data()
1614 (cs42l42->ts_dbnc_rise << in cs42l42_handle_device_data()
1617 ret = of_property_read_u32(np, "cirrus,ts-dbnc-fall", &val); in cs42l42_handle_device_data()
1629 cs42l42->ts_dbnc_fall = val; in cs42l42_handle_device_data()
1632 dev_err(&i2c_client->dev, in cs42l42_handle_device_data()
1633 "Wrong cirrus,ts-dbnc-fall DT value %d\n", in cs42l42_handle_device_data()
1635 cs42l42->ts_dbnc_fall = CS42L42_TS_DBNCE_0; in cs42l42_handle_device_data()
1638 cs42l42->ts_dbnc_fall = CS42L42_TS_DBNCE_0; in cs42l42_handle_device_data()
1641 regmap_update_bits(cs42l42->regmap, CS42L42_TSENSE_CTL, in cs42l42_handle_device_data()
1643 (cs42l42->ts_dbnc_fall << in cs42l42_handle_device_data()
1646 ret = of_property_read_u32(np, "cirrus,btn-det-init-dbnce", &val); in cs42l42_handle_device_data()
1650 cs42l42->btn_det_init_dbnce = val; in cs42l42_handle_device_data()
1652 dev_err(&i2c_client->dev, in cs42l42_handle_device_data()
1653 "Wrong cirrus,btn-det-init-dbnce DT value %d\n", in cs42l42_handle_device_data()
1655 cs42l42->btn_det_init_dbnce = in cs42l42_handle_device_data()
1659 cs42l42->btn_det_init_dbnce = in cs42l42_handle_device_data()
1663 ret = of_property_read_u32(np, "cirrus,btn-det-event-dbnce", &val); in cs42l42_handle_device_data()
1667 cs42l42->btn_det_event_dbnce = val; in cs42l42_handle_device_data()
1669 dev_err(&i2c_client->dev, in cs42l42_handle_device_data()
1670 "Wrong cirrus,btn-det-event-dbnce DT value %d\n", val); in cs42l42_handle_device_data()
1671 cs42l42->btn_det_event_dbnce = in cs42l42_handle_device_data()
1675 cs42l42->btn_det_event_dbnce = in cs42l42_handle_device_data()
1679 ret = of_property_read_u32_array(np, "cirrus,bias-lvls", in cs42l42_handle_device_data()
1685 cs42l42->bias_thresholds[i] = thresholds[i]; in cs42l42_handle_device_data()
1687 dev_err(&i2c_client->dev, in cs42l42_handle_device_data()
1688 "Wrong cirrus,bias-lvls[%d] DT value %d\n", i, in cs42l42_handle_device_data()
1690 cs42l42->bias_thresholds[i] = in cs42l42_handle_device_data()
1696 cs42l42->bias_thresholds[i] = threshold_defaults[i]; in cs42l42_handle_device_data()
1699 ret = of_property_read_u32(np, "cirrus,hs-bias-ramp-rate", &val); in cs42l42_handle_device_data()
1704 cs42l42->hs_bias_ramp_rate = val; in cs42l42_handle_device_data()
1705 cs42l42->hs_bias_ramp_time = CS42L42_HSBIAS_RAMP_TIME0; in cs42l42_handle_device_data()
1708 cs42l42->hs_bias_ramp_rate = val; in cs42l42_handle_device_data()
1709 cs42l42->hs_bias_ramp_time = CS42L42_HSBIAS_RAMP_TIME1; in cs42l42_handle_device_data()
1712 cs42l42->hs_bias_ramp_rate = val; in cs42l42_handle_device_data()
1713 cs42l42->hs_bias_ramp_time = CS42L42_HSBIAS_RAMP_TIME2; in cs42l42_handle_device_data()
1716 cs42l42->hs_bias_ramp_rate = val; in cs42l42_handle_device_data()
1717 cs42l42->hs_bias_ramp_time = CS42L42_HSBIAS_RAMP_TIME3; in cs42l42_handle_device_data()
1720 dev_err(&i2c_client->dev, in cs42l42_handle_device_data()
1721 "Wrong cirrus,hs-bias-ramp-rate DT value %d\n", in cs42l42_handle_device_data()
1723 cs42l42->hs_bias_ramp_rate = CS42L42_HSBIAS_RAMP_SLOW; in cs42l42_handle_device_data()
1724 cs42l42->hs_bias_ramp_time = CS42L42_HSBIAS_RAMP_TIME2; in cs42l42_handle_device_data()
1727 cs42l42->hs_bias_ramp_rate = CS42L42_HSBIAS_RAMP_SLOW; in cs42l42_handle_device_data()
1728 cs42l42->hs_bias_ramp_time = CS42L42_HSBIAS_RAMP_TIME2; in cs42l42_handle_device_data()
1731 regmap_update_bits(cs42l42->regmap, CS42L42_HS_BIAS_CTL, in cs42l42_handle_device_data()
1733 (cs42l42->hs_bias_ramp_rate << in cs42l42_handle_device_data()
1747 cs42l42 = devm_kzalloc(&i2c_client->dev, sizeof(struct cs42l42_private), in cs42l42_i2c_probe()
1750 return -ENOMEM; in cs42l42_i2c_probe()
1754 cs42l42->regmap = devm_regmap_init_i2c(i2c_client, &cs42l42_regmap); in cs42l42_i2c_probe()
1755 if (IS_ERR(cs42l42->regmap)) { in cs42l42_i2c_probe()
1756 ret = PTR_ERR(cs42l42->regmap); in cs42l42_i2c_probe()
1757 dev_err(&i2c_client->dev, "regmap_init() failed: %d\n", ret); in cs42l42_i2c_probe()
1761 for (i = 0; i < ARRAY_SIZE(cs42l42->supplies); i++) in cs42l42_i2c_probe()
1762 cs42l42->supplies[i].supply = cs42l42_supply_names[i]; in cs42l42_i2c_probe()
1764 ret = devm_regulator_bulk_get(&i2c_client->dev, in cs42l42_i2c_probe()
1765 ARRAY_SIZE(cs42l42->supplies), in cs42l42_i2c_probe()
1766 cs42l42->supplies); in cs42l42_i2c_probe()
1768 dev_err(&i2c_client->dev, in cs42l42_i2c_probe()
1773 ret = regulator_bulk_enable(ARRAY_SIZE(cs42l42->supplies), in cs42l42_i2c_probe()
1774 cs42l42->supplies); in cs42l42_i2c_probe()
1776 dev_err(&i2c_client->dev, in cs42l42_i2c_probe()
1782 cs42l42->reset_gpio = devm_gpiod_get_optional(&i2c_client->dev, in cs42l42_i2c_probe()
1784 if (IS_ERR(cs42l42->reset_gpio)) in cs42l42_i2c_probe()
1785 return PTR_ERR(cs42l42->reset_gpio); in cs42l42_i2c_probe()
1787 if (cs42l42->reset_gpio) { in cs42l42_i2c_probe()
1788 dev_dbg(&i2c_client->dev, "Found reset GPIO\n"); in cs42l42_i2c_probe()
1789 gpiod_set_value_cansleep(cs42l42->reset_gpio, 1); in cs42l42_i2c_probe()
1794 ret = devm_request_threaded_irq(&i2c_client->dev, in cs42l42_i2c_probe()
1795 i2c_client->irq, in cs42l42_i2c_probe()
1801 dev_err(&i2c_client->dev, in cs42l42_i2c_probe()
1805 ret = regmap_read(cs42l42->regmap, CS42L42_DEVID_AB, &reg); in cs42l42_i2c_probe()
1808 ret = regmap_read(cs42l42->regmap, CS42L42_DEVID_CD, &reg); in cs42l42_i2c_probe()
1811 ret = regmap_read(cs42l42->regmap, CS42L42_DEVID_E, &reg); in cs42l42_i2c_probe()
1815 ret = -ENODEV; in cs42l42_i2c_probe()
1816 dev_err(&i2c_client->dev, in cs42l42_i2c_probe()
1822 ret = regmap_read(cs42l42->regmap, CS42L42_REVID, &reg); in cs42l42_i2c_probe()
1824 dev_err(&i2c_client->dev, "Get Revision ID failed\n"); in cs42l42_i2c_probe()
1828 dev_info(&i2c_client->dev, in cs42l42_i2c_probe()
1832 regmap_update_bits(cs42l42->regmap, CS42L42_PWR_CTL1, in cs42l42_i2c_probe()
1848 if (i2c_client->dev.of_node) { in cs42l42_i2c_probe()
1861 ret = devm_snd_soc_register_component(&i2c_client->dev, in cs42l42_i2c_probe()
1868 regulator_bulk_disable(ARRAY_SIZE(cs42l42->supplies), in cs42l42_i2c_probe()
1869 cs42l42->supplies); in cs42l42_i2c_probe()
1878 gpiod_set_value_cansleep(cs42l42->reset_gpio, 0); in cs42l42_i2c_remove()
1888 regcache_cache_only(cs42l42->regmap, true); in cs42l42_runtime_suspend()
1889 regcache_mark_dirty(cs42l42->regmap); in cs42l42_runtime_suspend()
1892 gpiod_set_value_cansleep(cs42l42->reset_gpio, 0); in cs42l42_runtime_suspend()
1895 regulator_bulk_disable(ARRAY_SIZE(cs42l42->supplies), in cs42l42_runtime_suspend()
1896 cs42l42->supplies); in cs42l42_runtime_suspend()
1907 ret = regulator_bulk_enable(ARRAY_SIZE(cs42l42->supplies), in cs42l42_runtime_resume()
1908 cs42l42->supplies); in cs42l42_runtime_resume()
1915 gpiod_set_value_cansleep(cs42l42->reset_gpio, 1); in cs42l42_runtime_resume()
1918 regcache_cache_only(cs42l42->regmap, false); in cs42l42_runtime_resume()
1919 regcache_sync(cs42l42->regmap); in cs42l42_runtime_resume()