diff options
author | Sergey Ivanov <123kash@gmail.com> | 2010-08-09 09:18:32 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-21 05:55:55 -0400 |
commit | 111ac84a80199654db55c06e2565d4ab343c135d (patch) | |
tree | afa365528ce77ec78ad58aff0eb80b5edd99ed2f /drivers/media/video/cx88/cx88-dvb.c | |
parent | fba39807ceba3e2aab022fa8c7181a322fe12675 (diff) |
[media] Twinhan 1027 + IR Port support
Patch add support of TwinHan 1027 DVB-S card.
Refreshed version of https://patchwork.kernel.org/patch/79753/ patch.
(adapted for the new IR system), still works.
DVB-S support come from a patch originally authored by
Manu Abraham (abraham.manu@gmail.com).
IR Port support were added by Sergey.
Cc: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx88/cx88-dvb.c')
-rw-r--r-- | drivers/media/video/cx88/cx88-dvb.c | 61 |
1 files changed, 52 insertions, 9 deletions
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c index a037e925ceb9..367a653f4c95 100644 --- a/drivers/media/video/cx88/cx88-dvb.c +++ b/drivers/media/video/cx88/cx88-dvb.c | |||
@@ -56,6 +56,7 @@ | |||
56 | #include "stv0900.h" | 56 | #include "stv0900.h" |
57 | #include "stb6100.h" | 57 | #include "stb6100.h" |
58 | #include "stb6100_proc.h" | 58 | #include "stb6100_proc.h" |
59 | #include "mb86a16.h" | ||
59 | 60 | ||
60 | MODULE_DESCRIPTION("driver for cx2388x based DVB cards"); | 61 | MODULE_DESCRIPTION("driver for cx2388x based DVB cards"); |
61 | MODULE_AUTHOR("Chris Pascoe <c.pascoe@itee.uq.edu.au>"); | 62 | MODULE_AUTHOR("Chris Pascoe <c.pascoe@itee.uq.edu.au>"); |
@@ -250,6 +251,10 @@ static const struct zl10353_config cx88_terratec_cinergy_ht_pci_mkii_config = { | |||
250 | .if2 = 45600, | 251 | .if2 = 45600, |
251 | }; | 252 | }; |
252 | 253 | ||
254 | static struct mb86a16_config twinhan_vp1027 = { | ||
255 | .demod_address = 0x08, | ||
256 | }; | ||
257 | |||
253 | #if defined(CONFIG_VIDEO_CX88_VP3054) || (defined(CONFIG_VIDEO_CX88_VP3054_MODULE) && defined(MODULE)) | 258 | #if defined(CONFIG_VIDEO_CX88_VP3054) || (defined(CONFIG_VIDEO_CX88_VP3054_MODULE) && defined(MODULE)) |
254 | static int dntv_live_dvbt_pro_demod_init(struct dvb_frontend* fe) | 259 | static int dntv_live_dvbt_pro_demod_init(struct dvb_frontend* fe) |
255 | { | 260 | { |
@@ -429,15 +434,41 @@ static int tevii_dvbs_set_voltage(struct dvb_frontend *fe, | |||
429 | 434 | ||
430 | cx_set(MO_GP0_IO, 0x6040); | 435 | cx_set(MO_GP0_IO, 0x6040); |
431 | switch (voltage) { | 436 | switch (voltage) { |
432 | case SEC_VOLTAGE_13: | 437 | case SEC_VOLTAGE_13: |
433 | cx_clear(MO_GP0_IO, 0x20); | 438 | cx_clear(MO_GP0_IO, 0x20); |
434 | break; | 439 | break; |
435 | case SEC_VOLTAGE_18: | 440 | case SEC_VOLTAGE_18: |
436 | cx_set(MO_GP0_IO, 0x20); | 441 | cx_set(MO_GP0_IO, 0x20); |
437 | break; | 442 | break; |
438 | case SEC_VOLTAGE_OFF: | 443 | case SEC_VOLTAGE_OFF: |
439 | cx_clear(MO_GP0_IO, 0x20); | 444 | cx_clear(MO_GP0_IO, 0x20); |
440 | break; | 445 | break; |
446 | } | ||
447 | |||
448 | if (core->prev_set_voltage) | ||
449 | return core->prev_set_voltage(fe, voltage); | ||
450 | return 0; | ||
451 | } | ||
452 | |||
453 | static int vp1027_set_voltage(struct dvb_frontend *fe, | ||
454 | fe_sec_voltage_t voltage) | ||
455 | { | ||
456 | struct cx8802_dev *dev = fe->dvb->priv; | ||
457 | struct cx88_core *core = dev->core; | ||
458 | |||
459 | switch (voltage) { | ||
460 | case SEC_VOLTAGE_13: | ||
461 | dprintk(1, "LNB SEC Voltage=13\n"); | ||
462 | cx_write(MO_GP0_IO, 0x00001220); | ||
463 | break; | ||
464 | case SEC_VOLTAGE_18: | ||
465 | dprintk(1, "LNB SEC Voltage=18\n"); | ||
466 | cx_write(MO_GP0_IO, 0x00001222); | ||
467 | break; | ||
468 | case SEC_VOLTAGE_OFF: | ||
469 | dprintk(1, "LNB Voltage OFF\n"); | ||
470 | cx_write(MO_GP0_IO, 0x00001230); | ||
471 | break; | ||
441 | } | 472 | } |
442 | 473 | ||
443 | if (core->prev_set_voltage) | 474 | if (core->prev_set_voltage) |
@@ -1416,6 +1447,18 @@ static int dvb_register(struct cx8802_dev *dev) | |||
1416 | } | 1447 | } |
1417 | 1448 | ||
1418 | break; | 1449 | break; |
1450 | case CX88_BOARD_TWINHAN_VP1027_DVBS: | ||
1451 | dev->ts_gen_cntrl = 0x00; | ||
1452 | fe0->dvb.frontend = dvb_attach(mb86a16_attach, | ||
1453 | &twinhan_vp1027, | ||
1454 | &core->i2c_adap); | ||
1455 | if (fe0->dvb.frontend) { | ||
1456 | core->prev_set_voltage = | ||
1457 | fe0->dvb.frontend->ops.set_voltage; | ||
1458 | fe0->dvb.frontend->ops.set_voltage = | ||
1459 | vp1027_set_voltage; | ||
1460 | } | ||
1461 | break; | ||
1419 | 1462 | ||
1420 | default: | 1463 | default: |
1421 | printk(KERN_ERR "%s/2: The frontend of your DVB/ATSC card isn't supported yet\n", | 1464 | printk(KERN_ERR "%s/2: The frontend of your DVB/ATSC card isn't supported yet\n", |