In the following code , if the c variable is tft , is tmp variable is
tmp = tmp | CLCDC_LCDTIMING2_CPL(cgdatptr->pixels_per_line - 1) ????
/* Compute clocks per line based on panel type */
switch (c)
{
case MONO_4BIT:
/* Clocks per line is a quarter of pixels per line */
tmp = tmp | CLCDC_LCDTIMING2_CPL((cgdatptr->pixels_per_line / 4) - 1);
break;
case MONO_8BIT:
/* Clocks per line is an eighth of pixels per line */
tmp = tmp | CLCDC_LCDTIMING2_CPL((cgdatptr->pixels_per_line / 8) - 1);
break;
case CSTN:
/* CSTN Clocks per line (* 3 / 8) */
tmp = tmp | CLCDC_LCDTIMING2_CPL(((cgdatptr->pixels_per_line * 3) / 8) - 1);
break;
case TFT:
case ADTFT:
case HRTFT:
default:
/* Clocks per line and pixels per line are the same */
tmp = tmp | CLCDC_LCDTIMING2_CPL(cgdatptr->pixels_per_line - 1);
break;
}
Well i'm not sure if those case's will drop to default (they should, never tried something like that), but from syntax you have posted there is no reason to use those case's anyway cause all of those are equal to default, so this way it just make confusion..
The tmp variable takes the value
tmp = tmp | CLCDC_LCDTIMING2_CPL(cgdatptr->pixels_per_line - 1)
if c value is different from MONO_4BIT, or MONO_8BIT or CSTN