Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 199969
b: refs/heads/master
c: 2a15ac7
h: refs/heads/master
i:
  199967: 9778f90
v: v3
  • Loading branch information
Dmitri Belimov authored and Mauro Carvalho Chehab committed Jun 1, 2010
1 parent a9d89f8 commit 5616084
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 16 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: b9eb39d8f419d76e1d59febe48a6791f1fbb68c4
refs/heads/master: 2a15ac7ad625dc22885446016d730a451df1b7d4
17 changes: 2 additions & 15 deletions trunk/drivers/staging/tm6000/tm6000-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,13 +363,7 @@ int tm6000_tuner_callback(void *ptr, int component, int command, int arg)
tm6000_set_reg(dev, REQ_04_EN_DISABLE_MCU_INT,
0x02, arg);
msleep(10);
rc = tm6000_set_reg(dev, REQ_03_SET_GET_MCU_PIN,
TM6000_GPIO_CLK, 0);
if (rc < 0)
return rc;
msleep(10);
rc = tm6000_set_reg(dev, REQ_03_SET_GET_MCU_PIN,
TM6000_GPIO_CLK, 1);
rc = tm6000_i2c_reset(dev, 10);
break;
case XC2028_TUNER_RESET:
/* Reset codes during load firmware */
Expand Down Expand Up @@ -423,14 +417,7 @@ int tm6000_tuner_callback(void *ptr, int component, int command, int arg)
break;

case 2:
rc = tm6000_set_reg(dev, REQ_03_SET_GET_MCU_PIN,
TM6000_GPIO_CLK, 0);
if (rc < 0)
return rc;
msleep(100);
rc = tm6000_set_reg(dev, REQ_03_SET_GET_MCU_PIN,
TM6000_GPIO_CLK, 1);
msleep(100);
rc = tm6000_i2c_reset(dev, 100);
break;
}
}
Expand Down
16 changes: 16 additions & 0 deletions trunk/drivers/staging/tm6000/tm6000-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,22 @@ int tm6000_get_reg32 (struct tm6000_core *dev, u8 req, u16 value, u16 index)
return buf[3] | buf[2] << 8 | buf[1] << 16 | buf[0] << 24;
}

int tm6000_i2c_reset(struct tm6000_core *dev, u16 tsleep)
{
int rc;

rc = tm6000_set_reg(dev, REQ_03_SET_GET_MCU_PIN, TM6000_GPIO_CLK, 0);
if (rc < 0)
return rc;

msleep(tsleep);

rc = tm6000_set_reg(dev, REQ_03_SET_GET_MCU_PIN, TM6000_GPIO_CLK, 1);
msleep(tsleep);

return rc;
}

void tm6000_set_fourcc_format(struct tm6000_core *dev)
{
if (dev->dev_type == TM6010) {
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/staging/tm6000/tm6000.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,8 @@ int tm6000_get_reg (struct tm6000_core *dev, u8 req, u16 value, u16 index);
int tm6000_get_reg16(struct tm6000_core *dev, u8 req, u16 value, u16 index);
int tm6000_get_reg32(struct tm6000_core *dev, u8 req, u16 value, u16 index);
int tm6000_set_reg (struct tm6000_core *dev, u8 req, u16 value, u16 index);
int tm6000_i2c_reset(struct tm6000_core *dev, u16 tsleep);

int tm6000_init (struct tm6000_core *dev);

int tm6000_init_analog_mode (struct tm6000_core *dev);
Expand Down

0 comments on commit 5616084

Please sign in to comment.