rt5659           1302 sound/soc/codecs/rt5659.c 	struct rt5659_priv *rt5659 = snd_soc_component_get_drvdata(component);
rt5659           1334 sound/soc/codecs/rt5659.c 			rt5659->jack_type = SND_JACK_HEADSET;
rt5659           1339 sound/soc/codecs/rt5659.c 			rt5659->jack_type = SND_JACK_HEADPHONE;
rt5659           1347 sound/soc/codecs/rt5659.c 		if (rt5659->jack_type == SND_JACK_HEADSET)
rt5659           1349 sound/soc/codecs/rt5659.c 		rt5659->jack_type = 0;
rt5659           1352 sound/soc/codecs/rt5659.c 	dev_dbg(component->dev, "jack_type = %d\n", rt5659->jack_type);
rt5659           1353 sound/soc/codecs/rt5659.c 	return rt5659->jack_type;
rt5659           1369 sound/soc/codecs/rt5659.c 	struct rt5659_priv *rt5659 = data;
rt5659           1372 sound/soc/codecs/rt5659.c 			   &rt5659->jack_detect_work, msecs_to_jiffies(250));
rt5659           1380 sound/soc/codecs/rt5659.c 	struct rt5659_priv *rt5659 = snd_soc_component_get_drvdata(component);
rt5659           1382 sound/soc/codecs/rt5659.c 	rt5659->hs_jack = hs_jack;
rt5659           1384 sound/soc/codecs/rt5659.c 	rt5659_irq(0, rt5659);
rt5659           1392 sound/soc/codecs/rt5659.c 	struct rt5659_priv *rt5659 =
rt5659           1396 sound/soc/codecs/rt5659.c 	if (!rt5659->component)
rt5659           1399 sound/soc/codecs/rt5659.c 	val = snd_soc_component_read32(rt5659->component, RT5659_INT_ST_1) & 0x0080;
rt5659           1402 sound/soc/codecs/rt5659.c 		if (rt5659->jack_type == 0) {
rt5659           1404 sound/soc/codecs/rt5659.c 			report = rt5659_headset_detect(rt5659->component, 1);
rt5659           1408 sound/soc/codecs/rt5659.c 			btn_type = rt5659_button_detect(rt5659->component);
rt5659           1441 sound/soc/codecs/rt5659.c 				dev_err(rt5659->component->dev,
rt5659           1449 sound/soc/codecs/rt5659.c 				report =  rt5659->jack_type;
rt5659           1453 sound/soc/codecs/rt5659.c 		report = rt5659_headset_detect(rt5659->component, 0);
rt5659           1456 sound/soc/codecs/rt5659.c 	snd_soc_jack_report(rt5659->hs_jack, report, SND_JACK_HEADSET |
rt5659           1463 sound/soc/codecs/rt5659.c 	struct rt5659_priv *rt5659 =
rt5659           1468 sound/soc/codecs/rt5659.c 	if (!rt5659->hs_jack)
rt5659           1472 sound/soc/codecs/rt5659.c 	regmap_read(rt5659->regmap, RT5659_GPIO_STA, &value);
rt5659           1475 sound/soc/codecs/rt5659.c 	if (hp_flag != rt5659->hda_hp_plugged) {
rt5659           1476 sound/soc/codecs/rt5659.c 		rt5659->hda_hp_plugged = hp_flag;
rt5659           1479 sound/soc/codecs/rt5659.c 			regmap_update_bits(rt5659->regmap, RT5659_IRQ_CTRL_1,
rt5659           1481 sound/soc/codecs/rt5659.c 			rt5659->jack_type |= SND_JACK_HEADPHONE;
rt5659           1483 sound/soc/codecs/rt5659.c 			regmap_update_bits(rt5659->regmap, RT5659_IRQ_CTRL_1,
rt5659           1485 sound/soc/codecs/rt5659.c 			rt5659->jack_type = rt5659->jack_type &
rt5659           1489 sound/soc/codecs/rt5659.c 		snd_soc_jack_report(rt5659->hs_jack, rt5659->jack_type,
rt5659           1494 sound/soc/codecs/rt5659.c 	regmap_read(rt5659->regmap, RT5659_4BTN_IL_CMD_1, &value);
rt5659           1495 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_4BTN_IL_CMD_1, value);
rt5659           1498 sound/soc/codecs/rt5659.c 	if (mic_flag != rt5659->hda_mic_plugged) {
rt5659           1499 sound/soc/codecs/rt5659.c 		rt5659->hda_mic_plugged = mic_flag;
rt5659           1501 sound/soc/codecs/rt5659.c 			regmap_update_bits(rt5659->regmap, RT5659_IRQ_CTRL_2,
rt5659           1503 sound/soc/codecs/rt5659.c 			rt5659->jack_type |= SND_JACK_MICROPHONE;
rt5659           1505 sound/soc/codecs/rt5659.c 			regmap_update_bits(rt5659->regmap, RT5659_IRQ_CTRL_2,
rt5659           1507 sound/soc/codecs/rt5659.c 			rt5659->jack_type = rt5659->jack_type
rt5659           1511 sound/soc/codecs/rt5659.c 		snd_soc_jack_report(rt5659->hs_jack, rt5659->jack_type,
rt5659           1606 sound/soc/codecs/rt5659.c 	struct rt5659_priv *rt5659 = snd_soc_component_get_drvdata(component);
rt5659           1609 sound/soc/codecs/rt5659.c 	pd = rl6231_get_pre_div(rt5659->regmap,
rt5659           1611 sound/soc/codecs/rt5659.c 	idx = rl6231_calc_dmic_clk(rt5659->sysclk / pd);
rt5659           3314 sound/soc/codecs/rt5659.c 	struct rt5659_priv *rt5659 = snd_soc_component_get_drvdata(component);
rt5659           3318 sound/soc/codecs/rt5659.c 	rt5659->lrck[dai->id] = params_rate(params);
rt5659           3319 sound/soc/codecs/rt5659.c 	pre_div = rl6231_get_clk_info(rt5659->sysclk, rt5659->lrck[dai->id]);
rt5659           3322 sound/soc/codecs/rt5659.c 			rt5659->lrck[dai->id], dai->id);
rt5659           3332 sound/soc/codecs/rt5659.c 				rt5659->lrck[dai->id], pre_div, dai->id);
rt5659           3376 sound/soc/codecs/rt5659.c 	switch (rt5659->lrck[dai->id]) {
rt5659           3397 sound/soc/codecs/rt5659.c 	struct rt5659_priv *rt5659 = snd_soc_component_get_drvdata(component);
rt5659           3402 sound/soc/codecs/rt5659.c 		rt5659->master[dai->id] = 1;
rt5659           3406 sound/soc/codecs/rt5659.c 		rt5659->master[dai->id] = 0;
rt5659           3464 sound/soc/codecs/rt5659.c 	struct rt5659_priv *rt5659 = snd_soc_component_get_drvdata(component);
rt5659           3467 sound/soc/codecs/rt5659.c 	if (freq == rt5659->sysclk && clk_id == rt5659->sysclk_src)
rt5659           3486 sound/soc/codecs/rt5659.c 	rt5659->sysclk = freq;
rt5659           3487 sound/soc/codecs/rt5659.c 	rt5659->sysclk_src = clk_id;
rt5659           3499 sound/soc/codecs/rt5659.c 	struct rt5659_priv *rt5659 = snd_soc_component_get_drvdata(component);
rt5659           3503 sound/soc/codecs/rt5659.c 	if (source == rt5659->pll_src && freq_in == rt5659->pll_in &&
rt5659           3504 sound/soc/codecs/rt5659.c 	    freq_out == rt5659->pll_out)
rt5659           3510 sound/soc/codecs/rt5659.c 		rt5659->pll_in = 0;
rt5659           3511 sound/soc/codecs/rt5659.c 		rt5659->pll_out = 0;
rt5659           3555 sound/soc/codecs/rt5659.c 	rt5659->pll_in = freq_in;
rt5659           3556 sound/soc/codecs/rt5659.c 	rt5659->pll_out = freq_out;
rt5659           3557 sound/soc/codecs/rt5659.c 	rt5659->pll_src = source;
rt5659           3617 sound/soc/codecs/rt5659.c 	struct rt5659_priv *rt5659 = snd_soc_component_get_drvdata(component);
rt5659           3621 sound/soc/codecs/rt5659.c 	rt5659->bclk[dai->id] = ratio;
rt5659           3645 sound/soc/codecs/rt5659.c 	struct rt5659_priv *rt5659 = snd_soc_component_get_drvdata(component);
rt5659           3650 sound/soc/codecs/rt5659.c 		regmap_update_bits(rt5659->regmap, RT5659_DIG_MISC,
rt5659           3652 sound/soc/codecs/rt5659.c 		regmap_update_bits(rt5659->regmap, RT5659_PWR_DIG_1,
rt5659           3654 sound/soc/codecs/rt5659.c 		regmap_update_bits(rt5659->regmap, RT5659_PWR_ANLG_1,
rt5659           3658 sound/soc/codecs/rt5659.c 		regmap_update_bits(rt5659->regmap, RT5659_PWR_ANLG_1,
rt5659           3665 sound/soc/codecs/rt5659.c 			ret = clk_prepare_enable(rt5659->mclk);
rt5659           3675 sound/soc/codecs/rt5659.c 		regmap_update_bits(rt5659->regmap, RT5659_PWR_DIG_1,
rt5659           3677 sound/soc/codecs/rt5659.c 		regmap_update_bits(rt5659->regmap, RT5659_PWR_ANLG_1,
rt5659           3681 sound/soc/codecs/rt5659.c 		regmap_update_bits(rt5659->regmap, RT5659_DIG_MISC,
rt5659           3683 sound/soc/codecs/rt5659.c 		clk_disable_unprepare(rt5659->mclk);
rt5659           3695 sound/soc/codecs/rt5659.c 	struct rt5659_priv *rt5659 = snd_soc_component_get_drvdata(component);
rt5659           3697 sound/soc/codecs/rt5659.c 	rt5659->component = component;
rt5659           3704 sound/soc/codecs/rt5659.c 	struct rt5659_priv *rt5659 = snd_soc_component_get_drvdata(component);
rt5659           3706 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_RESET, 0);
rt5659           3712 sound/soc/codecs/rt5659.c 	struct rt5659_priv *rt5659 = snd_soc_component_get_drvdata(component);
rt5659           3714 sound/soc/codecs/rt5659.c 	regcache_cache_only(rt5659->regmap, true);
rt5659           3715 sound/soc/codecs/rt5659.c 	regcache_mark_dirty(rt5659->regmap);
rt5659           3721 sound/soc/codecs/rt5659.c 	struct rt5659_priv *rt5659 = snd_soc_component_get_drvdata(component);
rt5659           3723 sound/soc/codecs/rt5659.c 	regcache_cache_only(rt5659->regmap, false);
rt5659           3724 sound/soc/codecs/rt5659.c 	regcache_sync(rt5659->regmap);
rt5659           3842 sound/soc/codecs/rt5659.c static int rt5659_parse_dt(struct rt5659_priv *rt5659, struct device *dev)
rt5659           3844 sound/soc/codecs/rt5659.c 	rt5659->pdata.in1_diff = device_property_read_bool(dev,
rt5659           3846 sound/soc/codecs/rt5659.c 	rt5659->pdata.in3_diff = device_property_read_bool(dev,
rt5659           3848 sound/soc/codecs/rt5659.c 	rt5659->pdata.in4_diff = device_property_read_bool(dev,
rt5659           3853 sound/soc/codecs/rt5659.c 		&rt5659->pdata.dmic1_data_pin);
rt5659           3855 sound/soc/codecs/rt5659.c 		&rt5659->pdata.dmic2_data_pin);
rt5659           3857 sound/soc/codecs/rt5659.c 		&rt5659->pdata.jd_src);
rt5659           3862 sound/soc/codecs/rt5659.c static void rt5659_calibrate(struct rt5659_priv *rt5659)
rt5659           3868 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_BIAS_CUR_CTRL_8, 0xa502);
rt5659           3869 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_CHOP_DAC, 0x3030);
rt5659           3871 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_PRE_DIV_1, 0xef00);
rt5659           3872 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_PRE_DIV_2, 0xeffc);
rt5659           3873 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_MICBIAS_2, 0x0280);
rt5659           3874 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_DIG_MISC, 0x0001);
rt5659           3875 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_GLB_CLK, 0x8000);
rt5659           3877 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_PWR_ANLG_1, 0xaa7e);
rt5659           3879 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_PWR_ANLG_1, 0xfe7e);
rt5659           3881 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_PWR_ANLG_3, 0x0004);
rt5659           3882 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_PWR_DIG_2, 0x0400);
rt5659           3884 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_PWR_DIG_1, 0x0080);
rt5659           3886 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_DEPOP_1, 0x0009);
rt5659           3888 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_PWR_DIG_1, 0x0f80);
rt5659           3890 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_HP_CHARGE_PUMP_1, 0x0e16);
rt5659           3894 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_CAL_REC, 0x0505);
rt5659           3896 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_PWR_ANLG_3, 0x0184);
rt5659           3897 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_CALIB_ADC_CTRL, 0x3c05);
rt5659           3898 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_HP_CALIB_CTRL_2, 0x20c1);
rt5659           3901 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_HP_CALIB_CTRL_2, 0x2cc1);
rt5659           3902 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_HP_CALIB_CTRL_1, 0x5100);
rt5659           3903 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_HP_CALIB_CTRL_7, 0x0014);
rt5659           3904 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_HP_CALIB_CTRL_1, 0xd100);
rt5659           3908 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_HP_CALIB_CTRL_2, 0x2cc1);
rt5659           3909 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_HP_CALIB_CTRL_1, 0x4900);
rt5659           3910 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_HP_CALIB_CTRL_7, 0x0016);
rt5659           3911 sound/soc/codecs/rt5659.c 	regmap_update_bits(rt5659->regmap, RT5659_HP_CALIB_CTRL_1,
rt5659           3916 sound/soc/codecs/rt5659.c 		regmap_read(rt5659->regmap, RT5659_HP_CALIB_CTRL_1, &value);
rt5659           3923 sound/soc/codecs/rt5659.c 			dev_err(rt5659->component->dev,
rt5659           3932 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_HP_CALIB_CTRL_2, 0x2cc1);
rt5659           3933 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_HP_VOL, 0x0000);
rt5659           3934 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_HP_CALIB_CTRL_1, 0x4500);
rt5659           3935 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_HP_CALIB_CTRL_7, 0x001f);
rt5659           3936 sound/soc/codecs/rt5659.c 	regmap_update_bits(rt5659->regmap, RT5659_HP_CALIB_CTRL_1,
rt5659           3941 sound/soc/codecs/rt5659.c 		regmap_read(rt5659->regmap, RT5659_HP_CALIB_CTRL_1, &value);
rt5659           3948 sound/soc/codecs/rt5659.c 			dev_err(rt5659->component->dev,
rt5659           3956 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_HP_CALIB_CTRL_7, 0x0000);
rt5659           3957 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_HP_CALIB_CTRL_2, 0x20c0);
rt5659           3961 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_CLASSD_0, 0x2021);
rt5659           3962 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_CLASSD_CTRL_1, 0x0260);
rt5659           3963 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_PWR_MIXER, 0x3000);
rt5659           3964 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_PWR_VOL, 0xc000);
rt5659           3965 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_A_DAC_MUX, 0x000c);
rt5659           3966 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_DIG_MISC, 0x8000);
rt5659           3967 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_SPO_VOL, 0x0808);
rt5659           3968 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_SPK_L_MIXER, 0x001e);
rt5659           3969 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_SPK_R_MIXER, 0x001e);
rt5659           3970 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_CLASSD_1, 0x0803);
rt5659           3971 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_CLASSD_2, 0x0554);
rt5659           3972 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_SPO_AMP_GAIN, 0x1103);
rt5659           3975 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_CAL_REC, 0x0909);
rt5659           3976 sound/soc/codecs/rt5659.c 	regmap_update_bits(rt5659->regmap, RT5659_HP_CALIB_CTRL_2, 0x0001,
rt5659           3980 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_SPK_DC_CAILB_CTRL_3, 0x0000);
rt5659           3981 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_CLASSD_0, 0x0021);
rt5659           3982 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_SPK_DC_CAILB_CTRL_1, 0x3e80);
rt5659           3983 sound/soc/codecs/rt5659.c 	regmap_update_bits(rt5659->regmap, RT5659_SPK_DC_CAILB_CTRL_1,
rt5659           3988 sound/soc/codecs/rt5659.c 		regmap_read(rt5659->regmap,
rt5659           3996 sound/soc/codecs/rt5659.c 			dev_err(rt5659->component->dev,
rt5659           4006 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_DIG_MISC, 0x0000);
rt5659           4007 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_MONOMIX_IN_GAIN, 0x021f);
rt5659           4008 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_MONO_OUT, 0x480a);
rt5659           4010 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_MONO_GAIN, 0x0003);
rt5659           4011 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_MONO_NG2_CTRL_5, 0x0009);
rt5659           4014 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_SPK_DC_CAILB_CTRL_3, 0x000f);
rt5659           4015 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_MONO_AMP_CALIB_CTRL_1, 0x1e00);
rt5659           4016 sound/soc/codecs/rt5659.c 	regmap_update_bits(rt5659->regmap, RT5659_MONO_AMP_CALIB_CTRL_1,
rt5659           4021 sound/soc/codecs/rt5659.c 		regmap_read(rt5659->regmap, RT5659_MONO_AMP_CALIB_CTRL_1,
rt5659           4029 sound/soc/codecs/rt5659.c 			dev_err(rt5659->component->dev,
rt5659           4037 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_SPK_DC_CAILB_CTRL_3, 0x0003);
rt5659           4041 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_CAL_REC, 0x0808);
rt5659           4042 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_PWR_ANLG_3, 0x0000);
rt5659           4043 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_CALIB_ADC_CTRL, 0x2005);
rt5659           4044 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_HP_CALIB_CTRL_2, 0x20c0);
rt5659           4045 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_DEPOP_1, 0x0000);
rt5659           4046 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_CLASSD_1, 0x0011);
rt5659           4047 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_CLASSD_2, 0x0150);
rt5659           4048 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_PWR_ANLG_1, 0xfe3e);
rt5659           4049 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_MONO_OUT, 0xc80a);
rt5659           4050 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_MONO_AMP_CALIB_CTRL_1, 0x1e04);
rt5659           4051 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_PWR_MIXER, 0x0000);
rt5659           4052 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_PWR_VOL, 0x0000);
rt5659           4053 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_PWR_DIG_1, 0x0000);
rt5659           4054 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_PWR_DIG_2, 0x0000);
rt5659           4055 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_PWR_ANLG_1, 0x003e);
rt5659           4056 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_CLASSD_CTRL_1, 0x0060);
rt5659           4057 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_CLASSD_0, 0x2021);
rt5659           4058 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_GLB_CLK, 0x0000);
rt5659           4059 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_MICBIAS_2, 0x0080);
rt5659           4060 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_HP_VOL, 0x8080);
rt5659           4061 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_HP_CHARGE_PUMP_1, 0x0c16);
rt5659           4064 sound/soc/codecs/rt5659.c static void rt5659_intel_hd_header_probe_setup(struct rt5659_priv *rt5659)
rt5659           4068 sound/soc/codecs/rt5659.c 	regmap_read(rt5659->regmap, RT5659_GPIO_STA, &value);
rt5659           4070 sound/soc/codecs/rt5659.c 		rt5659->hda_hp_plugged = true;
rt5659           4071 sound/soc/codecs/rt5659.c 		regmap_update_bits(rt5659->regmap, RT5659_IRQ_CTRL_1,
rt5659           4074 sound/soc/codecs/rt5659.c 		regmap_update_bits(rt5659->regmap, RT5659_IRQ_CTRL_1,
rt5659           4078 sound/soc/codecs/rt5659.c 	regmap_update_bits(rt5659->regmap, RT5659_PWR_ANLG_1,
rt5659           4082 sound/soc/codecs/rt5659.c 	regmap_update_bits(rt5659->regmap, RT5659_PWR_ANLG_1,
rt5659           4085 sound/soc/codecs/rt5659.c 	regmap_update_bits(rt5659->regmap, RT5659_PWR_ANLG_3, RT5659_PWR_LDO2,
rt5659           4087 sound/soc/codecs/rt5659.c 	regmap_update_bits(rt5659->regmap, RT5659_PWR_ANLG_2, RT5659_PWR_MB1,
rt5659           4089 sound/soc/codecs/rt5659.c 	regmap_update_bits(rt5659->regmap, RT5659_PWR_VOL, RT5659_PWR_MIC_DET,
rt5659           4093 sound/soc/codecs/rt5659.c 	regmap_update_bits(rt5659->regmap, RT5659_4BTN_IL_CMD_2,
rt5659           4095 sound/soc/codecs/rt5659.c 	regmap_read(rt5659->regmap, RT5659_4BTN_IL_CMD_1, &value);
rt5659           4096 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_4BTN_IL_CMD_1, value);
rt5659           4097 sound/soc/codecs/rt5659.c 	regmap_read(rt5659->regmap, RT5659_4BTN_IL_CMD_1, &value);
rt5659           4100 sound/soc/codecs/rt5659.c 		rt5659->hda_mic_plugged = true;
rt5659           4101 sound/soc/codecs/rt5659.c 		regmap_update_bits(rt5659->regmap, RT5659_IRQ_CTRL_2,
rt5659           4104 sound/soc/codecs/rt5659.c 		regmap_update_bits(rt5659->regmap, RT5659_IRQ_CTRL_2,
rt5659           4108 sound/soc/codecs/rt5659.c 	regmap_update_bits(rt5659->regmap, RT5659_IRQ_CTRL_2,
rt5659           4116 sound/soc/codecs/rt5659.c 	struct rt5659_priv *rt5659;
rt5659           4120 sound/soc/codecs/rt5659.c 	rt5659 = devm_kzalloc(&i2c->dev, sizeof(struct rt5659_priv),
rt5659           4123 sound/soc/codecs/rt5659.c 	if (rt5659 == NULL)
rt5659           4126 sound/soc/codecs/rt5659.c 	i2c_set_clientdata(i2c, rt5659);
rt5659           4129 sound/soc/codecs/rt5659.c 		rt5659->pdata = *pdata;
rt5659           4131 sound/soc/codecs/rt5659.c 		rt5659_parse_dt(rt5659, &i2c->dev);
rt5659           4133 sound/soc/codecs/rt5659.c 	rt5659->gpiod_ldo1_en = devm_gpiod_get_optional(&i2c->dev, "ldo1-en",
rt5659           4135 sound/soc/codecs/rt5659.c 	if (IS_ERR(rt5659->gpiod_ldo1_en))
rt5659           4138 sound/soc/codecs/rt5659.c 	rt5659->gpiod_reset = devm_gpiod_get_optional(&i2c->dev, "reset",
rt5659           4144 sound/soc/codecs/rt5659.c 	rt5659->regmap = devm_regmap_init_i2c(i2c, &rt5659_regmap);
rt5659           4145 sound/soc/codecs/rt5659.c 	if (IS_ERR(rt5659->regmap)) {
rt5659           4146 sound/soc/codecs/rt5659.c 		ret = PTR_ERR(rt5659->regmap);
rt5659           4152 sound/soc/codecs/rt5659.c 	regmap_read(rt5659->regmap, RT5659_DEVICE_ID, &val);
rt5659           4159 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_RESET, 0);
rt5659           4162 sound/soc/codecs/rt5659.c 	rt5659->mclk = devm_clk_get(&i2c->dev, "mclk");
rt5659           4163 sound/soc/codecs/rt5659.c 	if (IS_ERR(rt5659->mclk)) {
rt5659           4164 sound/soc/codecs/rt5659.c 		if (PTR_ERR(rt5659->mclk) != -ENOENT)
rt5659           4165 sound/soc/codecs/rt5659.c 			return PTR_ERR(rt5659->mclk);
rt5659           4167 sound/soc/codecs/rt5659.c 		rt5659->mclk = NULL;
rt5659           4170 sound/soc/codecs/rt5659.c 	rt5659_calibrate(rt5659);
rt5659           4173 sound/soc/codecs/rt5659.c 	if (rt5659->pdata.in1_diff)
rt5659           4174 sound/soc/codecs/rt5659.c 		regmap_update_bits(rt5659->regmap, RT5659_IN1_IN2,
rt5659           4176 sound/soc/codecs/rt5659.c 	if (rt5659->pdata.in3_diff)
rt5659           4177 sound/soc/codecs/rt5659.c 		regmap_update_bits(rt5659->regmap, RT5659_IN3_IN4,
rt5659           4179 sound/soc/codecs/rt5659.c 	if (rt5659->pdata.in4_diff)
rt5659           4180 sound/soc/codecs/rt5659.c 		regmap_update_bits(rt5659->regmap, RT5659_IN3_IN4,
rt5659           4184 sound/soc/codecs/rt5659.c 	if (rt5659->pdata.dmic1_data_pin != RT5659_DMIC1_NULL ||
rt5659           4185 sound/soc/codecs/rt5659.c 		rt5659->pdata.dmic2_data_pin != RT5659_DMIC2_NULL) {
rt5659           4186 sound/soc/codecs/rt5659.c 		regmap_update_bits(rt5659->regmap, RT5659_GPIO_CTRL_1,
rt5659           4189 sound/soc/codecs/rt5659.c 		switch (rt5659->pdata.dmic1_data_pin) {
rt5659           4191 sound/soc/codecs/rt5659.c 			regmap_update_bits(rt5659->regmap, RT5659_DMIC_CTRL_1,
rt5659           4196 sound/soc/codecs/rt5659.c 			regmap_update_bits(rt5659->regmap,
rt5659           4200 sound/soc/codecs/rt5659.c 			regmap_update_bits(rt5659->regmap, RT5659_DMIC_CTRL_1,
rt5659           4202 sound/soc/codecs/rt5659.c 			regmap_update_bits(rt5659->regmap, RT5659_GPIO_CTRL_1,
rt5659           4207 sound/soc/codecs/rt5659.c 			regmap_update_bits(rt5659->regmap, RT5659_DMIC_CTRL_1,
rt5659           4209 sound/soc/codecs/rt5659.c 			regmap_update_bits(rt5659->regmap, RT5659_GPIO_CTRL_1,
rt5659           4214 sound/soc/codecs/rt5659.c 			regmap_update_bits(rt5659->regmap, RT5659_DMIC_CTRL_1,
rt5659           4216 sound/soc/codecs/rt5659.c 			regmap_update_bits(rt5659->regmap, RT5659_GPIO_CTRL_1,
rt5659           4226 sound/soc/codecs/rt5659.c 		switch (rt5659->pdata.dmic2_data_pin) {
rt5659           4228 sound/soc/codecs/rt5659.c 			regmap_update_bits(rt5659->regmap,
rt5659           4235 sound/soc/codecs/rt5659.c 			regmap_update_bits(rt5659->regmap,
rt5659           4239 sound/soc/codecs/rt5659.c 			regmap_update_bits(rt5659->regmap,
rt5659           4246 sound/soc/codecs/rt5659.c 			regmap_update_bits(rt5659->regmap,
rt5659           4250 sound/soc/codecs/rt5659.c 			regmap_update_bits(rt5659->regmap,
rt5659           4257 sound/soc/codecs/rt5659.c 			regmap_update_bits(rt5659->regmap,
rt5659           4261 sound/soc/codecs/rt5659.c 			regmap_update_bits(rt5659->regmap,
rt5659           4273 sound/soc/codecs/rt5659.c 		regmap_update_bits(rt5659->regmap, RT5659_GPIO_CTRL_1,
rt5659           4282 sound/soc/codecs/rt5659.c 		regmap_update_bits(rt5659->regmap, RT5659_DMIC_CTRL_1,
rt5659           4287 sound/soc/codecs/rt5659.c 	switch (rt5659->pdata.jd_src) {
rt5659           4289 sound/soc/codecs/rt5659.c 		regmap_write(rt5659->regmap, RT5659_EJD_CTRL_1, 0xa880);
rt5659           4290 sound/soc/codecs/rt5659.c 		regmap_write(rt5659->regmap, RT5659_RC_CLK_CTRL, 0x9000);
rt5659           4291 sound/soc/codecs/rt5659.c 		regmap_write(rt5659->regmap, RT5659_GPIO_CTRL_1, 0xc800);
rt5659           4292 sound/soc/codecs/rt5659.c 		regmap_update_bits(rt5659->regmap, RT5659_PWR_ANLG_1,
rt5659           4294 sound/soc/codecs/rt5659.c 		regmap_write(rt5659->regmap, RT5659_PWR_ANLG_2, 0x0001);
rt5659           4295 sound/soc/codecs/rt5659.c 		regmap_write(rt5659->regmap, RT5659_IRQ_CTRL_2, 0x0040);
rt5659           4296 sound/soc/codecs/rt5659.c 		INIT_DELAYED_WORK(&rt5659->jack_detect_work,
rt5659           4300 sound/soc/codecs/rt5659.c 		regmap_write(rt5659->regmap, RT5659_GPIO_CTRL_3, 0x8000);
rt5659           4301 sound/soc/codecs/rt5659.c 		regmap_write(rt5659->regmap, RT5659_RC_CLK_CTRL, 0x0900);
rt5659           4302 sound/soc/codecs/rt5659.c 		regmap_write(rt5659->regmap, RT5659_EJD_CTRL_1,  0x70c0);
rt5659           4303 sound/soc/codecs/rt5659.c 		regmap_write(rt5659->regmap, RT5659_JD_CTRL_1,   0x2000);
rt5659           4304 sound/soc/codecs/rt5659.c 		regmap_write(rt5659->regmap, RT5659_IRQ_CTRL_1,  0x0040);
rt5659           4305 sound/soc/codecs/rt5659.c 		INIT_DELAYED_WORK(&rt5659->jack_detect_work,
rt5659           4307 sound/soc/codecs/rt5659.c 		rt5659_intel_hd_header_probe_setup(rt5659);
rt5659           4316 sound/soc/codecs/rt5659.c 			| IRQF_ONESHOT, "rt5659", rt5659);
rt5659           4321 sound/soc/codecs/rt5659.c 		regmap_update_bits(rt5659->regmap, RT5659_GPIO_CTRL_1,
rt5659           4332 sound/soc/codecs/rt5659.c 	struct rt5659_priv *rt5659 = i2c_get_clientdata(client);
rt5659           4334 sound/soc/codecs/rt5659.c 	regmap_write(rt5659->regmap, RT5659_RESET, 0);