Commit 1088f00c authored by Michel Ludwig's avatar Michel Ludwig Committed by Mauro Carvalho Chehab

V4L/DVB (12785): tm6000: allow user gpio address for tuner reset

Modify tuner_callback to user the device's GPIO address field
for tuner reset.
Signed-off-by: default avatarMichel Ludwig <michel.ludwig@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 1a68d1cb
...@@ -323,10 +323,10 @@ static int tm6000_tuner_callback(void *ptr, int command, int arg) ...@@ -323,10 +323,10 @@ static int tm6000_tuner_callback(void *ptr, int command, int arg)
switch (arg) { switch (arg) {
case 0: case 0:
tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN, tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN,
TM6000_GPIO_1, 0x00); dev->tuner_reset_gpio, 0x00);
msleep(10); msleep(10);
tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN, tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN,
TM6000_GPIO_1, 0x01); dev->tuner_reset_gpio, 0x01);
break; break;
case 1: case 1:
tm6000_set_reg (dev, REQ_04_EN_DISABLE_MCU_INT, tm6000_set_reg (dev, REQ_04_EN_DISABLE_MCU_INT,
...@@ -343,14 +343,6 @@ static int tm6000_tuner_callback(void *ptr, int command, int arg) ...@@ -343,14 +343,6 @@ static int tm6000_tuner_callback(void *ptr, int command, int arg)
rc=tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN, rc=tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN,
TM6000_GPIO_CLK, 1); TM6000_GPIO_CLK, 1);
break; break;
case 4:
tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN,
TM6000_GPIO_4, 0x00);
msleep(10);
tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN,
TM6000_GPIO_4, 0x01);
break;
} }
} }
return (rc); return (rc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment