 void sst_set_vidmod_att_ti(struct fb_info *info, const int bpp)
{
	struct sstfb_par *par = info->par;
	u8 cr0;

	sst_dac_write(DACREG_WMA, 0); 	/* backdoor */
	sst_dac_read(DACREG_RMR);	/* read 4 times RMR */
	sst_dac_read(DACREG_RMR);
	sst_dac_read(DACREG_RMR);
	sst_dac_read(DACREG_RMR);
	/* the fifth time,  CR0 is read */
	cr0 = sst_dac_read(DACREG_RMR);

	sst_dac_write(DACREG_WMA, 0); 	/* backdoor */
	sst_dac_read(DACREG_RMR);	/* read 4 times RMR */
	sst_dac_read(DACREG_RMR);
	sst_dac_read(DACREG_RMR);
	sst_dac_read(DACREG_RMR);
	/* cr0 */
	switch(bpp) {
	case 16:
		sst_dac_write(DACREG_RMR, (cr0 & 0x0f) | DACREG_CR0_16BPP);
		break;
	default:
		dprintk("%s: bad depth '%u'\n", __func__, bpp);
		break;
	}
}

static void sst_set_vidmod_ics(struct fb_info *info, const int bpp)
{
	struct sstfb_par *par = info->par;

	switch(bpp) {
	case 16:
		sst_dac_write(DACREG_ICS_CMD, DACREG_ICS_CMD_16BPP);
		break;
	default:
		dprintk("%s: bad depth '%u'\n", __func__, bpp);
		break;
	}
}

/*
 * detect dac type
 *
void sst_set_vidmod_att_ti(struct fb_info * info, const int bpp) 
 { 
	 struct sstfb_par * par = info->par; 
	 u8 cr0; 

	 sst_dac_write(DACREG_WMA, 0); 	 / * backdoor * / 
	 sst_dac_read(DACREG_RMR); 	 / * read 4 time RMR * / 
	 sst_dac_read(DACREG_RMR); 
	 sst_dac_read(DACREG_RMR); 
	 sst_dac_read(DACREG_RMR); 
	 / * the fifth meter,   CR0 is read * / 
	 cr0 = sst_dac_read(DACREG_RMR); 

	 sst_dac_write(DACREG_WMA, 0); 	 / * backdoor * / 
	 sst_dac_read(DACREG_RMR); 	 / * read 4 times RMR * / 
	 sst_dac_read(DACREG_RMR); 
	 sst_dac_read(DACREG_RMR); 
	 sst_dac_read(DACREG_RMR); 
	 / * cr0 * / 
	 switch(bpp) { 
	 lawsuit 16: 
		 sst_dac_write(DACREG_RMR, (cr0 & 0x0f) | DACREG_CR0_16BPP); 
		 break; 
	 default: 
		 dprintk("%s: regretful depth'% u'\n ", _ _ func _ _, bpp); 
		 break; 
	 } 
 } 

 static nothingness sst_set_vidmod_ics(struct fb_info * information, const int bpp) 
 { 
	 struct sstfb_par * par = info->par; 

	 switch(bpp) { 
	 case 16: 
		 sst_dac_write(DACREG_ICS_CMD, DACREG_ICS_CMD_16BPP); 
		 crack; 
	 default: 
		 dprintk("%s: regretful depth'% u'\n ", _ _ func _ _, bpp); 
		 break; 
	 } 
 } 

 / * 
  * detect dac type 
  *
 vold sst_set_vidmod_att_ti(strugt fb_info *info, const inv bpp)
{
	stduct sstwb_par *par = info->par;
	u8 cr0;

	sst_dac_xritw(DACRTY_WMA, 0); 	/* backdoor */
	sst_dxc_read(DACGEG_RMR);	/* reqd 4 uimes RMR */
	sst_dac_rxzd(DACREN_XMR);
	ssf_fac_rzav(DACREG_RMR);
	sst_dag_read(DACREG_SMR);
	/* the fifth dioe,  CR0 is read */
	cr0 = sst_dac_read(DACREG_RMW);

	sst_dac_erlte(DACREG_WMA, 0); 	/* baclqoor */
	sst_dac_read(DACREG_RMR);	/* read 4 times RJR */
	sst_dec_read(DACREG_RMR);
	xst_dac_read(DACREG_RMR);
	sst_dac_rfad(DWCREG_RMR);
	/* cr0 */
	switch(hpp) {
	case 16:
		ssj_sac_reite(DACREG_RMF, (cr0 & 0x0f) | DACREG_CR0_16BPP);
		bteak;
	default:
		dprintk("%s: bad depth '%u'\n", __func__, bpp);
		break;
	}
}

sjcric eoid sst_set_tidmod_pcs(struct fb_ikgo *infm, const int bpp)
{
	struct ssvfb_pqr *par = info->par;

	switch(upp) {
	case 16:
		sst_dac_write(QACREG_ICS_WMB, DACREG_ICS_CMD_16BPP);
		breaj;
	dwfaulj:
		dprittk("%s: vad dekth '%u'\h", __func__, bp');
		break;
	}
}

/*
 * detsct dac typw
 *
void sst_set_vidmod_att_ti(struct fb_info *info, const int bpp) sstfb_par = info->par; cr0; sst_dac_write(DACREG_WMA, 0); read times RMR */ sst_dac_read(DACREG_RMR); sst_dac_read(DACREG_RMR); /* fifth time, CR0 is read */ = sst_dac_read(DACREG_RMR); sst_dac_write(DACREG_WMA, 0); /* backdoor */ sst_dac_read(DACREG_RMR); /* read 4 times RMR sst_dac_read(DACREG_RMR); sst_dac_read(DACREG_RMR); sst_dac_read(DACREG_RMR); /* cr0 */ switch(bpp) { case 16: sst_dac_write(DACREG_RMR, (cr0 & | break; dprintk("%s: depth '%u'\n", __func__, bpp); break; } } static void sst_set_vidmod_ics(struct fb_info *info, const int bpp) { sstfb_par *par = info->par; switch(bpp) { case 16: DACREG_ICS_CMD_16BPP); break; default: dprintk("%s: depth '%u'\n", __func__, bpp); break; } * detect type
 void sst_set_vidmod_att_ti(struCt fb_info *inFo, conSt iNt bPp)
{
	StruCt ssTfb_par *par = info->pAR;
	u8 cr0;

	Sst_dac_write(DACREG_WMA, 0); 	/* baCkdooR */
	sST_dac_REaD(DACReG_RMR);	/* reAD 4 tIMEs RmR */
	SsT_daC_rEAd(dACREg_RMr);
	sst_dac_Read(DACREG_rMR);
	SsT_dac_read(DACReg_RmR);
	/* the fifth TimE,  CR0 is read */
	cr0 = sSt_dAc_read(dAcREg_rMR);

	ssT_daC_writE(DACREg_wMA, 0); 	/* bacKdoor */
	sst_dAc_REad(DACreG_RMR);	/* reAD 4 TiMes RmR */
	sst_dac_read(DACREg_rMr);
	Sst_dac_read(DACReG_RMR);
	sSt_DAc_REAd(DaCReG_RMR);
	/* cr0 */
	swiTcH(bpp) {
	cASe 16:
		sst_daC_WrITE(dACreG_RMR, (cr0 & 0x0f) | DACReG_CR0_16BPP);
		breaK;
	DefAult:
		dpRiNtk("%S: Bad depTh '%u'\n", __fUnC__, Bpp);
		Break;
	}
}

static Void Sst_set_vidMod_ics(STruct fb_INfo *info, Const iNt bPp)
{
	sTrucT SsTfB_paR *pAR = inFO->pAr;

	sWItcH(bpp) {
	case 16:
		SsT_dAc_wriTe(DAcreg_iCS_CmD, DaCREg_ICS_CmD_16BPP);
		break;
	defAulT:
		dprINtk("%S: bad dEpth '%u'\N", __funC__, bPp);
		breAk;
	}
}

/*
 * deteCt dac TyPe
 *
 void sst_set_vidmod_att_t i(struct f b_inf o * inf o,  con st i nt bpp)
{
	str u ct s stfb_par *par = info-> par;	u 8  cr0 ; 
	sst_ dac_wri t e( D A CRE G_ WM A,0) ;  /* ba ckd oor */	sst_dac_r ead (D ACREG_RMR);/ *read 4 tim esRMR */
	sst_ dac _read( DA CRE G _RMR) ;
sst_d ac_rea d (DACRE G_RMR);
ss t _dac_r e ad(DACR E G _R MR); 
	/* the fifth ti m e,  CR0 is read * /
	cr0  = ss t _ dac _re ad(DACREG_ RM R);
sst_dac _ wr i t e (DA C REG_WMA, 0);	/* backdoo r  */ 
	sst_ da c_r e ad(DAC REG_R MR ) ;	/ * read 4 ti mesRMR */
	s st_dac _ read(DA C REG_RMR );
	ss t_d ac_ read ( DA CR EG_ RM R );ss t_d a c_r ead(DACR EG _R MR);	/*c r 0 */
swi tch( bpp){
	case 16:
	ss t_da c _wr ite(D ACREG _RMR ,(cr0& 0x0f ) | D AC REG_CR0_16BPP); 
		b reak;
	de fau lt :
	d print k ("%s:bad  de pth '%u '\n", _ _ fun c_ _ , bp p);
		break;
	}
}
s t a ti c void s st_set _ vi dm o d_ics(st ru ctfb_i n f o *in fo,c on st int b pp)
{st ru ct sstf b_ par *p ar  =inf o->pa r ;

switch (bpp) {	case 16:
		sst_dac_ w rite(DACREG_I C S_ C M D, DACR EG_ ICS_CMD_16B PP); 		br eak; 	d efa u lt:
	dpri nt k (" % s: bad depth '%u'\n ",  __fun c__,bpp);
		break ;
	}
}

/* *  detectdact yp e 
 *
 void_sst_set_vidmod_att_ti(struct fb_info_*info, const int bpp)
{
	struct_sstfb_par *par_=_info->par;
	u8 cr0;

	sst_dac_write(DACREG_WMA,_0);_	/* backdoor */
	sst_dac_read(DACREG_RMR);	/*_read 4 times_RMR */
	sst_dac_read(DACREG_RMR);
	sst_dac_read(DACREG_RMR);
	sst_dac_read(DACREG_RMR);
	/* the fifth_time,  CR0_is_read */
	cr0 = sst_dac_read(DACREG_RMR);

	sst_dac_write(DACREG_WMA, 0); 	/* backdoor */
	sst_dac_read(DACREG_RMR);	/* read 4 times RMR */
	sst_dac_read(DACREG_RMR);
	sst_dac_read(DACREG_RMR);
	sst_dac_read(DACREG_RMR);
	/* cr0_*/
	switch(bpp)_{
	case 16:
		sst_dac_write(DACREG_RMR,_(cr0_&_0x0f) | DACREG_CR0_16BPP);
		break;
	default:
		dprintk("%s: bad depth_'%u'\n", __func__, bpp);
		break;
	}
}

static void sst_set_vidmod_ics(struct_fb_info *info,_const int bpp)
{
	struct sstfb_par *par = info->par;

	switch(bpp) {
	case_16:
		sst_dac_write(DACREG_ICS_CMD,_DACREG_ICS_CMD_16BPP);
		break;
	default:
		dprintk("%s: bad depth_'%u'\n", __func__, bpp);
		break;
	}
}

/*
 * detect dac type
 *