Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 181765
b: refs/heads/master
c: 0158e98
h: refs/heads/master
i:
  181763: ce91f66
v: v3
  • Loading branch information
Hans de Goede authored and Mauro Carvalho Chehab committed Feb 26, 2010
1 parent b2de056 commit 84c9787
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 88e8d20a8c7c84533e1aa89dd45354cb5edded37
refs/heads/master: 0158e98fa15f6980568d7c3f67f035d3783319cd
29 changes: 28 additions & 1 deletion trunk/drivers/media/video/gspca/stv06xx/stv06xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
* P/N 861040-0000: Sensor ST VV6410 ASIC STV0610 - QuickCam Web
*/

#include <linux/input.h>
#include "stv06xx_sensor.h"

MODULE_AUTHOR("Erik Andrén");
Expand Down Expand Up @@ -427,6 +428,29 @@ static void stv06xx_pkt_scan(struct gspca_dev *gspca_dev,
}
}

#ifdef CONFIG_INPUT
static int sd_int_pkt_scan(struct gspca_dev *gspca_dev,
u8 *data, /* interrupt packet data */
int len) /* interrupt packet length */
{
int ret = -EINVAL;

if (len == 1 && data[0] == 0x80) {
input_report_key(gspca_dev->input_dev, KEY_CAMERA, 1);
input_sync(gspca_dev->input_dev);
ret = 0;
}

if (len == 1 && data[0] == 0x88) {
input_report_key(gspca_dev->input_dev, KEY_CAMERA, 0);
input_sync(gspca_dev->input_dev);
ret = 0;
}

return ret;
}
#endif

static int stv06xx_config(struct gspca_dev *gspca_dev,
const struct usb_device_id *id);

Expand All @@ -437,7 +461,10 @@ static const struct sd_desc sd_desc = {
.init = stv06xx_init,
.start = stv06xx_start,
.stopN = stv06xx_stopN,
.pkt_scan = stv06xx_pkt_scan
.pkt_scan = stv06xx_pkt_scan,
#ifdef CONFIG_INPUT
.int_pkt_scan = sd_int_pkt_scan,
#endif
};

/* This function is called at probe time */
Expand Down

0 comments on commit 84c9787

Please sign in to comment.