Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 267586
b: refs/heads/master
c: 0b7a41e
h: refs/heads/master
v: v3
  • Loading branch information
Andres Salomon authored and Greg Kroah-Hartman committed Aug 23, 2011
1 parent 9a9ca74 commit 3144b57
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 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: 1b995ac22b53c6176e61a38558c8a8d16be24b69
refs/heads/master: 0b7a41ebb1bbee4be49e53497dc98e5517f2a2a8
15 changes: 7 additions & 8 deletions trunk/drivers/staging/olpc_dcon/olpc_dcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,10 @@ static s32 dcon_read(struct dcon_priv *dcon, u8 reg)

static int dcon_hw_init(struct dcon_priv *dcon, int is_init)
{
struct i2c_client *client = dcon->client;
uint16_t ver;
int rc = 0;

ver = i2c_smbus_read_word_data(client, DCON_REG_ID);
ver = dcon_read(dcon, DCON_REG_ID);
if ((ver >> 8) != 0xDC) {
printk(KERN_ERR "olpc-dcon: DCON ID not 0xDCxx: 0x%04x "
"instead.\n", ver);
Expand All @@ -95,10 +94,10 @@ static int dcon_hw_init(struct dcon_priv *dcon, int is_init)
}

/* SDRAM setup/hold time */
i2c_smbus_write_word_data(client, 0x3a, 0xc040);
i2c_smbus_write_word_data(client, 0x41, 0x0000);
i2c_smbus_write_word_data(client, 0x41, 0x0101);
i2c_smbus_write_word_data(client, 0x42, 0x0101);
dcon_write(dcon, 0x3a, 0xc040);
dcon_write(dcon, 0x41, 0x0000);
dcon_write(dcon, 0x41, 0x0101);
dcon_write(dcon, 0x42, 0x0101);

/* Colour swizzle, AA, no passthrough, backlight */
if (is_init) {
Expand All @@ -107,11 +106,11 @@ static int dcon_hw_init(struct dcon_priv *dcon, int is_init)
if (useaa)
dcon->disp_mode |= MODE_COL_AA;
}
i2c_smbus_write_word_data(client, DCON_REG_MODE, dcon->disp_mode);
dcon_write(dcon, DCON_REG_MODE, dcon->disp_mode);


/* Set the scanline to interrupt on during resume */
i2c_smbus_write_word_data(client, DCON_REG_SCAN_INT, resumeline);
dcon_write(dcon, DCON_REG_SCAN_INT, resumeline);

err:
return rc;
Expand Down

0 comments on commit 3144b57

Please sign in to comment.