aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88-cards.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-04-22 13:45:28 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-24 13:07:45 -0400
commitc450e50e8d6a0876431a744f1df9fdd5c2732b07 (patch)
treecfd95d6984a0606feb3791753bbe02256cb9b0cf /drivers/media/video/cx88/cx88-cards.c
parentbc36a686a65dd9b941463ff894a3868c62851186 (diff)
V4L/DVB (7263): Some cleanups at cx88 callback methods
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/cx88/cx88-cards.c')
-rw-r--r--drivers/media/video/cx88/cx88-cards.c57
1 files changed, 19 insertions, 38 deletions
diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c
index 1fe6b9da9815..fc870882ffe2 100644
--- a/drivers/media/video/cx88/cx88-cards.c
+++ b/drivers/media/video/cx88/cx88-cards.c
@@ -2062,34 +2062,22 @@ static int cx88_xc3028_geniatech_tuner_callback(void *priv, int command, int mod
2062 case XC2028_TUNER_RESET: 2062 case XC2028_TUNER_RESET:
2063 switch (INPUT(core->input).type) { 2063 switch (INPUT(core->input).type) {
2064 case CX88_RADIO: 2064 case CX88_RADIO:
2065 cx_write(MO_GP1_IO, 0x101010); 2065 break;
2066 mdelay(50);
2067 cx_write(MO_GP1_IO, 0x101000);
2068 mdelay(50);
2069 cx_write(MO_GP1_IO, 0x101010);
2070 mdelay(50);
2071 return 0;
2072 case CX88_VMUX_DVB: 2066 case CX88_VMUX_DVB:
2073 cx_write(MO_GP1_IO, 0x030302); 2067 cx_write(MO_GP1_IO, 0x030302);
2074 mdelay(50); 2068 mdelay(50);
2075 cx_write(MO_GP1_IO, 0x101010); 2069 break;
2076 mdelay(50);
2077 cx_write(MO_GP1_IO, 0x101000);
2078 mdelay(50);
2079 cx_write(MO_GP1_IO, 0x101010);
2080 mdelay(50);
2081 return 0;
2082 default: 2070 default:
2083 cx_write(MO_GP1_IO, 0x030301); 2071 cx_write(MO_GP1_IO, 0x030301);
2084 mdelay(50); 2072 mdelay(50);
2085 cx_write(MO_GP1_IO, 0x101010); 2073 }
2086 mdelay(50); 2074 cx_write(MO_GP1_IO, 0x101010);
2087 cx_write(MO_GP1_IO, 0x101000); 2075 mdelay(50);
2088 mdelay(50); 2076 cx_write(MO_GP1_IO, 0x101000);
2089 cx_write(MO_GP1_IO, 0x101010); 2077 mdelay(50);
2090 mdelay(50); 2078 cx_write(MO_GP1_IO, 0x101010);
2091 return 0; 2079 mdelay(50);
2092 } 2080 return 0;
2093 } 2081 }
2094 return -EINVAL; 2082 return -EINVAL;
2095} 2083}
@@ -2145,7 +2133,6 @@ static int cx88_xc2028_tuner_callback(void *priv, int command, int arg)
2145 2133
2146 switch (command) { 2134 switch (command) {
2147 case XC2028_TUNER_RESET: 2135 case XC2028_TUNER_RESET:
2148 {
2149 switch (INPUT(core->input).type) { 2136 switch (INPUT(core->input).type) {
2150 case CX88_RADIO: 2137 case CX88_RADIO:
2151 printk(KERN_INFO "setting GPIO to radio!\n"); 2138 printk(KERN_INFO "setting GPIO to radio!\n");
@@ -2153,25 +2140,19 @@ static int cx88_xc2028_tuner_callback(void *priv, int command, int arg)
2153 mdelay(250); 2140 mdelay(250);
2154 cx_write(MO_GP2_IO, 0xff); 2141 cx_write(MO_GP2_IO, 0xff);
2155 mdelay(250); 2142 mdelay(250);
2156 cx_write(MO_GP1_IO, 0x101010); 2143 break;
2157 mdelay(250);
2158 cx_write(MO_GP1_IO, 0x101000);
2159 mdelay(250);
2160 cx_write(MO_GP1_IO, 0x101010);
2161 mdelay(250);
2162 return 0;
2163 case CX88_VMUX_DVB: /* Digital TV*/ 2144 case CX88_VMUX_DVB: /* Digital TV*/
2164 default: /* Analog TV */ 2145 default: /* Analog TV */
2165 printk(KERN_INFO "setting GPIO to TV!\n"); 2146 printk(KERN_INFO "setting GPIO to TV!\n");
2166 cx_write(MO_GP1_IO, 0x101010); 2147 break;
2167 mdelay(250);
2168 cx_write(MO_GP1_IO, 0x101000);
2169 mdelay(250);
2170 cx_write(MO_GP1_IO, 0x101010);
2171 mdelay(250);
2172 return 0;
2173 } 2148 }
2174 } 2149 cx_write(MO_GP1_IO, 0x101010);
2150 mdelay(250);
2151 cx_write(MO_GP1_IO, 0x101000);
2152 mdelay(250);
2153 cx_write(MO_GP1_IO, 0x101010);
2154 mdelay(250);
2155 return 0;
2175 } 2156 }
2176 return -EINVAL; 2157 return -EINVAL;
2177} 2158}