[media] cx23885: add IR for DVBSky T9580 Dual DVB-S2/T2/C PCIe card
authornibble.max <nibble.max@gmail.com>
Mon, 29 Sep 2014 14:17:36 +0000 (11:17 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Thu, 30 Oct 2014 18:54:26 +0000 (16:54 -0200)
DVBSky T9580 uses Integrated CX23885 IR controller to decode IR signal.
The IR type of DVBSky remote control is RC5.

Signed-off-by: Nibble Max <nibble.max@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/pci/cx23885/cx23885-cards.c
drivers/media/pci/cx23885/cx23885-input.c

index e8965e63eb09f53b01fac98282b99ad481949021..c4a69e404c3b837969b3857be23da02e2235e4a3 100644 (file)
@@ -1659,6 +1659,7 @@ int cx23885_ir_init(struct cx23885_dev *dev)
        case CX23885_BOARD_MYGICA_X8507:
        case CX23885_BOARD_TBS_6980:
        case CX23885_BOARD_TBS_6981:
+       case CX23885_BOARD_DVBSKY_T9580:
                if (!enable_885_ir)
                        break;
                dev->sd_ir = cx23885_find_hw(dev, CX23885_HW_AV_CORE);
@@ -1705,6 +1706,7 @@ void cx23885_ir_fini(struct cx23885_dev *dev)
        case CX23885_BOARD_MYGICA_X8507:
        case CX23885_BOARD_TBS_6980:
        case CX23885_BOARD_TBS_6981:
+       case CX23885_BOARD_DVBSKY_T9580:
                cx23885_irq_remove(dev, PCI_MSK_AV_CORE);
                /* sd_ir is a duplicate pointer to the AV Core, just clear it */
                dev->sd_ir = NULL;
@@ -1752,6 +1754,7 @@ void cx23885_ir_pci_int_enable(struct cx23885_dev *dev)
        case CX23885_BOARD_MYGICA_X8507:
        case CX23885_BOARD_TBS_6980:
        case CX23885_BOARD_TBS_6981:
+       case CX23885_BOARD_DVBSKY_T9580:
                if (dev->sd_ir)
                        cx23885_irq_add_enable(dev, PCI_MSK_AV_CORE);
                break;
index 9d37fe6616913f268cd52499f3c7d089831aeb1c..f81c2f9f0e9235477539ff117b857e10d8b785a8 100644 (file)
@@ -87,6 +87,7 @@ void cx23885_input_rx_work_handler(struct cx23885_dev *dev, u32 events)
        case CX23885_BOARD_MYGICA_X8507:
        case CX23885_BOARD_TBS_6980:
        case CX23885_BOARD_TBS_6981:
+       case CX23885_BOARD_DVBSKY_T9580:
                /*
                 * The only boards we handle right now.  However other boards
                 * using the CX2388x integrated IR controller should be similar
@@ -139,6 +140,7 @@ static int cx23885_input_ir_start(struct cx23885_dev *dev)
        case CX23885_BOARD_HAUPPAUGE_HVR1290:
        case CX23885_BOARD_HAUPPAUGE_HVR1250:
        case CX23885_BOARD_MYGICA_X8507:
+       case CX23885_BOARD_DVBSKY_T9580:
                /*
                 * The IR controller on this board only returns pulse widths.
                 * Any other mode setting will fail to set up the device.
@@ -305,6 +307,12 @@ int cx23885_input_init(struct cx23885_dev *dev)
                /* A guess at the remote */
                rc_map = RC_MAP_TBS_NEC;
                break;
+       case CX23885_BOARD_DVBSKY_T9580:
+               /* Integrated CX23885 IR controller */
+               driver_type = RC_DRIVER_IR_RAW;
+               allowed_protos = RC_BIT_ALL;
+               rc_map = RC_MAP_DVBSKY;
+               break;
        default:
                return -ENODEV;
        }