All of lore.kernel.org
 help / color / mirror / Atom feed
* PATCH: gspca-sonixb-led-off.patch
@ 2008-08-24  9:46 Hans de Goede
  0 siblings, 0 replies; only message in thread
From: Hans de Goede @ 2008-08-24  9:46 UTC (permalink / raw)
  To: Jean-Francois Moine; +Cc: Linux and Kernel Video

[-- Attachment #1: Type: text/plain, Size: 221 bytes --]

Hi,

* Turn the led of the cam off after plugging in the cam
* Move the probe code from open to config, so that if the probe fails
   we never register

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>

Regards,

Hans

[-- Attachment #2: gspca-sonixb-led-off.patch --]
[-- Type: text/plain, Size: 1119 bytes --]

* Turn the led of the cam off after plugging in the cam
* Move the probe code from open to config, so that if the probe fails
  we never register

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
diff -r a392efb75b57 linux/drivers/media/video/gspca/sonixb.c
--- a/linux/drivers/media/video/gspca/sonixb.c	Sun Aug 24 11:37:43 2008 +0200
+++ b/linux/drivers/media/video/gspca/sonixb.c	Sun Aug 24 11:40:27 2008 +0200
@@ -789,6 +789,11 @@
 	struct sd *sd = (struct sd *) gspca_dev;
 	struct cam *cam;
 	int sif = 0;
+	const __u8 stop = 0x09; /* Disable stream turn of LED */
+
+	reg_r(gspca_dev, 0x00);
+	if (gspca_dev->usb_buf[0] != 0x10)
+		return -ENODEV;
 
 	/* copy the webcam info from the device id */
 	sd->sensor = (id->driver_info >> 24) & 0xff;
@@ -821,15 +826,15 @@
 		sd->autogain = AUTOGAIN_DEF;
 	sd->freq = FREQ_DEF;
 
+	/* Disable stream turn of LED */
+	reg_w(gspca_dev, 0x01, &stop, 1);
+
 	return 0;
 }
 
 /* this function is called at open time */
 static int sd_open(struct gspca_dev *gspca_dev)
 {
-	reg_r(gspca_dev, 0x00);
-	if (gspca_dev->usb_buf[0] != 0x10)
-		return -ENODEV;
 	return 0;
 }
 

[-- Attachment #3: Type: text/plain, Size: 164 bytes --]

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-08-24  9:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-24  9:46 PATCH: gspca-sonixb-led-off.patch Hans de Goede

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.