Lines Matching refs:rt5645
676 struct rt5645_priv *rt5645 = snd_soc_component_get_drvdata(component); in rt5645_hweq_get() local
682 eq_param[i].reg = cpu_to_be16(rt5645->eq_param[i].reg); in rt5645_hweq_get()
683 eq_param[i].val = cpu_to_be16(rt5645->eq_param[i].val); in rt5645_hweq_get()
702 struct rt5645_priv *rt5645 = snd_soc_component_get_drvdata(component); in rt5645_hweq_put() local
708 rt5645->eq_param[i].reg = be16_to_cpu(eq_param[i].reg); in rt5645_hweq_put()
709 rt5645->eq_param[i].val = be16_to_cpu(eq_param[i].val); in rt5645_hweq_put()
714 if (rt5645->eq_param[i].reg == 0) in rt5645_hweq_put()
716 else if (rt5645->eq_param[i].reg != RT5645_EQ_CTRL2) in rt5645_hweq_put()
723 if (!rt5645_validate_hweq(rt5645->eq_param[i].reg) && in rt5645_hweq_put()
724 rt5645->eq_param[i].reg != 0) in rt5645_hweq_put()
726 else if (rt5645->eq_param[i].reg == 0) in rt5645_hweq_put()
744 struct rt5645_priv *rt5645 = snd_soc_component_get_drvdata(component); in rt5645_spk_put_volsw() local
747 regmap_update_bits(rt5645->regmap, RT5645_MICBIAS, in rt5645_spk_put_volsw()
752 mod_delayed_work(system_power_efficient_wq, &rt5645->rcclock_work, in rt5645_spk_put_volsw()
849 struct rt5645_priv *rt5645 = snd_soc_component_get_drvdata(component); in set_dmic_clk() local
852 rate = rt5645->sysclk / rl6231_get_pre_div(rt5645->regmap, in set_dmic_clk()
927 struct rt5645_priv *rt5645 = snd_soc_component_get_drvdata(component); in rt5645_enable_hweq() local
931 if (rt5645_validate_hweq(rt5645->eq_param[i].reg)) in rt5645_enable_hweq()
932 regmap_write(rt5645->regmap, rt5645->eq_param[i].reg, in rt5645_enable_hweq()
933 rt5645->eq_param[i].val); in rt5645_enable_hweq()
1647 struct rt5645_priv *rt5645 = snd_soc_component_get_drvdata(component); in hp_amp_power() local
1651 if (rt5645->codec_type == CODEC_TYPE_RT5650) { in hp_amp_power()
1656 regmap_write(rt5645->regmap, RT5645_PR_BASE + in hp_amp_power()
1661 regmap_write(rt5645->regmap, RT5645_PR_BASE + in hp_amp_power()
1664 regmap_write(rt5645->regmap, RT5645_PR_BASE + in hp_amp_power()
1668 rt5645->hp_on = true; in hp_amp_power()
1674 regmap_write(rt5645->regmap, RT5645_PR_BASE + in hp_amp_power()
1696 regmap_write(rt5645->regmap, RT5645_PR_BASE + in hp_amp_power()
1698 regmap_write(rt5645->regmap, RT5645_PR_BASE + in hp_amp_power()
1706 if (rt5645->codec_type == CODEC_TYPE_RT5650) { in hp_amp_power()
1707 regmap_write(rt5645->regmap, RT5645_PR_BASE + in hp_amp_power()
1710 regmap_write(rt5645->regmap, RT5645_PR_BASE + in hp_amp_power()
1740 struct rt5645_priv *rt5645 = snd_soc_component_get_drvdata(component); in rt5645_hp_event() local
1746 if (rt5645->codec_type == CODEC_TYPE_RT5645) { in rt5645_hp_event()
1753 regmap_write(rt5645->regmap, RT5645_PR_BASE + in rt5645_hp_event()
1773 if (rt5645->codec_type == CODEC_TYPE_RT5645) { in rt5645_hp_event()
1780 regmap_write(rt5645->regmap, RT5645_PR_BASE + in rt5645_hp_event()
1892 struct rt5645_priv *rt5645 = snd_soc_component_get_drvdata(component); in rt5650_hp_event() local
1896 if (rt5645->hp_on) { in rt5650_hp_event()
1898 rt5645->hp_on = false; in rt5650_hp_event()
2735 struct rt5645_priv *rt5645 = snd_soc_component_get_drvdata(component); in rt5645_hw_params() local
2739 rt5645->lrck[dai->id] = params_rate(params); in rt5645_hw_params()
2740 pre_div = rl6231_get_clk_info(rt5645->sysclk, rt5645->lrck[dai->id]); in rt5645_hw_params()
2751 switch (rt5645->codec_type) { in rt5645_hw_params()
2761 rt5645->bclk[dai->id] = rt5645->lrck[dai->id] * (32 << bclk_ms); in rt5645_hw_params()
2764 rt5645->bclk[dai->id], rt5645->lrck[dai->id]); in rt5645_hw_params()
2811 struct rt5645_priv *rt5645 = snd_soc_component_get_drvdata(component); in rt5645_set_dai_fmt() local
2814 switch (rt5645->codec_type) { in rt5645_set_dai_fmt()
2825 rt5645->master[dai->id] = 1; in rt5645_set_dai_fmt()
2829 rt5645->master[dai->id] = 0; in rt5645_set_dai_fmt()
2882 struct rt5645_priv *rt5645 = snd_soc_component_get_drvdata(component); in rt5645_set_dai_sysclk() local
2885 if (freq == rt5645->sysclk && clk_id == rt5645->sysclk_src) in rt5645_set_dai_sysclk()
2904 rt5645->sysclk = freq; in rt5645_set_dai_sysclk()
2905 rt5645->sysclk_src = clk_id; in rt5645_set_dai_sysclk()
2916 struct rt5645_priv *rt5645 = snd_soc_component_get_drvdata(component); in rt5645_set_dai_pll() local
2920 if (source == rt5645->pll_src && freq_in == rt5645->pll_in && in rt5645_set_dai_pll()
2921 freq_out == rt5645->pll_out) in rt5645_set_dai_pll()
2927 rt5645->pll_in = 0; in rt5645_set_dai_pll()
2928 rt5645->pll_out = 0; in rt5645_set_dai_pll()
2976 rt5645->pll_in = freq_in; in rt5645_set_dai_pll()
2977 rt5645->pll_out = freq_out; in rt5645_set_dai_pll()
2978 rt5645->pll_src = source; in rt5645_set_dai_pll()
2987 struct rt5645_priv *rt5645 = snd_soc_component_get_drvdata(component); in rt5645_set_tdm_slot() local
2991 switch (rt5645->codec_type) { in rt5645_set_tdm_slot()
3009 if (rt5645->codec_type == CODEC_TYPE_RT5645) in rt5645_set_tdm_slot()
3052 struct rt5645_priv *rt5645 = snd_soc_component_get_drvdata(component); in rt5645_set_bias_level() local
3084 if (rt5645->en_button_func) in rt5645_set_bias_level()
3086 &rt5645->jack_detect_work, in rt5645_set_bias_level()
3093 if (!rt5645->en_button_func) in rt5645_set_bias_level()
3140 struct rt5645_priv *rt5645 = snd_soc_component_get_drvdata(component); in rt5645_jack_detect() local
3144 regmap_write(rt5645->regmap, RT5645_CHARGE_PUMP, 0x0e06); in rt5645_jack_detect()
3153 regmap_update_bits(rt5645->regmap, RT5645_PWR_ANLG1, in rt5645_jack_detect()
3156 regmap_update_bits(rt5645->regmap, RT5645_PWR_MIXER, in rt5645_jack_detect()
3158 regmap_update_bits(rt5645->regmap, RT5645_PWR_VOL, in rt5645_jack_detect()
3162 regmap_write(rt5645->regmap, RT5645_JD_CTRL3, 0x00f0); in rt5645_jack_detect()
3163 regmap_update_bits(rt5645->regmap, RT5645_IN1_CTRL2, in rt5645_jack_detect()
3165 regmap_update_bits(rt5645->regmap, RT5645_IN1_CTRL1, in rt5645_jack_detect()
3168 regmap_update_bits(rt5645->regmap, RT5645_IN1_CTRL2, in rt5645_jack_detect()
3172 regmap_read(rt5645->regmap, RT5645_IN1_CTRL3, &val); in rt5645_jack_detect()
3177 rt5645->jack_type = SND_JACK_HEADSET; in rt5645_jack_detect()
3178 if (rt5645->en_button_func) { in rt5645_jack_detect()
3184 rt5645->jack_type = SND_JACK_HEADPHONE; in rt5645_jack_detect()
3186 if (rt5645->pdata.level_trigger_irq) in rt5645_jack_detect()
3187 regmap_update_bits(rt5645->regmap, RT5645_IRQ_CTRL2, in rt5645_jack_detect()
3190 rt5645->jack_type = 0; in rt5645_jack_detect()
3192 regmap_update_bits(rt5645->regmap, RT5645_HP_VOL, in rt5645_jack_detect()
3195 regmap_update_bits(rt5645->regmap, RT5645_IN1_CTRL2, in rt5645_jack_detect()
3197 regmap_update_bits(rt5645->regmap, RT5645_IN1_CTRL1, in rt5645_jack_detect()
3200 if (rt5645->en_button_func) in rt5645_jack_detect()
3203 if (rt5645->pdata.jd_mode == 0) in rt5645_jack_detect()
3207 if (rt5645->pdata.level_trigger_irq) in rt5645_jack_detect()
3208 regmap_update_bits(rt5645->regmap, RT5645_IRQ_CTRL2, in rt5645_jack_detect()
3212 return rt5645->jack_type; in rt5645_jack_detect()
3233 struct rt5645_priv *rt5645 = snd_soc_component_get_drvdata(component); in rt5645_set_jack_detect() local
3235 rt5645->hp_jack = hp_jack; in rt5645_set_jack_detect()
3236 rt5645->mic_jack = mic_jack; in rt5645_set_jack_detect()
3237 rt5645->btn_jack = btn_jack; in rt5645_set_jack_detect()
3238 if (rt5645->btn_jack && rt5645->codec_type == CODEC_TYPE_RT5650) { in rt5645_set_jack_detect()
3239 rt5645->en_button_func = true; in rt5645_set_jack_detect()
3240 regmap_update_bits(rt5645->regmap, RT5645_GPIO_CTRL1, in rt5645_set_jack_detect()
3242 regmap_update_bits(rt5645->regmap, RT5645_GEN_CTRL1, in rt5645_set_jack_detect()
3245 rt5645_irq(0, rt5645); in rt5645_set_jack_detect()
3253 struct rt5645_priv *rt5645 = in rt5645_jack_detect_work() local
3257 if (!rt5645->component) in rt5645_jack_detect_work()
3260 switch (rt5645->pdata.jd_mode) { in rt5645_jack_detect_work()
3262 if (rt5645->gpiod_hp_det) { in rt5645_jack_detect_work()
3263 gpio_state = gpiod_get_value(rt5645->gpiod_hp_det); in rt5645_jack_detect_work()
3264 dev_dbg(rt5645->component->dev, "gpio_state = %d\n", in rt5645_jack_detect_work()
3266 report = rt5645_jack_detect(rt5645->component, gpio_state); in rt5645_jack_detect_work()
3268 snd_soc_jack_report(rt5645->hp_jack, in rt5645_jack_detect_work()
3270 snd_soc_jack_report(rt5645->mic_jack, in rt5645_jack_detect_work()
3274 val = snd_soc_component_read(rt5645->component, RT5645_A_JD_CTRL1) & 0x0020; in rt5645_jack_detect_work()
3277 val = snd_soc_component_read(rt5645->component, RT5645_INT_IRQ_ST) & 0x1000; in rt5645_jack_detect_work()
3282 if (!val && (rt5645->jack_type == 0)) { /* jack in */ in rt5645_jack_detect_work()
3283 report = rt5645_jack_detect(rt5645->component, 1); in rt5645_jack_detect_work()
3284 } else if (!val && rt5645->jack_type != 0) { in rt5645_jack_detect_work()
3287 if (snd_soc_component_read(rt5645->component, RT5645_INT_IRQ_ST) & 0x4) { in rt5645_jack_detect_work()
3290 btn_type = rt5645_button_detect(rt5645->component); in rt5645_jack_detect_work()
3320 dev_err(rt5645->component->dev, in rt5645_jack_detect_work()
3327 report = rt5645->jack_type; in rt5645_jack_detect_work()
3329 mod_timer(&rt5645->btn_check_timer, in rt5645_jack_detect_work()
3335 snd_soc_component_update_bits(rt5645->component, in rt5645_jack_detect_work()
3337 rt5645_jack_detect(rt5645->component, 0); in rt5645_jack_detect_work()
3340 snd_soc_jack_report(rt5645->hp_jack, report, SND_JACK_HEADPHONE); in rt5645_jack_detect_work()
3341 snd_soc_jack_report(rt5645->mic_jack, report, SND_JACK_MICROPHONE); in rt5645_jack_detect_work()
3342 if (rt5645->en_button_func) in rt5645_jack_detect_work()
3343 snd_soc_jack_report(rt5645->btn_jack, in rt5645_jack_detect_work()
3350 struct rt5645_priv *rt5645 = in rt5645_rcclock_work() local
3353 regmap_update_bits(rt5645->regmap, RT5645_MICBIAS, in rt5645_rcclock_work()
3359 struct rt5645_priv *rt5645 = data; in rt5645_irq() local
3362 &rt5645->jack_detect_work, msecs_to_jiffies(250)); in rt5645_irq()
3369 struct rt5645_priv *rt5645 = from_timer(rt5645, t, btn_check_timer); in rt5645_btn_check_callback() local
3372 &rt5645->jack_detect_work, msecs_to_jiffies(5)); in rt5645_btn_check_callback()
3378 struct rt5645_priv *rt5645 = snd_soc_component_get_drvdata(component); in rt5645_probe() local
3380 rt5645->component = component; in rt5645_probe()
3382 switch (rt5645->codec_type) { in rt5645_probe()
3390 if (rt5645->v_id < 3) { in rt5645_probe()
3409 if (rt5645->pdata.jd_mode) { in rt5645_probe()
3415 if (rt5645->pdata.long_name) in rt5645_probe()
3416 component->card->long_name = rt5645->pdata.long_name; in rt5645_probe()
3418 rt5645->eq_param = devm_kcalloc(component->dev, in rt5645_probe()
3422 if (!rt5645->eq_param) in rt5645_probe()
3436 struct rt5645_priv *rt5645 = snd_soc_component_get_drvdata(component); in rt5645_suspend() local
3438 regcache_cache_only(rt5645->regmap, true); in rt5645_suspend()
3439 regcache_mark_dirty(rt5645->regmap); in rt5645_suspend()
3446 struct rt5645_priv *rt5645 = snd_soc_component_get_drvdata(component); in rt5645_resume() local
3448 regcache_cache_only(rt5645->regmap, false); in rt5645_resume()
3449 regcache_sync(rt5645->regmap); in rt5645_resume()
3797 static int rt5645_parse_dt(struct rt5645_priv *rt5645, struct device *dev) in rt5645_parse_dt() argument
3799 rt5645->pdata.in2_diff = device_property_read_bool(dev, in rt5645_parse_dt()
3802 "realtek,dmic1-data-pin", &rt5645->pdata.dmic1_data_pin); in rt5645_parse_dt()
3804 "realtek,dmic2-data-pin", &rt5645->pdata.dmic2_data_pin); in rt5645_parse_dt()
3806 "realtek,jd-mode", &rt5645->pdata.jd_mode); in rt5645_parse_dt()
3816 struct rt5645_priv *rt5645; in rt5645_i2c_probe() local
3821 rt5645 = devm_kzalloc(&i2c->dev, sizeof(struct rt5645_priv), in rt5645_i2c_probe()
3823 if (rt5645 == NULL) in rt5645_i2c_probe()
3826 rt5645->i2c = i2c; in rt5645_i2c_probe()
3827 i2c_set_clientdata(i2c, rt5645); in rt5645_i2c_probe()
3836 rt5645->pdata = *pdata; in rt5645_i2c_probe()
3838 rt5645_parse_dt(rt5645, &i2c->dev); in rt5645_i2c_probe()
3840 rt5645->pdata = jd_mode3_platform_data; in rt5645_i2c_probe()
3843 rt5645->pdata.in2_diff = QUIRK_IN2_DIFF(quirk); in rt5645_i2c_probe()
3844 rt5645->pdata.level_trigger_irq = QUIRK_LEVEL_IRQ(quirk); in rt5645_i2c_probe()
3845 rt5645->pdata.inv_jd1_1 = QUIRK_INV_JD1_1(quirk); in rt5645_i2c_probe()
3846 rt5645->pdata.jd_mode = QUIRK_JD_MODE(quirk); in rt5645_i2c_probe()
3847 rt5645->pdata.dmic1_data_pin = QUIRK_DMIC1_DATA_PIN(quirk); in rt5645_i2c_probe()
3848 rt5645->pdata.dmic2_data_pin = QUIRK_DMIC2_DATA_PIN(quirk); in rt5645_i2c_probe()
3851 rt5645->gpiod_hp_det = devm_gpiod_get_optional(&i2c->dev, "hp-detect", in rt5645_i2c_probe()
3854 if (IS_ERR(rt5645->gpiod_hp_det)) { in rt5645_i2c_probe()
3856 ret = PTR_ERR(rt5645->gpiod_hp_det); in rt5645_i2c_probe()
3865 for (i = 0; i < ARRAY_SIZE(rt5645->supplies); i++) in rt5645_i2c_probe()
3866 rt5645->supplies[i].supply = rt5645_supply_names[i]; in rt5645_i2c_probe()
3869 ARRAY_SIZE(rt5645->supplies), in rt5645_i2c_probe()
3870 rt5645->supplies); in rt5645_i2c_probe()
3876 ret = regulator_bulk_enable(ARRAY_SIZE(rt5645->supplies), in rt5645_i2c_probe()
3877 rt5645->supplies); in rt5645_i2c_probe()
3900 rt5645->regmap = devm_regmap_init_i2c(i2c, &rt5645_regmap); in rt5645_i2c_probe()
3901 rt5645->codec_type = CODEC_TYPE_RT5645; in rt5645_i2c_probe()
3904 rt5645->regmap = devm_regmap_init_i2c(i2c, &rt5650_regmap); in rt5645_i2c_probe()
3905 rt5645->codec_type = CODEC_TYPE_RT5650; in rt5645_i2c_probe()
3915 if (IS_ERR(rt5645->regmap)) { in rt5645_i2c_probe()
3916 ret = PTR_ERR(rt5645->regmap); in rt5645_i2c_probe()
3922 regmap_write(rt5645->regmap, RT5645_RESET, 0); in rt5645_i2c_probe()
3925 rt5645->v_id = val & 0xff; in rt5645_i2c_probe()
3927 regmap_write(rt5645->regmap, RT5645_AD_DA_MIXER, 0x8080); in rt5645_i2c_probe()
3929 ret = regmap_register_patch(rt5645->regmap, init_list, in rt5645_i2c_probe()
3934 if (rt5645->codec_type == CODEC_TYPE_RT5650) { in rt5645_i2c_probe()
3935 ret = regmap_register_patch(rt5645->regmap, rt5650_init_list, in rt5645_i2c_probe()
3942 regmap_update_bits(rt5645->regmap, RT5645_CLSD_OUT_CTRL, 0xc0, 0xc0); in rt5645_i2c_probe()
3944 if (rt5645->pdata.in2_diff) in rt5645_i2c_probe()
3945 regmap_update_bits(rt5645->regmap, RT5645_IN2_CTRL, in rt5645_i2c_probe()
3948 if (rt5645->pdata.dmic1_data_pin || rt5645->pdata.dmic2_data_pin) { in rt5645_i2c_probe()
3949 regmap_update_bits(rt5645->regmap, RT5645_GPIO_CTRL1, in rt5645_i2c_probe()
3952 switch (rt5645->pdata.dmic1_data_pin) { in rt5645_i2c_probe()
3954 regmap_update_bits(rt5645->regmap, RT5645_DMIC_CTRL1, in rt5645_i2c_probe()
3959 regmap_update_bits(rt5645->regmap, RT5645_GPIO_CTRL1, in rt5645_i2c_probe()
3961 regmap_update_bits(rt5645->regmap, RT5645_DMIC_CTRL1, in rt5645_i2c_probe()
3963 regmap_update_bits(rt5645->regmap, RT5645_GPIO_CTRL1, in rt5645_i2c_probe()
3968 regmap_update_bits(rt5645->regmap, RT5645_DMIC_CTRL1, in rt5645_i2c_probe()
3970 regmap_update_bits(rt5645->regmap, RT5645_GPIO_CTRL1, in rt5645_i2c_probe()
3979 switch (rt5645->pdata.dmic2_data_pin) { in rt5645_i2c_probe()
3981 regmap_update_bits(rt5645->regmap, RT5645_DMIC_CTRL1, in rt5645_i2c_probe()
3986 regmap_update_bits(rt5645->regmap, RT5645_DMIC_CTRL1, in rt5645_i2c_probe()
3988 regmap_update_bits(rt5645->regmap, RT5645_GPIO_CTRL1, in rt5645_i2c_probe()
3993 regmap_update_bits(rt5645->regmap, RT5645_DMIC_CTRL1, in rt5645_i2c_probe()
3995 regmap_update_bits(rt5645->regmap, RT5645_GPIO_CTRL1, in rt5645_i2c_probe()
4001 regmap_update_bits(rt5645->regmap, RT5645_DMIC_CTRL1, in rt5645_i2c_probe()
4003 regmap_update_bits(rt5645->regmap, RT5645_GPIO_CTRL1, in rt5645_i2c_probe()
4012 if (rt5645->pdata.jd_mode) { in rt5645_i2c_probe()
4013 regmap_update_bits(rt5645->regmap, RT5645_GEN_CTRL3, in rt5645_i2c_probe()
4016 regmap_update_bits(rt5645->regmap, RT5645_MICBIAS, in rt5645_i2c_probe()
4018 regmap_update_bits(rt5645->regmap, RT5645_IRQ_CTRL2, in rt5645_i2c_probe()
4020 regmap_update_bits(rt5645->regmap, RT5645_GEN_CTRL3, in rt5645_i2c_probe()
4022 regmap_update_bits(rt5645->regmap, RT5645_HPO_MIXER, in rt5645_i2c_probe()
4024 regmap_update_bits(rt5645->regmap, RT5645_MICBIAS, in rt5645_i2c_probe()
4026 regmap_update_bits(rt5645->regmap, RT5645_GPIO_CTRL1, in rt5645_i2c_probe()
4028 switch (rt5645->pdata.jd_mode) { in rt5645_i2c_probe()
4030 regmap_update_bits(rt5645->regmap, RT5645_A_JD_CTRL1, in rt5645_i2c_probe()
4035 regmap_update_bits(rt5645->regmap, RT5645_A_JD_CTRL1, in rt5645_i2c_probe()
4041 regmap_update_bits(rt5645->regmap, RT5645_A_JD_CTRL1, in rt5645_i2c_probe()
4048 if (rt5645->pdata.inv_jd1_1) { in rt5645_i2c_probe()
4049 regmap_update_bits(rt5645->regmap, RT5645_IRQ_CTRL2, in rt5645_i2c_probe()
4054 regmap_update_bits(rt5645->regmap, RT5645_ADDA_CLK1, in rt5645_i2c_probe()
4057 if (rt5645->pdata.level_trigger_irq) { in rt5645_i2c_probe()
4058 regmap_update_bits(rt5645->regmap, RT5645_IRQ_CTRL2, in rt5645_i2c_probe()
4061 timer_setup(&rt5645->btn_check_timer, rt5645_btn_check_callback, 0); in rt5645_i2c_probe()
4063 INIT_DELAYED_WORK(&rt5645->jack_detect_work, rt5645_jack_detect_work); in rt5645_i2c_probe()
4064 INIT_DELAYED_WORK(&rt5645->rcclock_work, rt5645_rcclock_work); in rt5645_i2c_probe()
4066 if (rt5645->i2c->irq) { in rt5645_i2c_probe()
4067 ret = request_threaded_irq(rt5645->i2c->irq, NULL, rt5645_irq, in rt5645_i2c_probe()
4069 | IRQF_ONESHOT, "rt5645", rt5645); in rt5645_i2c_probe()
4084 if (rt5645->i2c->irq) in rt5645_i2c_probe()
4085 free_irq(rt5645->i2c->irq, rt5645); in rt5645_i2c_probe()
4087 regulator_bulk_disable(ARRAY_SIZE(rt5645->supplies), rt5645->supplies); in rt5645_i2c_probe()
4093 struct rt5645_priv *rt5645 = i2c_get_clientdata(i2c); in rt5645_i2c_remove() local
4096 free_irq(i2c->irq, rt5645); in rt5645_i2c_remove()
4098 cancel_delayed_work_sync(&rt5645->jack_detect_work); in rt5645_i2c_remove()
4099 cancel_delayed_work_sync(&rt5645->rcclock_work); in rt5645_i2c_remove()
4100 del_timer_sync(&rt5645->btn_check_timer); in rt5645_i2c_remove()
4102 regulator_bulk_disable(ARRAY_SIZE(rt5645->supplies), rt5645->supplies); in rt5645_i2c_remove()
4109 struct rt5645_priv *rt5645 = i2c_get_clientdata(i2c); in rt5645_i2c_shutdown() local
4111 regmap_update_bits(rt5645->regmap, RT5645_GEN_CTRL3, in rt5645_i2c_shutdown()
4113 regmap_update_bits(rt5645->regmap, RT5645_IN1_CTRL2, RT5645_CBJ_MN_JD, in rt5645_i2c_shutdown()
4115 regmap_update_bits(rt5645->regmap, RT5645_IN1_CTRL1, RT5645_CBJ_BST1_EN, in rt5645_i2c_shutdown()
4118 regmap_write(rt5645->regmap, RT5645_RESET, 0); in rt5645_i2c_shutdown()