Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346388
b: refs/heads/master
c: 53c7a2f
h: refs/heads/master
v: v3
  • Loading branch information
Jingoo Han authored and Linus Torvalds committed Dec 18, 2012
1 parent 2dad4b0 commit 5313346
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c22e61b339146ed80eb0125f18d698883f99825a
refs/heads/master: 53c7a2fffd71787299d6c7a7107b233d37ad7284
27 changes: 14 additions & 13 deletions trunk/drivers/video/backlight/tdo24m.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,31 +47,31 @@ struct tdo24m {
((x1) << 9) | 0x100 | (x2))
#define CMD_NULL (-1)

static uint32_t lcd_panel_reset[] = {
static const uint32_t lcd_panel_reset[] = {
CMD0(0x1), /* reset */
CMD0(0x0), /* nop */
CMD0(0x0), /* nop */
CMD0(0x0), /* nop */
CMD_NULL,
};

static uint32_t lcd_panel_on[] = {
static const uint32_t lcd_panel_on[] = {
CMD0(0x29), /* Display ON */
CMD2(0xB8, 0xFF, 0xF9), /* Output Control */
CMD0(0x11), /* Sleep out */
CMD1(0xB0, 0x16), /* Wake */
CMD_NULL,
};

static uint32_t lcd_panel_off[] = {
static const uint32_t lcd_panel_off[] = {
CMD0(0x28), /* Display OFF */
CMD2(0xB8, 0x80, 0x02), /* Output Control */
CMD0(0x10), /* Sleep in */
CMD1(0xB0, 0x00), /* Deep stand by in */
CMD_NULL,
};

static uint32_t lcd_vga_pass_through_tdo24m[] = {
static const uint32_t lcd_vga_pass_through_tdo24m[] = {
CMD1(0xB0, 0x16),
CMD1(0xBC, 0x80),
CMD1(0xE1, 0x00),
Expand All @@ -80,7 +80,7 @@ static uint32_t lcd_vga_pass_through_tdo24m[] = {
CMD_NULL,
};

static uint32_t lcd_qvga_pass_through_tdo24m[] = {
static const uint32_t lcd_qvga_pass_through_tdo24m[] = {
CMD1(0xB0, 0x16),
CMD1(0xBC, 0x81),
CMD1(0xE1, 0x00),
Expand All @@ -89,7 +89,7 @@ static uint32_t lcd_qvga_pass_through_tdo24m[] = {
CMD_NULL,
};

static uint32_t lcd_vga_transfer_tdo24m[] = {
static const uint32_t lcd_vga_transfer_tdo24m[] = {
CMD1(0xcf, 0x02), /* Blanking period control (1) */
CMD2(0xd0, 0x08, 0x04), /* Blanking period control (2) */
CMD1(0xd1, 0x01), /* CKV timing control on/off */
Expand All @@ -102,7 +102,7 @@ static uint32_t lcd_vga_transfer_tdo24m[] = {
CMD_NULL,
};

static uint32_t lcd_qvga_transfer[] = {
static const uint32_t lcd_qvga_transfer[] = {
CMD1(0xd6, 0x02), /* Blanking period control (1) */
CMD2(0xd7, 0x08, 0x04), /* Blanking period control (2) */
CMD1(0xd8, 0x01), /* CKV timing control on/off */
Expand All @@ -115,23 +115,23 @@ static uint32_t lcd_qvga_transfer[] = {
CMD_NULL,
};

static uint32_t lcd_vga_pass_through_tdo35s[] = {
static const uint32_t lcd_vga_pass_through_tdo35s[] = {
CMD1(0xB0, 0x16),
CMD1(0xBC, 0x80),
CMD1(0xE1, 0x00),
CMD1(0x3B, 0x00),
CMD_NULL,
};

static uint32_t lcd_qvga_pass_through_tdo35s[] = {
static const uint32_t lcd_qvga_pass_through_tdo35s[] = {
CMD1(0xB0, 0x16),
CMD1(0xBC, 0x81),
CMD1(0xE1, 0x00),
CMD1(0x3B, 0x22),
CMD_NULL,
};

static uint32_t lcd_vga_transfer_tdo35s[] = {
static const uint32_t lcd_vga_transfer_tdo35s[] = {
CMD1(0xcf, 0x02), /* Blanking period control (1) */
CMD2(0xd0, 0x08, 0x04), /* Blanking period control (2) */
CMD1(0xd1, 0x01), /* CKV timing control on/off */
Expand All @@ -144,7 +144,7 @@ static uint32_t lcd_vga_transfer_tdo35s[] = {
CMD_NULL,
};

static uint32_t lcd_panel_config[] = {
static const uint32_t lcd_panel_config[] = {
CMD2(0xb8, 0xff, 0xf9), /* Output control */
CMD0(0x11), /* sleep out */
CMD1(0xba, 0x01), /* Display mode (1) */
Expand Down Expand Up @@ -175,10 +175,11 @@ static uint32_t lcd_panel_config[] = {
CMD_NULL,
};

static int tdo24m_writes(struct tdo24m *lcd, uint32_t *array)
static int tdo24m_writes(struct tdo24m *lcd, const uint32_t *array)
{
struct spi_transfer *x = &lcd->xfer;
uint32_t data, *p = array;
const uint32_t *p = array;
uint32_t data;
int nparams, err = 0;

for (; *p != CMD_NULL; p++) {
Expand Down

0 comments on commit 5313346

Please sign in to comment.