aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx23885/cx23885-cards.c
diff options
context:
space:
mode:
authorAndy Walls <awalls@md.metrocast.net>2010-07-19 20:22:05 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-08-08 22:42:56 -0400
commitfa647f249fa3399b8c90e2c4a07459c5d7976ffe (patch)
tree204b41912104c5fce7bc9fee8e0c8a9ebd110fc9 /drivers/media/video/cx23885/cx23885-cards.c
parente5514f104d875b3d28cbcd5d4f2b96ab2fca1e29 (diff)
V4L/DVB: cx23885: Require user to explicitly enable CX2388[57] IR via module param
The CX23885 IR controller was reported to cause an interrupt storm on a TeVii S470 card, but was reported fine on an HVR-1250. Keep integrated IR disabled by default on CX2388[57] based cards to avoid a bad user experience in the general case. Signed-off-by: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx23885/cx23885-cards.c')
-rw-r--r--drivers/media/video/cx23885/cx23885-cards.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c
index d72b48ef940e..e76ce8709afd 100644
--- a/drivers/media/video/cx23885/cx23885-cards.c
+++ b/drivers/media/video/cx23885/cx23885-cards.c
@@ -30,6 +30,16 @@
30#include "netup-init.h" 30#include "netup-init.h"
31#include "cx23888-ir.h" 31#include "cx23888-ir.h"
32 32
33static unsigned int enable_885_ir;
34module_param(enable_885_ir, int, 0644);
35MODULE_PARM_DESC(enable_885_ir,
36 "Enable integrated IR controller for supported\n"
37 "\t\t CX2388[57] boards that are wired for it:\n"
38 "\t\t\tHVR-1250 (reported safe)\n"
39 "\t\t\tTeVii S470 (reported unsafe)\n"
40 "\t\t This can cause an interrupt storm with some cards.\n"
41 "\t\t Default: 0 [Disabled]");
42
33/* ------------------------------------------------------------------ */ 43/* ------------------------------------------------------------------ */
34/* board config info */ 44/* board config info */
35 45
@@ -1025,6 +1035,8 @@ int cx23885_ir_init(struct cx23885_dev *dev)
1025 v4l2_subdev_call(dev->sd_ir, ir, tx_s_parameters, &params); 1035 v4l2_subdev_call(dev->sd_ir, ir, tx_s_parameters, &params);
1026 break; 1036 break;
1027 case CX23885_BOARD_TEVII_S470: 1037 case CX23885_BOARD_TEVII_S470:
1038 if (!enable_885_ir)
1039 break;
1028 dev->sd_ir = cx23885_find_hw(dev, CX23885_HW_AV_CORE); 1040 dev->sd_ir = cx23885_find_hw(dev, CX23885_HW_AV_CORE);
1029 if (dev->sd_ir == NULL) { 1041 if (dev->sd_ir == NULL) {
1030 ret = -ENODEV; 1042 ret = -ENODEV;
@@ -1034,6 +1046,8 @@ int cx23885_ir_init(struct cx23885_dev *dev)
1034 ir_rx_pin_cfg_count, ir_rx_pin_cfg); 1046 ir_rx_pin_cfg_count, ir_rx_pin_cfg);
1035 break; 1047 break;
1036 case CX23885_BOARD_HAUPPAUGE_HVR1250: 1048 case CX23885_BOARD_HAUPPAUGE_HVR1250:
1049 if (!enable_885_ir)
1050 break;
1037 dev->sd_ir = cx23885_find_hw(dev, CX23885_HW_AV_CORE); 1051 dev->sd_ir = cx23885_find_hw(dev, CX23885_HW_AV_CORE);
1038 if (dev->sd_ir == NULL) { 1052 if (dev->sd_ir == NULL) {
1039 ret = -ENODEV; 1053 ret = -ENODEV;
@@ -1214,6 +1228,11 @@ void cx23885_card_setup(struct cx23885_dev *dev)
1214 * loaded, ensure this happens. 1228 * loaded, ensure this happens.
1215 */ 1229 */
1216 switch (dev->board) { 1230 switch (dev->board) {
1231 case CX23885_BOARD_TEVII_S470:
1232 case CX23885_BOARD_HAUPPAUGE_HVR1250:
1233 /* Currently only enabled for the integrated IR controller */
1234 if (!enable_885_ir)
1235 break;
1217 case CX23885_BOARD_HAUPPAUGE_HVR1800: 1236 case CX23885_BOARD_HAUPPAUGE_HVR1800:
1218 case CX23885_BOARD_HAUPPAUGE_HVR1800lp: 1237 case CX23885_BOARD_HAUPPAUGE_HVR1800lp:
1219 case CX23885_BOARD_HAUPPAUGE_HVR1700: 1238 case CX23885_BOARD_HAUPPAUGE_HVR1700:
@@ -1226,8 +1245,6 @@ void cx23885_card_setup(struct cx23885_dev *dev)
1226 case CX23885_BOARD_MAGICPRO_PROHDTVE2: 1245 case CX23885_BOARD_MAGICPRO_PROHDTVE2:
1227 case CX23885_BOARD_HAUPPAUGE_HVR1290: 1246 case CX23885_BOARD_HAUPPAUGE_HVR1290:
1228 case CX23885_BOARD_LEADTEK_WINFAST_PXTV1200: 1247 case CX23885_BOARD_LEADTEK_WINFAST_PXTV1200:
1229 case CX23885_BOARD_TEVII_S470:
1230 case CX23885_BOARD_HAUPPAUGE_HVR1250:
1231 dev->sd_cx25840 = v4l2_i2c_new_subdev(&dev->v4l2_dev, 1248 dev->sd_cx25840 = v4l2_i2c_new_subdev(&dev->v4l2_dev,
1232 &dev->i2c_bus[2].i2c_adap, 1249 &dev->i2c_bus[2].i2c_adap,
1233 "cx25840", "cx25840", 0x88 >> 1, NULL); 1250 "cx25840", "cx25840", 0x88 >> 1, NULL);