diff options
author | Abylay Ospan <aospan@netup.ru> | 2010-03-06 13:46:39 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-05-17 23:46:42 -0400 |
commit | 2a8f96085449f3aa6fe99b27d7ee506e808059b9 (patch) | |
tree | 4c4aab41a94eddd02f346853f8920dc30d6fc73e /drivers/media/video/cx23885 | |
parent | 403c34f6bbc095f9c8b2e25becd65c9c3d159080 (diff) |
V4L/DVB: configurable IRQ from CAM
IRQ from CAM disabled by default. In some environment enabled IRQ can cause of
machine freeze.
Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx23885')
-rw-r--r-- | drivers/media/video/cx23885/cimax2.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/media/video/cx23885/cimax2.c b/drivers/media/video/cx23885/cimax2.c index d4a9d2c5947c..c95e7bc14745 100644 --- a/drivers/media/video/cx23885/cimax2.c +++ b/drivers/media/video/cx23885/cimax2.c | |||
@@ -60,12 +60,18 @@ static unsigned int ci_dbg; | |||
60 | module_param(ci_dbg, int, 0644); | 60 | module_param(ci_dbg, int, 0644); |
61 | MODULE_PARM_DESC(ci_dbg, "Enable CI debugging"); | 61 | MODULE_PARM_DESC(ci_dbg, "Enable CI debugging"); |
62 | 62 | ||
63 | static unsigned int ci_irq_enable; | ||
64 | module_param(ci_irq_enable, int, 0644); | ||
65 | MODULE_PARM_DESC(ci_irq_enable, "Enable IRQ from CAM"); | ||
66 | |||
63 | #define ci_dbg_print(args...) \ | 67 | #define ci_dbg_print(args...) \ |
64 | do { \ | 68 | do { \ |
65 | if (ci_dbg) \ | 69 | if (ci_dbg) \ |
66 | printk(KERN_DEBUG args); \ | 70 | printk(KERN_DEBUG args); \ |
67 | } while (0) | 71 | } while (0) |
68 | 72 | ||
73 | #define ci_irq_flags() (ci_irq_enable ? NETUP_IRQ_IRQAM : 0) | ||
74 | |||
69 | /* stores all private variables for communication with CI */ | 75 | /* stores all private variables for communication with CI */ |
70 | struct netup_ci_state { | 76 | struct netup_ci_state { |
71 | struct dvb_ca_en50221 ca; | 77 | struct dvb_ca_en50221 ca; |
@@ -392,7 +398,7 @@ int netup_poll_ci_slot_status(struct dvb_ca_en50221 *en50221, int slot, int open | |||
392 | if (0 != slot) | 398 | if (0 != slot) |
393 | return -EINVAL; | 399 | return -EINVAL; |
394 | 400 | ||
395 | netup_ci_set_irq(en50221, open ? (NETUP_IRQ_DETAM | NETUP_IRQ_IRQAM) | 401 | netup_ci_set_irq(en50221, open ? (NETUP_IRQ_DETAM | ci_irq_flags()) |
396 | : NETUP_IRQ_DETAM); | 402 | : NETUP_IRQ_DETAM); |
397 | 403 | ||
398 | return state->status; | 404 | return state->status; |
@@ -429,7 +435,7 @@ int netup_ci_init(struct cx23885_tsport *port) | |||
429 | 0x01, /* power on (use it like store place) */ | 435 | 0x01, /* power on (use it like store place) */ |
430 | 0x00, /* RFU */ | 436 | 0x00, /* RFU */ |
431 | 0x00, /* int status read only */ | 437 | 0x00, /* int status read only */ |
432 | NETUP_IRQ_IRQAM | NETUP_IRQ_DETAM, /* DETAM, IRQAM unmasked */ | 438 | ci_irq_flags() | NETUP_IRQ_DETAM, /* DETAM, IRQAM unmasked */ |
433 | 0x05, /* EXTINT=active-high, INT=push-pull */ | 439 | 0x05, /* EXTINT=active-high, INT=push-pull */ |
434 | 0x00, /* USCG1 */ | 440 | 0x00, /* USCG1 */ |
435 | 0x04, /* ack active low */ | 441 | 0x04, /* ack active low */ |
@@ -470,7 +476,7 @@ int netup_ci_init(struct cx23885_tsport *port) | |||
470 | state->ca.poll_slot_status = netup_poll_ci_slot_status; | 476 | state->ca.poll_slot_status = netup_poll_ci_slot_status; |
471 | state->ca.data = state; | 477 | state->ca.data = state; |
472 | state->priv = port; | 478 | state->priv = port; |
473 | state->current_irq_mode = NETUP_IRQ_IRQAM | NETUP_IRQ_DETAM; | 479 | state->current_irq_mode = ci_irq_flags() | NETUP_IRQ_DETAM; |
474 | 480 | ||
475 | ret = netup_write_i2c(state->i2c_adap, state->ci_i2c_addr, | 481 | ret = netup_write_i2c(state->i2c_adap, state->ci_i2c_addr, |
476 | 0, &cimax_init[0], 34); | 482 | 0, &cimax_init[0], 34); |