The patch number 14370 was added via Douglas Schilling Landgraf 
<[email protected]>
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
        Linux Media Mailing List <[email protected]>

------

From: Hans de Goede  <[email protected]>
gscpa_pac207: Add support for camera button


gscpa_pac207: Add support for camera button

Priority: normal

Signed-off-by: Hans de Goede <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: Douglas Schilling Landgraf <[email protected]>


---

 linux/drivers/media/video/gspca/pac207.c |   23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff -r 77e92028c50e -r 4c852e120029 linux/drivers/media/video/gspca/pac207.c
--- a/linux/drivers/media/video/gspca/pac207.c  Wed Mar 03 19:56:03 2010 -0300
+++ b/linux/drivers/media/video/gspca/pac207.c  Wed Mar 03 20:02:03 2010 -0300
@@ -25,6 +25,7 @@
 
 #define MODULE_NAME "pac207"
 
+#include <linux/input.h>
 #include "gspca.h"
 
 MODULE_AUTHOR("Hans de Goede <[email protected]>");
@@ -495,6 +496,25 @@
        return 0;
 }
 
+#ifdef CONFIG_INPUT
+static int sd_int_pkt_scan(struct gspca_dev *gspca_dev,
+                       u8 *data,               /* interrupt packet data */
+                       int len)                /* interrput packet length */
+{
+       int ret = -EINVAL;
+
+       if (len == 2 && data[0] == 0x5a && data[1] == 0x5a) {
+               input_report_key(gspca_dev->input_dev, KEY_CAMERA, 1);
+               input_sync(gspca_dev->input_dev);
+               input_report_key(gspca_dev->input_dev, KEY_CAMERA, 0);
+               input_sync(gspca_dev->input_dev);
+               ret = 0;
+       }
+
+       return ret;
+}
+#endif
+
 /* sub-driver description */
 static const struct sd_desc sd_desc = {
        .name = MODULE_NAME,
@@ -506,6 +526,9 @@
        .stopN = sd_stopN,
        .dq_callback = pac207_do_auto_gain,
        .pkt_scan = sd_pkt_scan,
+#ifdef CONFIG_INPUT
+       .int_pkt_scan = sd_int_pkt_scan,
+#endif
 };
 
 /* -- module initialisation -- */


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/4c852e1200294f458572d14590903484ef1fc62a

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to