]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
[media] cx23885: add RC support for MyGica X8507
authorAlfredo Jesús Delaiti <alfredodelaiti@netscape.net>
Thu, 8 Nov 2012 18:50:25 +0000 (15:50 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 23 Dec 2012 21:42:40 +0000 (19:42 -0200)
This series add remote control support for MyGica X8507.
I test for 2 month under OpenSuse(X64) 11.4 and 12.2 with
kernel 3.4, 3.5, 3.6 also 3.7-rc2 and rc3.

[mchehab@redhat.com: fixed whitespacing - it seems that Alfredo's emailer mangled
 it]

Signed-off-by: Alfredo J. Delaiti <alfredodelaiti@netscape.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/pci/cx23885/cx23885-cards.c
drivers/media/pci/cx23885/cx23885-input.c

index 7a79a17105c470bafdebb5792f8fe1c6e81bfcb3..8d96ae4ebbdd9ca3839ce78d35ee4c7bac212452 100644 (file)
@@ -1408,6 +1408,7 @@ int cx23885_ir_init(struct cx23885_dev *dev)
                break;
        case CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL:
        case CX23885_BOARD_TEVII_S470:
+       case CX23885_BOARD_MYGICA_X8507:
                if (!enable_885_ir)
                        break;
                dev->sd_ir = cx23885_find_hw(dev, CX23885_HW_AV_CORE);
@@ -1450,6 +1451,7 @@ void cx23885_ir_fini(struct cx23885_dev *dev)
        case CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL:
        case CX23885_BOARD_TEVII_S470:
        case CX23885_BOARD_HAUPPAUGE_HVR1250:
+       case CX23885_BOARD_MYGICA_X8507:
                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;
@@ -1494,6 +1496,7 @@ void cx23885_ir_pci_int_enable(struct cx23885_dev *dev)
        case CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL:
        case CX23885_BOARD_TEVII_S470:
        case CX23885_BOARD_HAUPPAUGE_HVR1250:
+       case CX23885_BOARD_MYGICA_X8507:
                if (dev->sd_ir)
                        cx23885_irq_add_enable(dev, PCI_MSK_AV_CORE);
                break;
index 4f1055a194b51d9446747d52361f7334eef8a51c..7875dfbe09ffae666e8365e877022af4d16a7be2 100644 (file)
@@ -89,6 +89,7 @@ void cx23885_input_rx_work_handler(struct cx23885_dev *dev, u32 events)
        case CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL:
        case CX23885_BOARD_TEVII_S470:
        case CX23885_BOARD_HAUPPAUGE_HVR1250:
+       case CX23885_BOARD_MYGICA_X8507:
                /*
                 * The only boards we handle right now.  However other boards
                 * using the CX2388x integrated IR controller should be similar
@@ -140,6 +141,7 @@ static int cx23885_input_ir_start(struct cx23885_dev *dev)
        case CX23885_BOARD_HAUPPAUGE_HVR1850:
        case CX23885_BOARD_HAUPPAUGE_HVR1290:
        case CX23885_BOARD_HAUPPAUGE_HVR1250:
+       case CX23885_BOARD_MYGICA_X8507:
                /*
                 * The IR controller on this board only returns pulse widths.
                 * Any other mode setting will fail to set up the device.
@@ -289,6 +291,13 @@ int cx23885_input_init(struct cx23885_dev *dev)
                /* A guess at the remote */
                rc_map = RC_MAP_TEVII_NEC;
                break;
+       case CX23885_BOARD_MYGICA_X8507:
+               /* Integrated CX23885 IR controller */
+               driver_type = RC_DRIVER_IR_RAW;
+               allowed_protos = RC_BIT_ALL;
+               /* A guess at the remote */
+               rc_map = RC_MAP_TOTAL_MEDIA_IN_HAND_02;
+               break;
        default:
                return -ENODEV;
        }