summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2007-07-02 20:59:58 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2007-07-02 20:59:58 -0300
commit41bcd08d3f8d6e3b4ebabf945036a9334f4854a9 (patch)
treea60b16b3beed42fc20f7fe4ae05a087393682418 /linux
parent412d9abc44bb837fe8852c3e6b104076224dbecc (diff)
downloadmediapointer-dvb-s2-41bcd08d3f8d6e3b4ebabf945036a9334f4854a9.tar.gz
mediapointer-dvb-s2-41bcd08d3f8d6e3b4ebabf945036a9334f4854a9.tar.bz2
tm6000: Correct device initialization & Add general USB control message pause
From: Michel Ludwig <michel.ludwig@gmail.com> 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 <michel.ludwig@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/staging/tm6000/tm6000-core.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/linux/drivers/staging/tm6000/tm6000-core.c b/linux/drivers/staging/tm6000/tm6000-core.c
index 267828be9..ea1905661 100644
--- a/linux/drivers/staging/tm6000/tm6000-core.c
+++ b/linux/drivers/staging/tm6000/tm6000-core.c
@@ -104,6 +104,8 @@ int tm6000_read_write_usb (struct tm6000_core *dev, u8 req_type, u8 req,
kfree(data);
+ msleep(5);
+
return ret;
}
@@ -311,8 +313,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);
@@ -326,9 +328,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 */