From 4a7581f084ce308a448f4940ed2c664e9e3d78a1 Mon Sep 17 00:00:00 2001 From: Lukas Karas Date: Sun, 28 Dec 2008 14:09:21 -0300 Subject: V4L/DVB (11408): gspca - m5602-s5k83a: Add led support to the s5k83a sensor. This patch toggles the led seen on many laptops having a m5602 connected to a Samsung s5k83a sensor. Signed-off-by: Lukas Karas Signed-off-by: Erik Andr?n Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/gspca/m5602/m5602_sensor.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/media/video/gspca/m5602/m5602_sensor.h') diff --git a/drivers/media/video/gspca/m5602/m5602_sensor.h b/drivers/media/video/gspca/m5602/m5602_sensor.h index 261623f..8eed4cc 100644 --- a/drivers/media/video/gspca/m5602/m5602_sensor.h +++ b/drivers/media/video/gspca/m5602/m5602_sensor.h @@ -61,6 +61,9 @@ struct m5602_sensor { /* Executed when the camera starts to send data */ int (*start)(struct sd *sd); + /* Executed when the camera ends to send data */ + int (*stop)(struct sd *sd); + /* Performs a power down sequence */ int (*power_down)(struct sd *sd); -- cgit v1.1 From e4cc4fcc7b85ec32f05343b02229492c06baba1a Mon Sep 17 00:00:00 2001 From: Erik Andr?n Date: Tue, 30 Dec 2008 15:27:17 -0300 Subject: V4L/DVB (11411): gspca - m5602: Rework v4l ctrl handling in all sensors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, all sensors allocated a part of a large ctrl vector. Define this vector separately for each sensor instead. Signed-off-by: Erik Andrén Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/gspca/m5602/m5602_sensor.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'drivers/media/video/gspca/m5602/m5602_sensor.h') diff --git a/drivers/media/video/gspca/m5602/m5602_sensor.h b/drivers/media/video/gspca/m5602/m5602_sensor.h index 8eed4cc..5867ee2 100644 --- a/drivers/media/video/gspca/m5602/m5602_sensor.h +++ b/drivers/media/video/gspca/m5602/m5602_sensor.h @@ -24,8 +24,6 @@ #define M5602_DEFAULT_FRAME_WIDTH 640 #define M5602_DEFAULT_FRAME_HEIGHT 480 -#define M5602_MAX_CTRLS (V4L2_CID_LASTP1 - V4L2_CID_BASE + 10) - /* Enumerates all supported sensors */ enum sensors { OV9650_SENSOR = 1, @@ -67,8 +65,7 @@ struct m5602_sensor { /* Performs a power down sequence */ int (*power_down)(struct sd *sd); - int nctrls; - struct ctrl ctrls[M5602_MAX_CTRLS]; + const struct ctrl *ctrls; char nmodes; struct v4l2_pix_format modes[]; -- cgit v1.1 From 74cadfe1314f4cc6060dcfa5cea9ef13c6a824fd Mon Sep 17 00:00:00 2001 From: Erik Andr?n Date: Tue, 30 Dec 2008 16:48:42 -0300 Subject: V4L/DVB (11413): gspca - m5602-mt9m111: Separate mode vectors per sensor. By separating the supported for each sensor into a separate vector we can eliminate the nmodes variable and instead calculate it at runtime. Signed-off-by: Erik Andr?n Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/gspca/m5602/m5602_sensor.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'drivers/media/video/gspca/m5602/m5602_sensor.h') diff --git a/drivers/media/video/gspca/m5602/m5602_sensor.h b/drivers/media/video/gspca/m5602/m5602_sensor.h index 5867ee2..3fd92d3 100644 --- a/drivers/media/video/gspca/m5602/m5602_sensor.h +++ b/drivers/media/video/gspca/m5602/m5602_sensor.h @@ -66,9 +66,6 @@ struct m5602_sensor { int (*power_down)(struct sd *sd); const struct ctrl *ctrls; - - char nmodes; - struct v4l2_pix_format modes[]; }; #endif -- cgit v1.1 From e17cc08c2f0d714715c8c737899a6b9732c868b2 Mon Sep 17 00:00:00 2001 From: Erik Andr?n Date: Tue, 30 Dec 2008 17:06:55 -0300 Subject: V4L/DVB (11414): gspca - m5602-mt9m111: Move v4l2 controls to main sensor file. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move over the v4l2 controls to the sensor specific source file. Remove the now redundant sensor struct member. Signed-off-by: Erik Andrén Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/gspca/m5602/m5602_sensor.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers/media/video/gspca/m5602/m5602_sensor.h') diff --git a/drivers/media/video/gspca/m5602/m5602_sensor.h b/drivers/media/video/gspca/m5602/m5602_sensor.h index 3fd92d3..b3e82af 100644 --- a/drivers/media/video/gspca/m5602/m5602_sensor.h +++ b/drivers/media/video/gspca/m5602/m5602_sensor.h @@ -64,8 +64,6 @@ struct m5602_sensor { /* Performs a power down sequence */ int (*power_down)(struct sd *sd); - - const struct ctrl *ctrls; }; #endif -- cgit v1.1 From 71b755b08e9946592c5354fbe6373eff7660ccbd Mon Sep 17 00:00:00 2001 From: Erik Andr?n Date: Tue, 30 Dec 2008 17:18:23 -0300 Subject: V4L/DVB (11415): gspca - m5602: Remove an unused member in the sd struct. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove an unused sd struct member. Remove a redundant define while we're at it. Signed-off-by: Erik Andrén Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/gspca/m5602/m5602_sensor.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'drivers/media/video/gspca/m5602/m5602_sensor.h') diff --git a/drivers/media/video/gspca/m5602/m5602_sensor.h b/drivers/media/video/gspca/m5602/m5602_sensor.h index b3e82af..5c8fb7a 100644 --- a/drivers/media/video/gspca/m5602/m5602_sensor.h +++ b/drivers/media/video/gspca/m5602/m5602_sensor.h @@ -21,9 +21,6 @@ #include "m5602_bridge.h" -#define M5602_DEFAULT_FRAME_WIDTH 640 -#define M5602_DEFAULT_FRAME_HEIGHT 480 - /* Enumerates all supported sensors */ enum sensors { OV9650_SENSOR = 1, -- cgit v1.1 From d9c700d415f05760f0129f798223cb4ac6a46d4b Mon Sep 17 00:00:00 2001 From: Erik Andr?n Date: Sat, 3 Jan 2009 12:10:11 -0300 Subject: V4L/DVB (11423): gspca - m5602-ov9650: Add a disconnect hook, setup a ctrl cache ctrl. Reading and writing to a register doesn't always work reliably. Add a cache and ensure that it is deallocated properly upon module disconnect. Signed-off-by: Erik Andr?n Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/gspca/m5602/m5602_sensor.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/media/video/gspca/m5602/m5602_sensor.h') diff --git a/drivers/media/video/gspca/m5602/m5602_sensor.h b/drivers/media/video/gspca/m5602/m5602_sensor.h index 5c8fb7a..0d30269 100644 --- a/drivers/media/video/gspca/m5602/m5602_sensor.h +++ b/drivers/media/video/gspca/m5602/m5602_sensor.h @@ -59,6 +59,9 @@ struct m5602_sensor { /* Executed when the camera ends to send data */ int (*stop)(struct sd *sd); + /* Executed when the device is disconnected */ + void (*disconnect)(struct sd *sd); + /* Performs a power down sequence */ int (*power_down)(struct sd *sd); }; -- cgit v1.1