diff options
Diffstat (limited to 'drivers/staging/fbtft/fb_ili9325.c')
-rw-r--r-- | drivers/staging/fbtft/fb_ili9325.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/drivers/staging/fbtft/fb_ili9325.c b/drivers/staging/fbtft/fb_ili9325.c index 5f88145fac9b..19d254e9a420 100644 --- a/drivers/staging/fbtft/fb_ili9325.c +++ b/drivers/staging/fbtft/fb_ili9325.c @@ -41,22 +41,22 @@ static unsigned bt = 6; /* VGL=Vci*4 , VGH=Vci*4 */ module_param(bt, uint, 0); MODULE_PARM_DESC(bt, "Sets the factor used in the step-up circuits"); -static unsigned vc = 0b011; /* Vci1=Vci*0.80 */ +static unsigned vc = 0x03; /* Vci1=Vci*0.80 */ module_param(vc, uint, 0); MODULE_PARM_DESC(vc, "Sets the ratio factor of Vci to generate the reference voltages Vci1"); -static unsigned vrh = 0b1101; /* VREG1OUT=Vci*1.85 */ +static unsigned vrh = 0x0d; /* VREG1OUT=Vci*1.85 */ module_param(vrh, uint, 0); MODULE_PARM_DESC(vrh, "Set the amplifying rate (1.6 ~ 1.9) of Vci applied to output the VREG1OUT"); -static unsigned vdv = 0b10010; /* VCOMH amplitude=VREG1OUT*0.98 */ +static unsigned vdv = 0x12; /* VCOMH amplitude=VREG1OUT*0.98 */ module_param(vdv, uint, 0); MODULE_PARM_DESC(vdv, "Select the factor of VREG1OUT to set the amplitude of Vcom"); -static unsigned vcm = 0b001010; /* VCOMH=VREG1OUT*0.735 */ +static unsigned vcm = 0x0a; /* VCOMH=VREG1OUT*0.735 */ module_param(vcm, uint, 0); MODULE_PARM_DESC(vcm, "Set the internal VcomH voltage"); @@ -108,11 +108,11 @@ static int init_display(struct fbtft_par *par) if (par->gpio.cs != -1) gpio_set_value(par->gpio.cs, 0); /* Activate chip */ - bt &= 0b111; - vc &= 0b111; - vrh &= 0b1111; - vdv &= 0b11111; - vcm &= 0b111111; + bt &= 0x07; + vc &= 0x07; + vrh &= 0x0f; + vdv &= 0x1f; + vcm &= 0x3f; /* Initialization sequence from ILI9325 Application Notes */ @@ -137,7 +137,7 @@ static int init_display(struct fbtft_par *par) write_reg(par, 0x0013, 0x0000); /* VDV[4:0] for VCOM amplitude */ mdelay(200); /* Dis-charge capacitor power voltage */ write_reg(par, 0x0010, /* SAP, BT[3:0], AP, DSTB, SLP, STB */ - (1 << 12) | (bt << 8) | (1 << 7) | (0b001 << 4)); + (1 << 12) | (bt << 8) | (1 << 7) | (0x01 << 4)); write_reg(par, 0x0011, 0x220 | vc); /* DC1[2:0], DC0[2:0], VC[2:0] */ mdelay(50); /* Delay 50ms */ write_reg(par, 0x0012, vrh); /* Internal reference voltage= Vci; */ @@ -233,10 +233,9 @@ static int set_var(struct fbtft_par *par) static int set_gamma(struct fbtft_par *par, unsigned long *curves) { unsigned long mask[] = { - 0b11111, 0b11111, 0b111, 0b111, 0b111, - 0b111, 0b111, 0b111, 0b111, 0b111, - 0b11111, 0b11111, 0b111, 0b111, 0b111, - 0b111, 0b111, 0b111, 0b111, 0b111 }; + 0x1f, 0x1f, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x1f, 0x1f, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, + }; int i, j; fbtft_par_dbg(DEBUG_INIT_DISPLAY, par, "%s()\n", __func__); |