diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2008-09-12 12:31:45 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-12 07:37:09 -0400 |
commit | d7cba043d7ec840d67bd5143779d1febe7d83407 (patch) | |
tree | 4fb46684538e0ad7d3229f592182ed6121049d69 /drivers/media/video/cx88/cx88-cards.c | |
parent | ebb8d68a5c8c236acd8e8cf8f0d6046e027a8e21 (diff) |
V4L/DVB (9049): convert tuner drivers to use dvb_frontend->callback
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx88/cx88-cards.c')
-rw-r--r-- | drivers/media/video/cx88/cx88-cards.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c index 16bb9c35fc76..b5a25094c9e5 100644 --- a/drivers/media/video/cx88/cx88-cards.c +++ b/drivers/media/video/cx88/cx88-cards.c | |||
@@ -2308,9 +2308,21 @@ static int cx88_dvico_xc2028_callback(struct cx88_core *core, | |||
2308 | { | 2308 | { |
2309 | switch (command) { | 2309 | switch (command) { |
2310 | case XC2028_TUNER_RESET: | 2310 | case XC2028_TUNER_RESET: |
2311 | cx_write(MO_GP0_IO, 0x101000); | 2311 | switch (core->boardnr) { |
2312 | mdelay(5); | 2312 | case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO: |
2313 | cx_set(MO_GP0_IO, 0x101010); | 2313 | /* GPIO-4 xc3028 tuner */ |
2314 | |||
2315 | cx_set(MO_GP0_IO, 0x00001000); | ||
2316 | cx_clear(MO_GP0_IO, 0x00000010); | ||
2317 | msleep(100); | ||
2318 | cx_set(MO_GP0_IO, 0x00000010); | ||
2319 | msleep(100); | ||
2320 | break; | ||
2321 | default: | ||
2322 | cx_write(MO_GP0_IO, 0x101000); | ||
2323 | mdelay(5); | ||
2324 | cx_set(MO_GP0_IO, 0x101010); | ||
2325 | } | ||
2314 | break; | 2326 | break; |
2315 | default: | 2327 | default: |
2316 | return -EINVAL; | 2328 | return -EINVAL; |
@@ -2419,6 +2431,7 @@ static int cx88_xc2028_tuner_callback(struct cx88_core *core, | |||
2419 | case CX88_BOARD_PROLINK_PV_8000GT: | 2431 | case CX88_BOARD_PROLINK_PV_8000GT: |
2420 | return cx88_pv_8000gt_callback(core, command, arg); | 2432 | return cx88_pv_8000gt_callback(core, command, arg); |
2421 | case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO: | 2433 | case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO: |
2434 | case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO: | ||
2422 | return cx88_dvico_xc2028_callback(core, command, arg); | 2435 | return cx88_dvico_xc2028_callback(core, command, arg); |
2423 | } | 2436 | } |
2424 | 2437 | ||
@@ -2486,7 +2499,7 @@ static int cx88_xc5000_tuner_callback(struct cx88_core *core, | |||
2486 | return 0; /* Should never be here */ | 2499 | return 0; /* Should never be here */ |
2487 | } | 2500 | } |
2488 | 2501 | ||
2489 | int cx88_tuner_callback(void *priv, int command, int arg) | 2502 | int cx88_tuner_callback(void *priv, int component, int command, int arg) |
2490 | { | 2503 | { |
2491 | struct i2c_algo_bit_data *i2c_algo = priv; | 2504 | struct i2c_algo_bit_data *i2c_algo = priv; |
2492 | struct cx88_core *core; | 2505 | struct cx88_core *core; |
@@ -2503,6 +2516,9 @@ int cx88_tuner_callback(void *priv, int command, int arg) | |||
2503 | return -EINVAL; | 2516 | return -EINVAL; |
2504 | } | 2517 | } |
2505 | 2518 | ||
2519 | if (component != DVB_FRONTEND_COMPONENT_TUNER) | ||
2520 | return -EINVAL; | ||
2521 | |||
2506 | switch (core->board.tuner_type) { | 2522 | switch (core->board.tuner_type) { |
2507 | case TUNER_XC2028: | 2523 | case TUNER_XC2028: |
2508 | info_printk(core, "Calling XC2028/3028 callback\n"); | 2524 | info_printk(core, "Calling XC2028/3028 callback\n"); |