aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video
diff options
context:
space:
mode:
authorAndy Walls <awalls@md.metrocast.net>2010-07-18 19:26:37 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-08-08 22:42:55 -0400
commit81f287da73377eb408de6879aa6c54c6d57dc1db (patch)
tree2a035375e715a38a45ffecd8cc9ab57822337e5e /drivers/media/video
parent5a28d9a320c865007da830c065bcaecfe91b3932 (diff)
V4L/DVB: cx23885: For CX23888 IR, configure the IO pin mux IR pins explcitly
Explicitly configure the IR Tx and IR Rx pins to be driven by the IR Rx and Tx pads from the AV core for CX23888 IR. For the HVR-1850 and HVR-1290 configure the IR Tx level inversion, so the Tx LED is off when idle. Signed-off-by: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video')
-rw-r--r--drivers/media/video/cx23885/cx23885-cards.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c
index 29eea8d3613b..e9586743692b 100644
--- a/drivers/media/video/cx23885/cx23885-cards.c
+++ b/drivers/media/video/cx23885/cx23885-cards.c
@@ -962,6 +962,24 @@ void cx23885_gpio_setup(struct cx23885_dev *dev)
962 962
963int cx23885_ir_init(struct cx23885_dev *dev) 963int cx23885_ir_init(struct cx23885_dev *dev)
964{ 964{
965 static struct v4l2_subdev_io_pin_config ir_pin_cfg[] = {
966 {
967 .flags = V4L2_SUBDEV_IO_PIN_INPUT,
968 .pin = CX23885_PIN_IR_RX_GPIO19,
969 .function = CX23885_PAD_IR_RX,
970 .value = 0,
971 .strength = CX25840_PIN_DRIVE_MEDIUM,
972 }, {
973 .flags = V4L2_SUBDEV_IO_PIN_OUTPUT,
974 .pin = CX23885_PIN_IR_TX_GPIO20,
975 .function = CX23885_PAD_IR_TX,
976 .value = 0,
977 .strength = CX25840_PIN_DRIVE_MEDIUM,
978 }
979 };
980 const size_t ir_pin_cfg_count = ARRAY_SIZE(ir_pin_cfg);
981
982 struct v4l2_subdev_ir_parameters params;
965 int ret = 0; 983 int ret = 0;
966 switch (dev->board) { 984 switch (dev->board) {
967 case CX23885_BOARD_HAUPPAUGE_HVR1250: 985 case CX23885_BOARD_HAUPPAUGE_HVR1250:
@@ -982,7 +1000,20 @@ int cx23885_ir_init(struct cx23885_dev *dev)
982 if (ret) 1000 if (ret)
983 break; 1001 break;
984 dev->sd_ir = cx23885_find_hw(dev, CX23885_HW_888_IR); 1002 dev->sd_ir = cx23885_find_hw(dev, CX23885_HW_888_IR);
1003 v4l2_subdev_call(dev->sd_cx25840, core, s_io_pin_config,
1004 ir_pin_cfg_count, ir_pin_cfg);
985 dev->pci_irqmask |= PCI_MSK_IR; 1005 dev->pci_irqmask |= PCI_MSK_IR;
1006 /*
1007 * For these boards we need to invert the Tx output via the
1008 * IR controller to have the LED off while idle
1009 */
1010 v4l2_subdev_call(dev->sd_ir, ir, tx_g_parameters, &params);
1011 params.enable = false;
1012 params.shutdown = false;
1013 params.invert_level = true;
1014 v4l2_subdev_call(dev->sd_ir, ir, tx_s_parameters, &params);
1015 params.shutdown = true;
1016 v4l2_subdev_call(dev->sd_ir, ir, tx_s_parameters, &params);
986 break; 1017 break;
987 case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP: 1018 case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP:
988 request_module("ir-kbd-i2c"); 1019 request_module("ir-kbd-i2c");