]> err.no Git - linux-2.6/commitdiff
V4L/DVB (6699): pvrusb2: Use of virtual IR chip is a device-specific attribute
authorMike Isely <isely@pobox.com>
Mon, 26 Nov 2007 05:09:42 +0000 (02:09 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Fri, 25 Jan 2008 21:03:05 +0000 (19:03 -0200)
For Hauppauge 24xxx devices, the IR receiver is a custom piece of
logic that is very specific to the device.  The pvrusb2 driver can
virtualize this to make it look like a more normal IR receiver found
in other Hauppauge devices.  The decision of whether or not to enable
this virtualization however is a device-specific attribute, thus this
changeset.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/pvrusb2/pvrusb2-devattr.c
drivers/media/video/pvrusb2/pvrusb2-devattr.h
drivers/media/video/pvrusb2/pvrusb2-i2c-core.c

index 464a13a064940e093dc542fcb5c8b7046b6ede34..6ba0b79e3a1e0aa62d4b1988b0e00db5726b3dfe 100644 (file)
@@ -85,6 +85,7 @@ const struct pvr2_device_desc pvr2_device_descriptions[] = {
                .flag_has_cx25840 = !0,
                .flag_has_wm8775 = !0,
                .flag_has_hauppauge_rom = !0,
+               .flag_has_hauppauge_custom_ir = !0,
                .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
        },
 };
index 05eb2c669ee814b8c73d99aa80c05d9e7def32fd..2aff5a3d5a554ef9237f243d9c64ca41a66c14b7 100644 (file)
@@ -84,6 +84,10 @@ struct pvr2_device_desc {
        /* Device has a wm8775 - this enables special additional logic to
           ensure that it is found. */
        char flag_has_wm8775;
+
+       /* Device has IR hardware that can be faked into looking like a
+          normal Hauppauge i2c IR receiver. */
+       char flag_has_hauppauge_custom_ir;
 };
 
 extern const struct pvr2_device_desc pvr2_device_descriptions[];
index 7721ec85d57268debff4c6cee6e62dd03beb3ef8..62867fa3517ae4cd201b2971372aa180ccf716d8 100644 (file)
@@ -980,7 +980,7 @@ void pvr2_i2c_core_init(struct pvr2_hdw *hdw)
                printk(KERN_INFO "%s: IR disabled\n",hdw->name);
                hdw->i2c_func[0x18] = i2c_black_hole;
        } else if (ir_mode[hdw->unit_number] == 1) {
-               if (hdw->hdw_desc->flag_has_cx25840) {
+               if (hdw->hdw_desc->flag_has_hauppauge_custom_ir) {
                        hdw->i2c_func[0x18] = i2c_24xxx_ir;
                }
        }