V4L/DVB (10242): pwc: add support for webcam snapshot button

This patch adds support for Philips webcam snapshot button as an
event input device, for consistency with other webcam drivers.

Signed-off-by: Pham Thanh Nam <phamthanhnam.ptn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Nam Phạm Thành
2009-01-12 02:50:17 -03:00
committed by Mauro Carvalho Chehab
parent be4f4aecf8
commit e32a7eccd7
3 changed files with 80 additions and 13 deletions

View File

@@ -37,6 +37,9 @@
#include <linux/videodev.h>
#include <media/v4l2-common.h>
#include <media/v4l2-ioctl.h>
#ifdef CONFIG_USB_PWC_INPUT_EVDEV
#include <linux/input.h>
#endif
#include "pwc-uncompress.h"
#include <media/pwc-ioctl.h>
@@ -255,6 +258,9 @@ struct pwc_device
int pan_angle; /* in degrees * 100 */
int tilt_angle; /* absolute angle; 0,0 is home position */
int snapshot_button_status; /* set to 1 when the user push the button, reset to 0 when this value is read */
#ifdef CONFIG_USB_PWC_INPUT_EVDEV
struct input_dev *button_dev; /* webcam snapshot button input */
#endif
/*** Misc. data ***/
wait_queue_head_t frameq; /* When waiting for a frame to finish... */