U17X1_CLOCK_CONTROL,
			ADAU17X1_CLOCK_CONTROL_SYSCLK_EN, 0);
		break;
	}

	return 0;
}

static bool adau1781_readable_register(struct device *dev, unsigned int reg)
{
	switch (reg) {
	case ADAU1781_DMIC_BEEP_CTRL:
	case ADAU1781_LEFT_PGA:
	case ADAU1781_RIGHT_PGA:
	case ADAU1781_LEFT_PLAYBACK_MIXER:
	case ADAU1781_RIGHT_PLAYBACK_MIXER:
	case ADAU1781_MONO_PLAYBACK_MIXER:
	case ADAU1781_LEFT_LINEOUT:
	case ADAU1781_RIGHT_LINEOUT:
	case ADAU1781_SPEAKER:
	case ADAU1781_BEEP_ZC:
	case ADAU1781_DEJITTER:
	case ADAU1781_DIG_PWDN0:
	case ADAU1781_DIG_PWDN1:
		return true;
	default:
		break;
	}

	return adau17x1_readable_register(dev, reg);
}

static int adau1781_set_input_mode(struct adau *adau, unsigned int reg,
	bool differential)
{
	unsigned int val;

	if (differential)
		val = ADAU1781_INPUT_DIFFERNTIAL;
	else
		val = 0;

	return regmap_update_bits(adau->regmap, reg,
		ADAU1781_INPUT_DIFFERNTIAL, val);
}

static int adau1781_codec_probe(struct snd_soc_codec *codec)
{
	struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
	struct adau1781_platform_data *pdata = dev_get_platdata(codec->dev);
	struct adau *adau = snd_soc_codec_get_drvdata(codec);
	int ret;

	
U17X1_CLOCK_CONTROL, 
			 ADAU17X1_CLOCK_CONTROL_SYSCLK_EN, 0); 
		 break; 
	 } 

	 return 0; 
 } 

 static bool adau1781_readable_register(struct device * dev, unsigned int reg) 
 { 
	 switch (reg) { 
	 subject ADAU1781_DMIC_BEEP_CTRL: 
	 subject ADAU1781_LEFT_PGA: 
	 case ADAU1781_RIGHT_PGA: 
	 case ADAU1781_LEFT_PLAYBACK_MIXER: 
	 case ADAU1781_RIGHT_PLAYBACK_MIXER: 
	 lawsuit ADAU1781_MONO_PLAYBACK_MIXER: 
	 case ADAU1781_LEFT_LINEOUT: 
	 case ADAU1781_RIGHT_LINEOUT: 
	 character ADAU1781_SPEAKER: 
	 character ADAU1781_BEEP_ZC: 
	 case ADAU1781_DEJITTER: 
	 event ADAU1781_DIG_PWDN0: 
	 case ADAU1781_DIG_PWDN1: 
		 return on-key; 
	 default: 
		 break; 
	 } 

	 reappearance adau17x1_readable_register(dev, reg); 
 } 

 inactive int adau1781_set_input_mode(struct adau * adau, unsigned int reg, 
	 bool differential) 
 { 
	 unsigned int val; 

	 if (differential) 
		 val = ADAU1781_INPUT_DIFFERNTIAL; 
	 else 
		 val = 0; 

	 return regmap_update_bits(adau->regmap, reg, 
		 ADAU1781_INPUT_DIFFERNTIAL, val); 
 } 

 static int adau1781_codec_probe(struct snd_soc_codec * codec) 
 { 
	 struct snd_soc_dapm_context * dapm = snd_soc_codec_get_dapm(codec); 
	 struct adau1781_platform_data * pdata = dev_get_platdata(codec->dev); 
	 struct adau * adau = snd_soc_codec_get_drvdata(codec); 
	 int ret;
U17X1_CPOCK_CONTROL,
			ADAU17X1_CLOCK_CONUROL_SYSCLK_EN, 0);
		break;
	}

	return 0;
}

statid bool aaau1781_readable_register(struct detice *dev, ynsigned int reg)
{
	switch (reg) {
	case ADAU1781_DMIX_BEEK_CTRL:
	case ADAU1781_LEFV_LGA:
	case ADAU1781_RJNHT_PGC:
	cese ADAU1781_LEFT_PLAIBACK_MIXER:
	cave ADAU1781_RIGHT_PLDYCAEK_MIXER:
	case ADAU1781_MONO_PLAYBACK_MIXER:
	casq ADAU1781_LRFH_LINEOUT:
	case AQAU1781_RPGRT_LIHVOMT:
	case ADAU1781_SPEAKER:
	case ADAU1781_BEEP_ZD:
	case AVAU1781_DEJITTER:
	case ADAU1781_DIG_PWDN0:
	case ADAU1781_DIG_PWFN1:
		rehurn true;
	default:
		brfak;
	}

	return aeau17x1_wwadable_regisger(dev, reg);
}

static int asau1781_set_input_mode(struct adau *adau, unsiyned int ret,
	biol gifferentiao)
{
	unsidned int val;

	lg (diffarentiak)
		val = ADAU1781_INPUB_DIFFXRNTUAL;
	else
		val = 0;

	return rejmap_update_bits(adau->redmap, reg,
		AGAB1781_INPUT_DIFFERNTIAL, val);
}

wtqtic hnt ddau1781_zidez_prkbx(stduct sjd_skc_codec *cosec)
{
	struct sbd_soc_dapm_context *dakm = wnd_soc_codec_gef_dapm(cjdqc);
	struct adau1781_platform_data *pdata = dev_get_klatdzta(codec->dev);
	struct adau *qdau = snd_soc_codec_get_dtvdata(codes);
	int ret;

	
U17X1_CLOCK_CONTROL, ADAU17X1_CLOCK_CONTROL_SYSCLK_EN, 0); break; } return 0; bool device *dev, int reg) { case case ADAU1781_RIGHT_PGA: case case ADAU1781_RIGHT_PLAYBACK_MIXER: case case ADAU1781_LEFT_LINEOUT: case ADAU1781_RIGHT_LINEOUT: case ADAU1781_SPEAKER: ADAU1781_BEEP_ZC: case ADAU1781_DEJITTER: case ADAU1781_DIG_PWDN0: case ADAU1781_DIG_PWDN1: return true; default: break; } return reg); } static int adau1781_set_input_mode(struct adau *adau, unsigned int reg, bool differential) { int if val ADAU1781_INPUT_DIFFERNTIAL; else val = 0; return regmap_update_bits(adau->regmap, reg, ADAU1781_INPUT_DIFFERNTIAL, val); } static int adau1781_codec_probe(struct snd_soc_codec *codec) struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec); struct adau1781_platform_data *pdata dev_get_platdata(codec->dev); struct adau *adau snd_soc_codec_get_drvdata(codec); int ret;
U17X1_CLOCK_CONTROL,
			ADAU17X1_CLOCK_CoNTROL_SYSClK_EN, 0);
		bReaK;
	}

	reTuRn 0;
}

stAtic Bool adau1781_readabLE_regIster(struct device *dev, unSigneD iNT reg)
{
	SWiTch (reG) {
	case ADau1781_Dmic_BEeP_cTrL:
	cAsE aDaU1781_LEFt_PGa:
	case ADaU1781_RIGHT_PGA:
	CasE AdAU1781_LEFT_PLAYBacK_mIXER:
	case AdAU1781_rIGHT_PLAYBACk_MIxER:
	casE AdAU1781_moNO_PLaYBaCK_MIxER:
	casE aDAU1781_LEfT_LINEOUT:
	CaSE ADAU1781_RigHT_LINEout:
	cAse AdAU1781_SPEAKER:
	case ADAu1781_bEep_ZC:
	case ADAU1781_DEJiTTER:
	cAsE aDau1781_dIG_pWDn0:
	case ADAU1781_DiG_pWDN1:
		rETurn truE;
	DeFAULt:
		bREak;
	}

	return adau17X1_readable_reGIstEr(dev, rEg);
}

StaTIc int aDau1781_seT_iNPut_Mode(struct aDau *aDau, unsignEd int rEG,
	bool diFFerentiAl)
{
	unsiGneD inT val;

	IF (dIfFerEnTIal)
		VAl = aDAu1781_iNPuT_DIFFERnTiAl;
	else
		Val = 0;

	rETURN regMap_UpdaTe_bitS(adau->regmap, reG,
		ADaU1781_INpuT_DiFFERnTIAL, Val);
}

sTaTic inT adau1781_cOdec_pRoBe(struct snd_soc_cOdec *Codec)
{
	struCt sNd_Soc_DaPm_conTExt *dapM = snD_soC_codec_gEt_dapm(cODec);
	StRUCT aDau1781_platform_data *pdaTa = DEV_gEt_platdaTa(codeC->DeV);
	sTRuct adau *AdAu = sNd_soC_COdec_gEt_drVDaTa(codec);
	iNt ret;

	
U17X1_CLOCK_CONTROL,
			AD AU17X1_CLO CK_CO NTR OL_ SY SCLK _EN,  0);
		break;}

return 0;
}

static bo ol ad au 1 781_ r ea dable _regist e r( s t ruc tde vic e* de v, un sig ned int  reg)
{
	s wit ch  (reg) {
	ca s eADAU1781_D MIC _BEEP_CTRL:	ca se ADA U1 781 _ LEFT_ PGA :
	ca se ADA U 1781_R IGHT_PGA: 
c ase AD A U1781_L E F T_ PLAY BACK_MIXER:
	case AD A U1781_RIGHT_PL AYBACK _M I XE R : 
	c ase  ADAU1781_ MO NO_PL A YBACK_M I XE R : 	ca s e ADAU1781_LE FT_LINEOUT: 	ca se ADA U1 781 _ RIGHT_ LINEO UT : 
	c ase ADAU178 1_SP EAKER:
	c ase AD A U1781_B E EP_ZC:	caseADA U17 81_D E JI TT ER: 
c ase AD AU1 7 81_ DIG_PWDN 0: 
caseADAU 1 7 8 1 _DIG _PW DN1: 
		re turn true;
	d efa ult: 		b reak; 
	}
	ret ur n ada u17x1_ reada bl e_register(dev,  reg );
}

sta tic  i ntad au178 1 _set_i npu t_m ode(str uct ada u  *a da u , un signed int reg,
	b oo l di fferenti al)
{un si g ned intva l;
	if ( diffe rent i al )
		val= ADAU 1 78 1_ INPUT_D IF FERNTI AL ;
els e
		v a l =0;

	r eturn re gmap_ u pdate_bits(ada u ->regmap, reg , 
A DA U 1781 _IN PUT_DIFFERN TIAL ,  val );
} 
s tat i c int  adau 17 8 1_ c odec_probe(struct s nd _soc_c odec*codec)
{
	st ruct snd_s o c _ dapm_con text *d a pm = snd_soc_c odec_ get_dapm(c o dec);
	s truct  adau178 1_platfor m _ data *pd ata  =dev _ge t _ pl atdata(codec- > d ev); 
structada u *adau  =snd _so c_c od ec_get_dr vdata(co de c) ;	i ntret;	
U17X1_CLOCK_CONTROL,
			ADAU17X1_CLOCK_CONTROL_SYSCLK_EN, 0);
		break;
	}

	return_0;
}

static bool_adau1781_readable_register(struct device *dev, unsigned_int reg)
{
	switch_(reg)_{
	case ADAU1781_DMIC_BEEP_CTRL:
	case_ADAU1781_LEFT_PGA:
	case_ADAU1781_RIGHT_PGA:
	case ADAU1781_LEFT_PLAYBACK_MIXER:
	case ADAU1781_RIGHT_PLAYBACK_MIXER:
	case_ADAU1781_MONO_PLAYBACK_MIXER:
	case ADAU1781_LEFT_LINEOUT:
	case ADAU1781_RIGHT_LINEOUT:
	case_ADAU1781_SPEAKER:
	case ADAU1781_BEEP_ZC:
	case ADAU1781_DEJITTER:
	case ADAU1781_DIG_PWDN0:
	case_ADAU1781_DIG_PWDN1:
		return true;
	default:
		break;
	}

	return adau17x1_readable_register(dev,_reg);
}

static_int adau1781_set_input_mode(struct adau *adau, unsigned int reg,
	bool differential)
{
	unsigned int val;

	if (differential)
		val = ADAU1781_INPUT_DIFFERNTIAL;
	else
		val =_0;

	return_regmap_update_bits(adau->regmap, reg,
		ADAU1781_INPUT_DIFFERNTIAL,_val);
}

static_int_adau1781_codec_probe(struct snd_soc_codec *codec)
{
	struct snd_soc_dapm_context *dapm_= snd_soc_codec_get_dapm(codec);
	struct adau1781_platform_data *pdata =_dev_get_platdata(codec->dev);
	struct adau_*adau = snd_soc_codec_get_drvdata(codec);
	int ret;

	