aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2010-01-29 09:05:25 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-02-26 13:11:08 -0500
commit1a3510265b45e2d7f55879c7ff576b947e0b1bd7 (patch)
tree278a788093a076035943b218658d10ecbcfae413 /drivers/media/video
parent32ea3e44b9d9125960e23f56ce86c39700447717 (diff)
V4L/DVB: gscpa_zc3xx: Add support for camera button
gscpa_zc3xx: Add support for camera button Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video')
-rw-r--r--drivers/media/video/gspca/zc3xx.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/media/video/gspca/zc3xx.c b/drivers/media/video/gspca/zc3xx.c
index 8c31aa9b26e2..50986da3d912 100644
--- a/drivers/media/video/gspca/zc3xx.c
+++ b/drivers/media/video/gspca/zc3xx.c
@@ -21,6 +21,7 @@
21 21
22#define MODULE_NAME "zc3xx" 22#define MODULE_NAME "zc3xx"
23 23
24#include <linux/input.h>
24#include "gspca.h" 25#include "gspca.h"
25#include "jpeg.h" 26#include "jpeg.h"
26 27
@@ -7170,6 +7171,22 @@ static int sd_get_jcomp(struct gspca_dev *gspca_dev,
7170 return 0; 7171 return 0;
7171} 7172}
7172 7173
7174#ifdef CONFIG_INPUT
7175static int sd_int_pkt_scan(struct gspca_dev *gspca_dev,
7176 u8 *data, /* interrupt packet data */
7177 int len) /* interrput packet length */
7178{
7179 if (len == 8 && data[4] == 1) {
7180 input_report_key(gspca_dev->input_dev, KEY_CAMERA, 1);
7181 input_sync(gspca_dev->input_dev);
7182 input_report_key(gspca_dev->input_dev, KEY_CAMERA, 0);
7183 input_sync(gspca_dev->input_dev);
7184 }
7185
7186 return 0;
7187}
7188#endif
7189
7173static const struct sd_desc sd_desc = { 7190static const struct sd_desc sd_desc = {
7174 .name = MODULE_NAME, 7191 .name = MODULE_NAME,
7175 .ctrls = sd_ctrls, 7192 .ctrls = sd_ctrls,
@@ -7182,6 +7199,9 @@ static const struct sd_desc sd_desc = {
7182 .querymenu = sd_querymenu, 7199 .querymenu = sd_querymenu,
7183 .get_jcomp = sd_get_jcomp, 7200 .get_jcomp = sd_get_jcomp,
7184 .set_jcomp = sd_set_jcomp, 7201 .set_jcomp = sd_set_jcomp,
7202#ifdef CONFIG_INPUT
7203 .int_pkt_scan = sd_int_pkt_scan,
7204#endif
7185}; 7205};
7186 7206
7187static const __devinitdata struct usb_device_id device_table[] = { 7207static const __devinitdata struct usb_device_id device_table[] = {