diff options
| author | Michel Ludwig <[email protected]> | 2007-07-02 20:59:58 -0300 |
|---|---|---|
| committer | Mauro Carvalho Chehab <[email protected]> | 2010-05-18 00:39:31 -0300 |
| commit | a5adfbed09ffedb4ffa8e9a93dbd757096020470 (patch) | |
| tree | ca027008c19baf020223e6e6ccd23fb7a9ec63dc | |
| parent | 526835d5b30a591578f2813a8837ac70172c0aa9 (diff) | |
V4L/DVB (12779): tm6000: Correct dev init & Add general USB ctrl msg pause
Add GPIO4 reset, which is required to make DVB-T work with the Freecom
stick.
Add a general 5 ms pause to the "tm6000_read_write_usb" method.
Signed-off-by: Michel Ludwig <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
| -rw-r--r-- | drivers/staging/tm6000/tm6000-core.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/drivers/staging/tm6000/tm6000-core.c b/drivers/staging/tm6000/tm6000-core.c index ea26f0daa82f..6becde2eace6 100644 --- a/drivers/staging/tm6000/tm6000-core.c +++ b/drivers/staging/tm6000/tm6000-core.c @@ -99,6 +99,8 @@ int tm6000_read_write_usb (struct tm6000_core *dev, u8 req_type, u8 req, kfree(data); + msleep(5); + return ret; } @@ -304,8 +306,8 @@ int tm6000_init (struct tm6000_core *dev) tm6000_set_reg (dev, REQ_05_SET_GET_USBREG, 0x18, 0x00); msleep(5); /* Just to be conservative */ - /* Reset GPIO1. Maybe, this is 10 Moons specific */ - for (i=0; i< 3; i++) { + /* Reset GPIO1 and GPIO4. */ + for (i=0; i< 2; i++) { rc=tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN, TM6000_GPIO_1, 0); if (rc<0) { printk (KERN_ERR "Error %i doing GPIO1 reset\n",rc); @@ -319,9 +321,26 @@ int tm6000_init (struct tm6000_core *dev) return rc; } + msleep(10); + rc=tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN, TM6000_GPIO_4, 0); + if (rc<0) { + printk (KERN_ERR "Error %i doing GPIO4 reset\n",rc); + return rc; + } + + msleep(10); + rc=tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN, TM6000_GPIO_4, 1); + if (rc<0) { + printk (KERN_ERR "Error %i doing GPIO4 reset\n",rc); + return rc; + } + if (!i) rc=tm6000_get_reg16(dev, 0x40,0,0); } + + msleep(50); + return 0; #endif /* HACK */ |