V4L/DVB: gspca_ov519: add support for the button on ov511 based cams

Previous thread: V4L/DVB: radio-si470x: Use UTF-8 encoding on a comment by Linux Kernel Mailing List on Friday, February 26, 2010 - 7:05 pm. (1 message)

Next thread: xfs: replace KM_LARGE with explicit vmalloc use by Linux Kernel Mailing List on Friday, February 26, 2010 - 7:05 pm. (1 message)
From: Linux Kernel Mailing List
Date: Friday, February 26, 2010 - 7:05 pm

Gitweb:     http://git.kernel.org/linus/88e8d20a8c7c84533e1aa89dd45354cb5edded37
Commit:     88e8d20a8c7c84533e1aa89dd45354cb5edded37
Parent:     92e232acd61f610e09449dad3f6ff6d3c78887e9
Author:     Hans de Goede <hdegoede@redhat.com>
AuthorDate: Sat Feb 20 04:45:49 2010 -0300
Committer:  Mauro Carvalho Chehab <mchehab@redhat.com>
CommitDate: Fri Feb 26 15:11:10 2010 -0300

    V4L/DVB: gspca_ov519: add support for the button on ov511 based cams
    
    Due to hardware limitations this only works while the camera is
    streaming.
    
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/video/gspca/ov519.c |   22 +++++++++++++++++-----
 1 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/drivers/media/video/gspca/ov519.c b/drivers/media/video/gspca/ov519.c
index 016f8bb..bc4ced6 100644
--- a/drivers/media/video/gspca/ov519.c
+++ b/drivers/media/video/gspca/ov519.c
@@ -2702,6 +2702,11 @@ static void sd_reset_snapshot(struct gspca_dev *gspca_dev)
 	sd->snapshot_needs_reset = 0;
 
 	switch (sd->bridge) {
+	case BRIDGE_OV511:
+	case BRIDGE_OV511PLUS:
+		reg_w(sd, R51x_SYS_SNAP, 0x02);
+		reg_w(sd, R51x_SYS_SNAP, 0x00);
+		break;
 	case BRIDGE_OV518:
 	case BRIDGE_OV518PLUS:
 		reg_w(sd, R51x_SYS_SNAP, 0x02); /* Reset */
@@ -3996,11 +4001,17 @@ static void ov51x_handle_button(struct gspca_dev *gspca_dev, u8 state)
 
 		sd->snapshot_pressed = state;
 	} else {
-		/* On the ov519 we need to reset the button state multiple
-		   times, as resetting does not work as long as the button
-		   stays pressed */
-		if (sd->bridge == BRIDGE_OV519 && state)
-			sd->snapshot_needs_reset = 1;
+		/* On the ov511 / ov519 we need to reset the button state
+		   multiple times, as resetting does not work as long as the
+		   button stays pressed */
+		switch (sd->bridge) {
+		case BRIDGE_OV511:
+		case BRIDGE_OV511PLUS:
+		case BRIDGE_OV519:
+			if ...
Previous thread: V4L/DVB: radio-si470x: Use UTF-8 encoding on a comment by Linux Kernel Mailing List on Friday, February 26, 2010 - 7:05 pm. (1 message)

Next thread: xfs: replace KM_LARGE with explicit vmalloc use by Linux Kernel Mailing List on Friday, February 26, 2010 - 7:05 pm. (1 message)