[git:v4l-dvb/v2.6.36] V4L/DVB: cx23885: For CX23888 IR, configure the IO pin mux IR pins explcitly
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: cx23885: For CX23888 IR, configure the IO pin mux IR pins explcitly Author: Andy Walls Date:Sun Jul 18 20:26:37 2010 -0300 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 Signed-off-by: Mauro Carvalho Chehab drivers/media/video/cx23885/cx23885-cards.c | 31 +++ 1 files changed, 31 insertions(+), 0 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=81f287da73377eb408de6879aa6c54c6d57dc1db diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c index 29eea8d..e958674 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) int cx23885_ir_init(struct cx23885_dev *dev) { + static struct v4l2_subdev_io_pin_config ir_pin_cfg[] = { + { + .flags= V4L2_SUBDEV_IO_PIN_INPUT, + .pin = CX23885_PIN_IR_RX_GPIO19, + .function = CX23885_PAD_IR_RX, + .value= 0, + .strength = CX25840_PIN_DRIVE_MEDIUM, + }, { + .flags= V4L2_SUBDEV_IO_PIN_OUTPUT, + .pin = CX23885_PIN_IR_TX_GPIO20, + .function = CX23885_PAD_IR_TX, + .value= 0, + .strength = CX25840_PIN_DRIVE_MEDIUM, + } + }; + const size_t ir_pin_cfg_count = ARRAY_SIZE(ir_pin_cfg); + + struct v4l2_subdev_ir_parameters params; int ret = 0; switch (dev->board) { case CX23885_BOARD_HAUPPAUGE_HVR1250: @@ -982,7 +1000,20 @@ int cx23885_ir_init(struct cx23885_dev *dev) if (ret) break; dev->sd_ir = cx23885_find_hw(dev, CX23885_HW_888_IR); + v4l2_subdev_call(dev->sd_cx25840, core, s_io_pin_config, +ir_pin_cfg_count, ir_pin_cfg); dev->pci_irqmask |= PCI_MSK_IR; + /* +* For these boards we need to invert the Tx output via the +* IR controller to have the LED off while idle +*/ + v4l2_subdev_call(dev->sd_ir, ir, tx_g_parameters, ¶ms); + params.enable = false; + params.shutdown = false; + params.invert_level = true; + v4l2_subdev_call(dev->sd_ir, ir, tx_s_parameters, ¶ms); + params.shutdown = true; + v4l2_subdev_call(dev->sd_ir, ir, tx_s_parameters, ¶ms); break; case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP: request_module("ir-kbd-i2c"); ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
[git:v4l-dvb/v2.6.36] V4L/DVB: cx23885: For CX23888 IR, configure the IO pin mux IR pins explcitly
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: cx23885: For CX23888 IR, configure the IO pin mux IR pins explcitly Author: Andy Walls Date:Sun Jul 18 20:26:37 2010 -0300 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 Signed-off-by: Mauro Carvalho Chehab drivers/media/video/cx23885/cx23885-cards.c | 31 +++ 1 files changed, 31 insertions(+), 0 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=f52b27e8c2be00dab9d3d3f8d62b9c6b1367d9da diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c index 29eea8d..e958674 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) int cx23885_ir_init(struct cx23885_dev *dev) { + static struct v4l2_subdev_io_pin_config ir_pin_cfg[] = { + { + .flags= V4L2_SUBDEV_IO_PIN_INPUT, + .pin = CX23885_PIN_IR_RX_GPIO19, + .function = CX23885_PAD_IR_RX, + .value= 0, + .strength = CX25840_PIN_DRIVE_MEDIUM, + }, { + .flags= V4L2_SUBDEV_IO_PIN_OUTPUT, + .pin = CX23885_PIN_IR_TX_GPIO20, + .function = CX23885_PAD_IR_TX, + .value= 0, + .strength = CX25840_PIN_DRIVE_MEDIUM, + } + }; + const size_t ir_pin_cfg_count = ARRAY_SIZE(ir_pin_cfg); + + struct v4l2_subdev_ir_parameters params; int ret = 0; switch (dev->board) { case CX23885_BOARD_HAUPPAUGE_HVR1250: @@ -982,7 +1000,20 @@ int cx23885_ir_init(struct cx23885_dev *dev) if (ret) break; dev->sd_ir = cx23885_find_hw(dev, CX23885_HW_888_IR); + v4l2_subdev_call(dev->sd_cx25840, core, s_io_pin_config, +ir_pin_cfg_count, ir_pin_cfg); dev->pci_irqmask |= PCI_MSK_IR; + /* +* For these boards we need to invert the Tx output via the +* IR controller to have the LED off while idle +*/ + v4l2_subdev_call(dev->sd_ir, ir, tx_g_parameters, ¶ms); + params.enable = false; + params.shutdown = false; + params.invert_level = true; + v4l2_subdev_call(dev->sd_ir, ir, tx_s_parameters, ¶ms); + params.shutdown = true; + v4l2_subdev_call(dev->sd_ir, ir, tx_s_parameters, ¶ms); break; case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP: request_module("ir-kbd-i2c"); ___ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits