diff options
author | Erik Andren <erik.andren@gmail.com> | 2008-10-16 15:46:07 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-17 16:39:40 -0400 |
commit | 17ea88ae956279b20e7be8e2906212fbdde24f3d (patch) | |
tree | 3d53e1bdcfcf0b3f1bba9c562058c700ad2b00a3 | |
parent | 0c505e688bb22c1b4431b4c07cd1fcff22fe37a2 (diff) |
V4L/DVB (9280): gspca: Use the gspca debug macros
Signed-off-by: Erik Andren <erik.andren@gmail.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_bridge.h | 27 | ||||
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_core.c | 34 | ||||
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_mt9m111.c | 16 | ||||
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_ov9650.c | 38 | ||||
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_po1030.c | 25 | ||||
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_s5k4aa.c | 20 | ||||
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_s5k83a.c | 4 |
7 files changed, 66 insertions, 98 deletions
diff --git a/drivers/media/video/gspca/m5602/m5602_bridge.h b/drivers/media/video/gspca/m5602/m5602_bridge.h index 0669e72ff223..1a37ae4bc82d 100644 --- a/drivers/media/video/gspca/m5602/m5602_bridge.h +++ b/drivers/media/video/gspca/m5602/m5602_bridge.h | |||
@@ -25,33 +25,6 @@ | |||
25 | 25 | ||
26 | /*****************************************************************************/ | 26 | /*****************************************************************************/ |
27 | 27 | ||
28 | #undef PDEBUG | ||
29 | #undef info | ||
30 | #undef err | ||
31 | |||
32 | #define err(format, arg...) printk(KERN_ERR KBUILD_MODNAME ": " \ | ||
33 | format "\n" , ## arg) | ||
34 | #define info(format, arg...) printk(KERN_INFO KBUILD_MODNAME ": " \ | ||
35 | format "\n" , ## arg) | ||
36 | |||
37 | /* Debug parameters */ | ||
38 | #define DBG_INIT 0x1 | ||
39 | #define DBG_PROBE 0x2 | ||
40 | #define DBG_V4L2 0x4 | ||
41 | #define DBG_TRACE 0x8 | ||
42 | #define DBG_DATA 0x10 | ||
43 | #define DBG_V4L2_CID 0x20 | ||
44 | #define DBG_GSPCA 0x40 | ||
45 | |||
46 | #define PDEBUG(level, fmt, args...) \ | ||
47 | do { \ | ||
48 | if (m5602_debug & level) \ | ||
49 | info("[%s:%d] " fmt, __func__, __LINE__ , \ | ||
50 | ## args); \ | ||
51 | } while (0) | ||
52 | |||
53 | /*****************************************************************************/ | ||
54 | |||
55 | #define M5602_XB_SENSOR_TYPE 0x00 | 28 | #define M5602_XB_SENSOR_TYPE 0x00 |
56 | #define M5602_XB_SENSOR_CTRL 0x01 | 29 | #define M5602_XB_SENSOR_CTRL 0x01 |
57 | #define M5602_XB_LINE_OF_FRAME_H 0x02 | 30 | #define M5602_XB_LINE_OF_FRAME_H 0x02 |
diff --git a/drivers/media/video/gspca/m5602/m5602_core.c b/drivers/media/video/gspca/m5602/m5602_core.c index 687d54641da5..fd6ce384b487 100644 --- a/drivers/media/video/gspca/m5602/m5602_core.c +++ b/drivers/media/video/gspca/m5602/m5602_core.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * USB Driver for ALi m5602 based webcams | 2 | * USB Driver for ALi m5602 based webcams |
3 | * | 3 | * |
4 | * Copyright (C) 2008 Erik Andrén | 4 | * Copyright (C) 2008 Erik Andrén |
@@ -26,7 +26,6 @@ | |||
26 | int force_sensor; | 26 | int force_sensor; |
27 | int dump_bridge; | 27 | int dump_bridge; |
28 | int dump_sensor; | 28 | int dump_sensor; |
29 | unsigned int m5602_debug; | ||
30 | 29 | ||
31 | static const __devinitdata struct usb_device_id m5602_table[] = { | 30 | static const __devinitdata struct usb_device_id m5602_table[] = { |
32 | {USB_DEVICE(0x0402, 0x5602)}, | 31 | {USB_DEVICE(0x0402, 0x5602)}, |
@@ -48,7 +47,7 @@ int m5602_read_bridge(struct sd *sd, u8 address, u8 *i2c_data) | |||
48 | 1, M5602_URB_MSG_TIMEOUT); | 47 | 1, M5602_URB_MSG_TIMEOUT); |
49 | *i2c_data = buf[0]; | 48 | *i2c_data = buf[0]; |
50 | 49 | ||
51 | PDEBUG(DBG_TRACE, "Reading bridge register 0x%x containing 0x%x", | 50 | PDEBUG(D_CONF, "Reading bridge register 0x%x containing 0x%x", |
52 | address, *i2c_data); | 51 | address, *i2c_data); |
53 | 52 | ||
54 | /* usb_control_msg(...) returns the number of bytes sent upon success, | 53 | /* usb_control_msg(...) returns the number of bytes sent upon success, |
@@ -63,7 +62,7 @@ int m5602_write_bridge(struct sd *sd, u8 address, u8 i2c_data) | |||
63 | struct usb_device *udev = sd->gspca_dev.dev; | 62 | struct usb_device *udev = sd->gspca_dev.dev; |
64 | __u8 *buf = sd->gspca_dev.usb_buf; | 63 | __u8 *buf = sd->gspca_dev.usb_buf; |
65 | 64 | ||
66 | PDEBUG(DBG_TRACE, "Writing bridge register 0x%x with 0x%x", | 65 | PDEBUG(D_CONF, "Writing bridge register 0x%x with 0x%x", |
67 | address, i2c_data); | 66 | address, i2c_data); |
68 | 67 | ||
69 | memcpy(buf, bridge_urb_skeleton, | 68 | memcpy(buf, bridge_urb_skeleton, |
@@ -91,7 +90,8 @@ static void m5602_dump_bridge(struct sd *sd) | |||
91 | m5602_read_bridge(sd, i, &val); | 90 | m5602_read_bridge(sd, i, &val); |
92 | info("ALi m5602 address 0x%x contains 0x%x", i, val); | 91 | info("ALi m5602 address 0x%x contains 0x%x", i, val); |
93 | } | 92 | } |
94 | info("Warning: The camera probably won't work until it's power cycled"); | 93 | info("Warning: The ALi m5602 webcam probably won't work " |
94 | "until it's power cycled"); | ||
95 | } | 95 | } |
96 | 96 | ||
97 | static int m5602_probe_sensor(struct sd *sd) | 97 | static int m5602_probe_sensor(struct sd *sd) |
@@ -135,7 +135,7 @@ static int m5602_init(struct gspca_dev *gspca_dev) | |||
135 | struct sd *sd = (struct sd *) gspca_dev; | 135 | struct sd *sd = (struct sd *) gspca_dev; |
136 | int err; | 136 | int err; |
137 | 137 | ||
138 | PDEBUG(DBG_TRACE, "Initializing ALi m5602 webcam"); | 138 | PDEBUG(D_CONF, "Initializing ALi m5602 webcam"); |
139 | /* Run the init sequence */ | 139 | /* Run the init sequence */ |
140 | err = sd->sensor->init(sd); | 140 | err = sd->sensor->init(sd); |
141 | 141 | ||
@@ -156,7 +156,7 @@ static int m5602_start_transfer(struct gspca_dev *gspca_dev) | |||
156 | 0x04, 0x40, 0x19, 0x0000, buf, | 156 | 0x04, 0x40, 0x19, 0x0000, buf, |
157 | 4, M5602_URB_MSG_TIMEOUT); | 157 | 4, M5602_URB_MSG_TIMEOUT); |
158 | 158 | ||
159 | PDEBUG(DBG_V4L2, "Transfer started"); | 159 | PDEBUG(D_STREAM, "Transfer started"); |
160 | return (err < 0) ? err : 0; | 160 | return (err < 0) ? err : 0; |
161 | } | 161 | } |
162 | 162 | ||
@@ -167,14 +167,14 @@ static void m5602_urb_complete(struct gspca_dev *gspca_dev, | |||
167 | struct sd *sd = (struct sd *) gspca_dev; | 167 | struct sd *sd = (struct sd *) gspca_dev; |
168 | 168 | ||
169 | if (len < 6) { | 169 | if (len < 6) { |
170 | PDEBUG(DBG_DATA, "Packet is less than 6 bytes"); | 170 | PDEBUG(D_PACK, "Packet is less than 6 bytes"); |
171 | return; | 171 | return; |
172 | } | 172 | } |
173 | 173 | ||
174 | /* Frame delimiter: ff xx xx xx ff ff */ | 174 | /* Frame delimiter: ff xx xx xx ff ff */ |
175 | if (data[0] == 0xff && data[4] == 0xff && data[5] == 0xff && | 175 | if (data[0] == 0xff && data[4] == 0xff && data[5] == 0xff && |
176 | data[2] != sd->frame_id) { | 176 | data[2] != sd->frame_id) { |
177 | PDEBUG(DBG_DATA, "Frame delimiter detected"); | 177 | PDEBUG(D_FRAM, "Frame delimiter detected"); |
178 | sd->frame_id = data[2]; | 178 | sd->frame_id = data[2]; |
179 | 179 | ||
180 | /* Remove the extra fluff appended on each header */ | 180 | /* Remove the extra fluff appended on each header */ |
@@ -189,7 +189,7 @@ static void m5602_urb_complete(struct gspca_dev *gspca_dev, | |||
189 | /* Create a new frame */ | 189 | /* Create a new frame */ |
190 | gspca_frame_add(gspca_dev, FIRST_PACKET, frame, data, len); | 190 | gspca_frame_add(gspca_dev, FIRST_PACKET, frame, data, len); |
191 | 191 | ||
192 | PDEBUG(DBG_V4L2, "Starting new frame %d", | 192 | PDEBUG(D_FRAM, "Starting new frame %d", |
193 | sd->frame_count); | 193 | sd->frame_count); |
194 | 194 | ||
195 | } else { | 195 | } else { |
@@ -200,7 +200,7 @@ static void m5602_urb_complete(struct gspca_dev *gspca_dev, | |||
200 | len -= 4; | 200 | len -= 4; |
201 | 201 | ||
202 | if (cur_frame_len + len <= frame->v4l2_buf.length) { | 202 | if (cur_frame_len + len <= frame->v4l2_buf.length) { |
203 | PDEBUG(DBG_DATA, "Continuing frame %d copying %d bytes", | 203 | PDEBUG(D_FRAM, "Continuing frame %d copying %d bytes", |
204 | sd->frame_count, len); | 204 | sd->frame_count, len); |
205 | 205 | ||
206 | gspca_frame_add(gspca_dev, INTER_PACKET, frame, | 206 | gspca_frame_add(gspca_dev, INTER_PACKET, frame, |
@@ -236,8 +236,6 @@ static int m5602_configure(struct gspca_dev *gspca_dev, | |||
236 | struct cam *cam; | 236 | struct cam *cam; |
237 | int err; | 237 | int err; |
238 | 238 | ||
239 | PDEBUG(DBG_GSPCA, "m5602_configure start"); | ||
240 | |||
241 | cam = &gspca_dev->cam; | 239 | cam = &gspca_dev->cam; |
242 | cam->epaddr = M5602_ISOC_ENDPOINT_ADDR; | 240 | cam->epaddr = M5602_ISOC_ENDPOINT_ADDR; |
243 | sd->desc = &sd_desc; | 241 | sd->desc = &sd_desc; |
@@ -250,11 +248,10 @@ static int m5602_configure(struct gspca_dev *gspca_dev, | |||
250 | if (err) | 248 | if (err) |
251 | goto fail; | 249 | goto fail; |
252 | 250 | ||
253 | PDEBUG(DBG_GSPCA, "m5602_configure end"); | ||
254 | return 0; | 251 | return 0; |
255 | 252 | ||
256 | fail: | 253 | fail: |
257 | PDEBUG(DBG_GSPCA, "m5602_configure failed"); | 254 | PDEBUG(D_ERR, "ALi m5602 webcam failed"); |
258 | cam->cam_mode = NULL; | 255 | cam->cam_mode = NULL; |
259 | cam->nmodes = 0; | 256 | cam->nmodes = 0; |
260 | 257 | ||
@@ -284,13 +281,13 @@ static int __init mod_m5602_init(void) | |||
284 | { | 281 | { |
285 | if (usb_register(&sd_driver) < 0) | 282 | if (usb_register(&sd_driver) < 0) |
286 | return -1; | 283 | return -1; |
287 | PDEBUG(D_PROBE, "m5602 module registered"); | 284 | PDEBUG(D_PROBE, "registered"); |
288 | return 0; | 285 | return 0; |
289 | } | 286 | } |
290 | static void __exit mod_m5602_exit(void) | 287 | static void __exit mod_m5602_exit(void) |
291 | { | 288 | { |
292 | usb_deregister(&sd_driver); | 289 | usb_deregister(&sd_driver); |
293 | PDEBUG(D_PROBE, "m5602 module deregistered"); | 290 | PDEBUG(D_PROBE, "deregistered"); |
294 | } | 291 | } |
295 | 292 | ||
296 | module_init(mod_m5602_init); | 293 | module_init(mod_m5602_init); |
@@ -299,9 +296,6 @@ module_exit(mod_m5602_exit); | |||
299 | MODULE_AUTHOR(DRIVER_AUTHOR); | 296 | MODULE_AUTHOR(DRIVER_AUTHOR); |
300 | MODULE_DESCRIPTION(DRIVER_DESC); | 297 | MODULE_DESCRIPTION(DRIVER_DESC); |
301 | MODULE_LICENSE("GPL"); | 298 | MODULE_LICENSE("GPL"); |
302 | module_param_named(debug, m5602_debug, int, S_IRUGO | S_IWUSR); | ||
303 | MODULE_PARM_DESC(debug, "toggles debug on/off"); | ||
304 | |||
305 | module_param(force_sensor, int, S_IRUGO | S_IWUSR); | 299 | module_param(force_sensor, int, S_IRUGO | S_IWUSR); |
306 | MODULE_PARM_DESC(force_sensor, | 300 | MODULE_PARM_DESC(force_sensor, |
307 | "force detection of sensor, " | 301 | "force detection of sensor, " |
diff --git a/drivers/media/video/gspca/m5602/m5602_mt9m111.c b/drivers/media/video/gspca/m5602/m5602_mt9m111.c index a0e0bff87dc4..fb700c2d055a 100644 --- a/drivers/media/video/gspca/m5602/m5602_mt9m111.c +++ b/drivers/media/video/gspca/m5602/m5602_mt9m111.c | |||
@@ -107,7 +107,7 @@ int mt9m111_get_vflip(struct gspca_dev *gspca_dev, __s32 *val) | |||
107 | err = mt9m111_read_sensor(sd, MT9M111_SC_R_MODE_CONTEXT_B, | 107 | err = mt9m111_read_sensor(sd, MT9M111_SC_R_MODE_CONTEXT_B, |
108 | data, 2); | 108 | data, 2); |
109 | *val = data[0] & MT9M111_RMB_MIRROR_ROWS; | 109 | *val = data[0] & MT9M111_RMB_MIRROR_ROWS; |
110 | PDEBUG(DBG_V4L2_CID, "Read vertical flip %d", *val); | 110 | PDEBUG(D_V4L2, "Read vertical flip %d", *val); |
111 | 111 | ||
112 | return (err < 0) ? err : 0; | 112 | return (err < 0) ? err : 0; |
113 | } | 113 | } |
@@ -118,7 +118,7 @@ int mt9m111_set_vflip(struct gspca_dev *gspca_dev, __s32 val) | |||
118 | u8 data[2] = {0x00, 0x00}; | 118 | u8 data[2] = {0x00, 0x00}; |
119 | struct sd *sd = (struct sd *) gspca_dev; | 119 | struct sd *sd = (struct sd *) gspca_dev; |
120 | 120 | ||
121 | PDEBUG(DBG_V4L2_CID, "Set vertical flip to %d", val); | 121 | PDEBUG(D_V4L2, "Set vertical flip to %d", val); |
122 | 122 | ||
123 | /* Set the correct page map */ | 123 | /* Set the correct page map */ |
124 | err = mt9m111_write_sensor(sd, MT9M111_PAGE_MAP, data, 2); | 124 | err = mt9m111_write_sensor(sd, MT9M111_PAGE_MAP, data, 2); |
@@ -145,7 +145,7 @@ int mt9m111_get_hflip(struct gspca_dev *gspca_dev, __s32 *val) | |||
145 | err = mt9m111_read_sensor(sd, MT9M111_SC_R_MODE_CONTEXT_B, | 145 | err = mt9m111_read_sensor(sd, MT9M111_SC_R_MODE_CONTEXT_B, |
146 | data, 2); | 146 | data, 2); |
147 | *val = data[0] & MT9M111_RMB_MIRROR_COLS; | 147 | *val = data[0] & MT9M111_RMB_MIRROR_COLS; |
148 | PDEBUG(DBG_V4L2_CID, "Read horizontal flip %d", *val); | 148 | PDEBUG(D_V4L2, "Read horizontal flip %d", *val); |
149 | 149 | ||
150 | return (err < 0) ? err : 0; | 150 | return (err < 0) ? err : 0; |
151 | } | 151 | } |
@@ -156,7 +156,7 @@ int mt9m111_set_hflip(struct gspca_dev *gspca_dev, __s32 val) | |||
156 | u8 data[2] = {0x00, 0x00}; | 156 | u8 data[2] = {0x00, 0x00}; |
157 | struct sd *sd = (struct sd *) gspca_dev; | 157 | struct sd *sd = (struct sd *) gspca_dev; |
158 | 158 | ||
159 | PDEBUG(DBG_V4L2_CID, "Set horizontal flip to %d", val); | 159 | PDEBUG(D_V4L2, "Set horizontal flip to %d", val); |
160 | 160 | ||
161 | /* Set the correct page map */ | 161 | /* Set the correct page map */ |
162 | err = mt9m111_write_sensor(sd, MT9M111_PAGE_MAP, data, 2); | 162 | err = mt9m111_write_sensor(sd, MT9M111_PAGE_MAP, data, 2); |
@@ -188,7 +188,7 @@ int mt9m111_get_gain(struct gspca_dev *gspca_dev, __s32 *val) | |||
188 | ((tmp & (1 << 8)) * 2) | | 188 | ((tmp & (1 << 8)) * 2) | |
189 | (tmp & 0x7f); | 189 | (tmp & 0x7f); |
190 | 190 | ||
191 | PDEBUG(DBG_V4L2_CID, "Read gain %d", *val); | 191 | PDEBUG(D_V4L2, "Read gain %d", *val); |
192 | 192 | ||
193 | return (err < 0) ? err : 0; | 193 | return (err < 0) ? err : 0; |
194 | } | 194 | } |
@@ -222,7 +222,7 @@ int mt9m111_set_gain(struct gspca_dev *gspca_dev, __s32 val) | |||
222 | 222 | ||
223 | data[1] = (tmp & 0xff00) >> 8; | 223 | data[1] = (tmp & 0xff00) >> 8; |
224 | data[0] = (tmp & 0xff); | 224 | data[0] = (tmp & 0xff); |
225 | PDEBUG(DBG_V4L2_CID, "tmp=%d, data[1]=%d, data[0]=%d", tmp, | 225 | PDEBUG(D_V4L2, "tmp=%d, data[1]=%d, data[0]=%d", tmp, |
226 | data[1], data[0]); | 226 | data[1], data[0]); |
227 | 227 | ||
228 | err = mt9m111_write_sensor(sd, MT9M111_SC_GLOBAL_GAIN, | 228 | err = mt9m111_write_sensor(sd, MT9M111_SC_GLOBAL_GAIN, |
@@ -257,7 +257,7 @@ int mt9m111_read_sensor(struct sd *sd, const u8 address, | |||
257 | for (i = 0; i < len && !err; i++) { | 257 | for (i = 0; i < len && !err; i++) { |
258 | err = m5602_read_bridge(sd, M5602_XB_I2C_DATA, &(i2c_data[i])); | 258 | err = m5602_read_bridge(sd, M5602_XB_I2C_DATA, &(i2c_data[i])); |
259 | 259 | ||
260 | PDEBUG(DBG_TRACE, "Reading sensor register " | 260 | PDEBUG(D_CONF, "Reading sensor register " |
261 | "0x%x contains 0x%x ", address, *i2c_data); | 261 | "0x%x contains 0x%x ", address, *i2c_data); |
262 | } | 262 | } |
263 | out: | 263 | out: |
@@ -290,7 +290,7 @@ int mt9m111_write_sensor(struct sd *sd, const u8 address, | |||
290 | memcpy(p, sensor_urb_skeleton + 16, 4); | 290 | memcpy(p, sensor_urb_skeleton + 16, 4); |
291 | p[3] = i2c_data[i]; | 291 | p[3] = i2c_data[i]; |
292 | p += 4; | 292 | p += 4; |
293 | PDEBUG(DBG_TRACE, "Writing sensor register 0x%x with 0x%x", | 293 | PDEBUG(D_CONF, "Writing sensor register 0x%x with 0x%x", |
294 | address, i2c_data[i]); | 294 | address, i2c_data[i]); |
295 | } | 295 | } |
296 | 296 | ||
diff --git a/drivers/media/video/gspca/m5602/m5602_ov9650.c b/drivers/media/video/gspca/m5602/m5602_ov9650.c index 3d77d995a830..837c7e47661c 100644 --- a/drivers/media/video/gspca/m5602/m5602_ov9650.c +++ b/drivers/media/video/gspca/m5602/m5602_ov9650.c | |||
@@ -40,7 +40,7 @@ int ov9650_read_sensor(struct sd *sd, const u8 address, | |||
40 | for (i = 0; i < len; i++) { | 40 | for (i = 0; i < len; i++) { |
41 | err = m5602_read_bridge(sd, M5602_XB_I2C_DATA, &(i2c_data[i])); | 41 | err = m5602_read_bridge(sd, M5602_XB_I2C_DATA, &(i2c_data[i])); |
42 | 42 | ||
43 | PDEBUG(DBG_TRACE, "Reading sensor register " | 43 | PDEBUG(D_CONF, "Reading sensor register " |
44 | "0x%x containing 0x%x ", address, *i2c_data); | 44 | "0x%x containing 0x%x ", address, *i2c_data); |
45 | } | 45 | } |
46 | return (err < 0) ? err : 0; | 46 | return (err < 0) ? err : 0; |
@@ -72,7 +72,7 @@ int ov9650_write_sensor(struct sd *sd, const u8 address, | |||
72 | memcpy(p, sensor_urb_skeleton + 16, 4); | 72 | memcpy(p, sensor_urb_skeleton + 16, 4); |
73 | p[3] = i2c_data[i]; | 73 | p[3] = i2c_data[i]; |
74 | p += 4; | 74 | p += 4; |
75 | PDEBUG(DBG_TRACE, "Writing sensor register 0x%x with 0x%x", | 75 | PDEBUG(D_CONF, "Writing sensor register 0x%x with 0x%x", |
76 | address, i2c_data[i]); | 76 | address, i2c_data[i]); |
77 | } | 77 | } |
78 | 78 | ||
@@ -199,7 +199,7 @@ int ov9650_get_exposure(struct gspca_dev *gspca_dev, __s32 *val) | |||
199 | goto out; | 199 | goto out; |
200 | *val |= (i2c_data & 0x3f) << 10; | 200 | *val |= (i2c_data & 0x3f) << 10; |
201 | 201 | ||
202 | PDEBUG(DBG_V4L2_CID, "Read exposure %d", *val); | 202 | PDEBUG(D_V4L2, "Read exposure %d", *val); |
203 | out: | 203 | out: |
204 | return (err < 0) ? err : 0; | 204 | return (err < 0) ? err : 0; |
205 | } | 205 | } |
@@ -210,7 +210,7 @@ int ov9650_set_exposure(struct gspca_dev *gspca_dev, __s32 val) | |||
210 | u8 i2c_data; | 210 | u8 i2c_data; |
211 | int err; | 211 | int err; |
212 | 212 | ||
213 | PDEBUG(DBG_V4L2_CID, "Set exposure to %d", | 213 | PDEBUG(D_V4L2, "Set exposure to %d", |
214 | val & 0xffff); | 214 | val & 0xffff); |
215 | 215 | ||
216 | /* The 6 MSBs */ | 216 | /* The 6 MSBs */ |
@@ -246,7 +246,7 @@ int ov9650_get_gain(struct gspca_dev *gspca_dev, __s32 *val) | |||
246 | 246 | ||
247 | err = ov9650_read_sensor(sd, OV9650_GAIN, &i2c_data, 1); | 247 | err = ov9650_read_sensor(sd, OV9650_GAIN, &i2c_data, 1); |
248 | *val |= i2c_data; | 248 | *val |= i2c_data; |
249 | PDEBUG(DBG_V4L2_CID, "Read gain %d", *val); | 249 | PDEBUG(D_V4L2, "Read gain %d", *val); |
250 | return (err < 0) ? err : 0; | 250 | return (err < 0) ? err : 0; |
251 | } | 251 | } |
252 | 252 | ||
@@ -280,7 +280,7 @@ int ov9650_get_red_balance(struct gspca_dev *gspca_dev, __s32 *val) | |||
280 | err = ov9650_read_sensor(sd, OV9650_RED, &i2c_data, 1); | 280 | err = ov9650_read_sensor(sd, OV9650_RED, &i2c_data, 1); |
281 | *val = i2c_data; | 281 | *val = i2c_data; |
282 | 282 | ||
283 | PDEBUG(DBG_V4L2_CID, "Read red gain %d", *val); | 283 | PDEBUG(D_V4L2, "Read red gain %d", *val); |
284 | 284 | ||
285 | return (err < 0) ? err : 0; | 285 | return (err < 0) ? err : 0; |
286 | } | 286 | } |
@@ -291,7 +291,7 @@ int ov9650_set_red_balance(struct gspca_dev *gspca_dev, __s32 val) | |||
291 | u8 i2c_data; | 291 | u8 i2c_data; |
292 | struct sd *sd = (struct sd *) gspca_dev; | 292 | struct sd *sd = (struct sd *) gspca_dev; |
293 | 293 | ||
294 | PDEBUG(DBG_V4L2_CID, "Set red gain to %d", | 294 | PDEBUG(D_V4L2, "Set red gain to %d", |
295 | val & 0xff); | 295 | val & 0xff); |
296 | 296 | ||
297 | i2c_data = val & 0xff; | 297 | i2c_data = val & 0xff; |
@@ -309,7 +309,7 @@ int ov9650_get_blue_balance(struct gspca_dev *gspca_dev, __s32 *val) | |||
309 | err = ov9650_read_sensor(sd, OV9650_BLUE, &i2c_data, 1); | 309 | err = ov9650_read_sensor(sd, OV9650_BLUE, &i2c_data, 1); |
310 | *val = i2c_data; | 310 | *val = i2c_data; |
311 | 311 | ||
312 | PDEBUG(DBG_V4L2_CID, "Read blue gain %d", *val); | 312 | PDEBUG(D_V4L2, "Read blue gain %d", *val); |
313 | 313 | ||
314 | return (err < 0) ? err : 0; | 314 | return (err < 0) ? err : 0; |
315 | } | 315 | } |
@@ -320,7 +320,7 @@ int ov9650_set_blue_balance(struct gspca_dev *gspca_dev, __s32 val) | |||
320 | u8 i2c_data; | 320 | u8 i2c_data; |
321 | struct sd *sd = (struct sd *) gspca_dev; | 321 | struct sd *sd = (struct sd *) gspca_dev; |
322 | 322 | ||
323 | PDEBUG(DBG_V4L2_CID, "Set blue gain to %d", | 323 | PDEBUG(D_V4L2, "Set blue gain to %d", |
324 | val & 0xff); | 324 | val & 0xff); |
325 | 325 | ||
326 | i2c_data = val & 0xff; | 326 | i2c_data = val & 0xff; |
@@ -340,7 +340,7 @@ int ov9650_get_hflip(struct gspca_dev *gspca_dev, __s32 *val) | |||
340 | *val = ((i2c_data & OV9650_HFLIP) >> 5) ? 0 : 1; | 340 | *val = ((i2c_data & OV9650_HFLIP) >> 5) ? 0 : 1; |
341 | else | 341 | else |
342 | *val = (i2c_data & OV9650_HFLIP) >> 5; | 342 | *val = (i2c_data & OV9650_HFLIP) >> 5; |
343 | PDEBUG(DBG_V4L2_CID, "Read horizontal flip %d", *val); | 343 | PDEBUG(D_V4L2, "Read horizontal flip %d", *val); |
344 | 344 | ||
345 | return (err < 0) ? err : 0; | 345 | return (err < 0) ? err : 0; |
346 | } | 346 | } |
@@ -351,7 +351,7 @@ int ov9650_set_hflip(struct gspca_dev *gspca_dev, __s32 val) | |||
351 | u8 i2c_data; | 351 | u8 i2c_data; |
352 | struct sd *sd = (struct sd *) gspca_dev; | 352 | struct sd *sd = (struct sd *) gspca_dev; |
353 | 353 | ||
354 | PDEBUG(DBG_V4L2_CID, "Set horizontal flip to %d", val); | 354 | PDEBUG(D_V4L2, "Set horizontal flip to %d", val); |
355 | err = ov9650_read_sensor(sd, OV9650_MVFP, &i2c_data, 1); | 355 | err = ov9650_read_sensor(sd, OV9650_MVFP, &i2c_data, 1); |
356 | if (err < 0) | 356 | if (err < 0) |
357 | goto out; | 357 | goto out; |
@@ -379,7 +379,7 @@ int ov9650_get_vflip(struct gspca_dev *gspca_dev, __s32 *val) | |||
379 | *val = ((i2c_data & 0x10) >> 4) ? 0 : 1; | 379 | *val = ((i2c_data & 0x10) >> 4) ? 0 : 1; |
380 | else | 380 | else |
381 | *val = (i2c_data & 0x10) >> 4; | 381 | *val = (i2c_data & 0x10) >> 4; |
382 | PDEBUG(DBG_V4L2_CID, "Read vertical flip %d", *val); | 382 | PDEBUG(D_V4L2, "Read vertical flip %d", *val); |
383 | 383 | ||
384 | return (err < 0) ? err : 0; | 384 | return (err < 0) ? err : 0; |
385 | } | 385 | } |
@@ -390,7 +390,7 @@ int ov9650_set_vflip(struct gspca_dev *gspca_dev, __s32 val) | |||
390 | u8 i2c_data; | 390 | u8 i2c_data; |
391 | struct sd *sd = (struct sd *) gspca_dev; | 391 | struct sd *sd = (struct sd *) gspca_dev; |
392 | 392 | ||
393 | PDEBUG(DBG_V4L2_CID, "Set vertical flip to %d", val); | 393 | PDEBUG(D_V4L2, "Set vertical flip to %d", val); |
394 | err = ov9650_read_sensor(sd, OV9650_MVFP, &i2c_data, 1); | 394 | err = ov9650_read_sensor(sd, OV9650_MVFP, &i2c_data, 1); |
395 | if (err < 0) | 395 | if (err < 0) |
396 | goto out; | 396 | goto out; |
@@ -420,7 +420,7 @@ int ov9650_get_brightness(struct gspca_dev *gspca_dev, __s32 *val) | |||
420 | 420 | ||
421 | err = ov9650_read_sensor(sd, OV9650_GAIN, &i2c_data, 1); | 421 | err = ov9650_read_sensor(sd, OV9650_GAIN, &i2c_data, 1); |
422 | *val |= i2c_data; | 422 | *val |= i2c_data; |
423 | PDEBUG(DBG_V4L2_CID, "Read gain %d", *val); | 423 | PDEBUG(D_V4L2, "Read gain %d", *val); |
424 | out: | 424 | out: |
425 | return (err < 0) ? err : 0; | 425 | return (err < 0) ? err : 0; |
426 | } | 426 | } |
@@ -431,7 +431,7 @@ int ov9650_set_brightness(struct gspca_dev *gspca_dev, __s32 val) | |||
431 | u8 i2c_data; | 431 | u8 i2c_data; |
432 | struct sd *sd = (struct sd *) gspca_dev; | 432 | struct sd *sd = (struct sd *) gspca_dev; |
433 | 433 | ||
434 | PDEBUG(DBG_V4L2_CID, "Set gain to %d", val & 0x3ff); | 434 | PDEBUG(D_V4L2, "Set gain to %d", val & 0x3ff); |
435 | 435 | ||
436 | /* Read the OV9650_VREF register first to avoid | 436 | /* Read the OV9650_VREF register first to avoid |
437 | corrupting the VREF high and low bits */ | 437 | corrupting the VREF high and low bits */ |
@@ -461,7 +461,7 @@ int ov9650_get_auto_white_balance(struct gspca_dev *gspca_dev, __s32 *val) | |||
461 | 461 | ||
462 | err = ov9650_read_sensor(sd, OV9650_COM8, &i2c_data, 1); | 462 | err = ov9650_read_sensor(sd, OV9650_COM8, &i2c_data, 1); |
463 | *val = (i2c_data & OV9650_AWB_EN) >> 1; | 463 | *val = (i2c_data & OV9650_AWB_EN) >> 1; |
464 | PDEBUG(DBG_V4L2_CID, "Read auto white balance %d", *val); | 464 | PDEBUG(D_V4L2, "Read auto white balance %d", *val); |
465 | 465 | ||
466 | return (err < 0) ? err : 0; | 466 | return (err < 0) ? err : 0; |
467 | } | 467 | } |
@@ -472,7 +472,7 @@ int ov9650_set_auto_white_balance(struct gspca_dev *gspca_dev, __s32 val) | |||
472 | u8 i2c_data; | 472 | u8 i2c_data; |
473 | struct sd *sd = (struct sd *) gspca_dev; | 473 | struct sd *sd = (struct sd *) gspca_dev; |
474 | 474 | ||
475 | PDEBUG(DBG_V4L2_CID, "Set auto white balance to %d", val); | 475 | PDEBUG(D_V4L2, "Set auto white balance to %d", val); |
476 | err = ov9650_read_sensor(sd, OV9650_COM8, &i2c_data, 1); | 476 | err = ov9650_read_sensor(sd, OV9650_COM8, &i2c_data, 1); |
477 | if (err < 0) | 477 | if (err < 0) |
478 | goto out; | 478 | goto out; |
@@ -491,7 +491,7 @@ int ov9650_get_auto_gain(struct gspca_dev *gspca_dev, __s32 *val) | |||
491 | 491 | ||
492 | err = ov9650_read_sensor(sd, OV9650_COM8, &i2c_data, 1); | 492 | err = ov9650_read_sensor(sd, OV9650_COM8, &i2c_data, 1); |
493 | *val = (i2c_data & OV9650_AGC_EN) >> 2; | 493 | *val = (i2c_data & OV9650_AGC_EN) >> 2; |
494 | PDEBUG(DBG_V4L2_CID, "Read auto gain control %d", *val); | 494 | PDEBUG(D_V4L2, "Read auto gain control %d", *val); |
495 | 495 | ||
496 | return (err < 0) ? err : 0; | 496 | return (err < 0) ? err : 0; |
497 | } | 497 | } |
@@ -502,7 +502,7 @@ int ov9650_set_auto_gain(struct gspca_dev *gspca_dev, __s32 val) | |||
502 | u8 i2c_data; | 502 | u8 i2c_data; |
503 | struct sd *sd = (struct sd *) gspca_dev; | 503 | struct sd *sd = (struct sd *) gspca_dev; |
504 | 504 | ||
505 | PDEBUG(DBG_V4L2_CID, "Set auto gain control to %d", val); | 505 | PDEBUG(D_V4L2, "Set auto gain control to %d", val); |
506 | err = ov9650_read_sensor(sd, OV9650_COM8, &i2c_data, 1); | 506 | err = ov9650_read_sensor(sd, OV9650_COM8, &i2c_data, 1); |
507 | if (err < 0) | 507 | if (err < 0) |
508 | goto out; | 508 | goto out; |
diff --git a/drivers/media/video/gspca/m5602/m5602_po1030.c b/drivers/media/video/gspca/m5602/m5602_po1030.c index 4b92e1c2ce0f..f405294af996 100644 --- a/drivers/media/video/gspca/m5602/m5602_po1030.c +++ b/drivers/media/video/gspca/m5602/m5602_po1030.c | |||
@@ -1,3 +1,4 @@ | |||
1 | |||
1 | /* | 2 | /* |
2 | * Driver for the po1030 sensor | 3 | * Driver for the po1030 sensor |
3 | * | 4 | * |
@@ -82,7 +83,7 @@ int po1030_read_sensor(struct sd *sd, const u8 address, | |||
82 | for (i = 0; i < len; i++) { | 83 | for (i = 0; i < len; i++) { |
83 | err = m5602_read_bridge(sd, M5602_XB_I2C_DATA, &(i2c_data[i])); | 84 | err = m5602_read_bridge(sd, M5602_XB_I2C_DATA, &(i2c_data[i])); |
84 | 85 | ||
85 | PDEBUG(DBG_TRACE, "Reading sensor register " | 86 | PDEBUG(D_CONF, "Reading sensor register " |
86 | "0x%x containing 0x%x ", address, *i2c_data); | 87 | "0x%x containing 0x%x ", address, *i2c_data); |
87 | } | 88 | } |
88 | return (err < 0) ? err : 0; | 89 | return (err < 0) ? err : 0; |
@@ -112,7 +113,7 @@ int po1030_write_sensor(struct sd *sd, const u8 address, | |||
112 | memcpy(p, sensor_urb_skeleton + 16, 4); | 113 | memcpy(p, sensor_urb_skeleton + 16, 4); |
113 | p[3] = i2c_data[i]; | 114 | p[3] = i2c_data[i]; |
114 | p += 4; | 115 | p += 4; |
115 | PDEBUG(DBG_TRACE, "Writing sensor register 0x%x with 0x%x", | 116 | PDEBUG(D_CONF, "Writing sensor register 0x%x with 0x%x", |
116 | address, i2c_data[i]); | 117 | address, i2c_data[i]); |
117 | } | 118 | } |
118 | 119 | ||
@@ -185,7 +186,7 @@ int po1030_get_exposure(struct gspca_dev *gspca_dev, __s32 *val) | |||
185 | &i2c_data, 1); | 186 | &i2c_data, 1); |
186 | *val |= i2c_data; | 187 | *val |= i2c_data; |
187 | 188 | ||
188 | PDEBUG(DBG_V4L2_CID, "Exposure read as %d", *val); | 189 | PDEBUG(D_V4L2, "Exposure read as %d", *val); |
189 | out: | 190 | out: |
190 | return (err < 0) ? err : 0; | 191 | return (err < 0) ? err : 0; |
191 | } | 192 | } |
@@ -196,10 +197,10 @@ int po1030_set_exposure(struct gspca_dev *gspca_dev, __s32 val) | |||
196 | u8 i2c_data; | 197 | u8 i2c_data; |
197 | int err; | 198 | int err; |
198 | 199 | ||
199 | PDEBUG(DBG_V4L2, "Set exposure to %d", val & 0xffff); | 200 | PDEBUG(D_V4L2, "Set exposure to %d", val & 0xffff); |
200 | 201 | ||
201 | i2c_data = ((val & 0xff00) >> 8); | 202 | i2c_data = ((val & 0xff00) >> 8); |
202 | PDEBUG(DBG_V4L2, "Set exposure to high byte to 0x%x", | 203 | PDEBUG(D_V4L2, "Set exposure to high byte to 0x%x", |
203 | i2c_data); | 204 | i2c_data); |
204 | 205 | ||
205 | err = po1030_write_sensor(sd, PO1030_REG_INTEGLINES_H, | 206 | err = po1030_write_sensor(sd, PO1030_REG_INTEGLINES_H, |
@@ -208,7 +209,7 @@ int po1030_set_exposure(struct gspca_dev *gspca_dev, __s32 val) | |||
208 | goto out; | 209 | goto out; |
209 | 210 | ||
210 | i2c_data = (val & 0xff); | 211 | i2c_data = (val & 0xff); |
211 | PDEBUG(DBG_V4L2, "Set exposure to low byte to 0x%x", | 212 | PDEBUG(D_V4L2, "Set exposure to low byte to 0x%x", |
212 | i2c_data); | 213 | i2c_data); |
213 | err = po1030_write_sensor(sd, PO1030_REG_INTEGLINES_M, | 214 | err = po1030_write_sensor(sd, PO1030_REG_INTEGLINES_M, |
214 | &i2c_data, 1); | 215 | &i2c_data, 1); |
@@ -226,7 +227,7 @@ int po1030_get_gain(struct gspca_dev *gspca_dev, __s32 *val) | |||
226 | err = po1030_read_sensor(sd, PO1030_REG_GLOBALGAIN, | 227 | err = po1030_read_sensor(sd, PO1030_REG_GLOBALGAIN, |
227 | &i2c_data, 1); | 228 | &i2c_data, 1); |
228 | *val = i2c_data; | 229 | *val = i2c_data; |
229 | PDEBUG(DBG_V4L2_CID, "Read global gain %d", *val); | 230 | PDEBUG(D_V4L2, "Read global gain %d", *val); |
230 | 231 | ||
231 | return (err < 0) ? err : 0; | 232 | return (err < 0) ? err : 0; |
232 | } | 233 | } |
@@ -238,7 +239,7 @@ int po1030_set_gain(struct gspca_dev *gspca_dev, __s32 val) | |||
238 | int err; | 239 | int err; |
239 | 240 | ||
240 | i2c_data = val & 0xff; | 241 | i2c_data = val & 0xff; |
241 | PDEBUG(DBG_V4L2, "Set global gain to %d", i2c_data); | 242 | PDEBUG(D_V4L2, "Set global gain to %d", i2c_data); |
242 | err = po1030_write_sensor(sd, PO1030_REG_GLOBALGAIN, | 243 | err = po1030_write_sensor(sd, PO1030_REG_GLOBALGAIN, |
243 | &i2c_data, 1); | 244 | &i2c_data, 1); |
244 | return (err < 0) ? err : 0; | 245 | return (err < 0) ? err : 0; |
@@ -253,7 +254,7 @@ int po1030_get_red_balance(struct gspca_dev *gspca_dev, __s32 *val) | |||
253 | err = po1030_read_sensor(sd, PO1030_REG_RED_GAIN, | 254 | err = po1030_read_sensor(sd, PO1030_REG_RED_GAIN, |
254 | &i2c_data, 1); | 255 | &i2c_data, 1); |
255 | *val = i2c_data; | 256 | *val = i2c_data; |
256 | PDEBUG(DBG_V4L2_CID, "Read red gain %d", *val); | 257 | PDEBUG(D_V4L2, "Read red gain %d", *val); |
257 | return (err < 0) ? err : 0; | 258 | return (err < 0) ? err : 0; |
258 | } | 259 | } |
259 | 260 | ||
@@ -264,7 +265,7 @@ int po1030_set_red_balance(struct gspca_dev *gspca_dev, __s32 val) | |||
264 | int err; | 265 | int err; |
265 | 266 | ||
266 | i2c_data = val & 0xff; | 267 | i2c_data = val & 0xff; |
267 | PDEBUG(DBG_V4L2, "Set red gain to %d", i2c_data); | 268 | PDEBUG(D_V4L2, "Set red gain to %d", i2c_data); |
268 | err = po1030_write_sensor(sd, PO1030_REG_RED_GAIN, | 269 | err = po1030_write_sensor(sd, PO1030_REG_RED_GAIN, |
269 | &i2c_data, 1); | 270 | &i2c_data, 1); |
270 | return (err < 0) ? err : 0; | 271 | return (err < 0) ? err : 0; |
@@ -279,7 +280,7 @@ int po1030_get_blue_balance(struct gspca_dev *gspca_dev, __s32 *val) | |||
279 | err = po1030_read_sensor(sd, PO1030_REG_BLUE_GAIN, | 280 | err = po1030_read_sensor(sd, PO1030_REG_BLUE_GAIN, |
280 | &i2c_data, 1); | 281 | &i2c_data, 1); |
281 | *val = i2c_data; | 282 | *val = i2c_data; |
282 | PDEBUG(DBG_V4L2_CID, "Read blue gain %d", *val); | 283 | PDEBUG(D_V4L2, "Read blue gain %d", *val); |
283 | 284 | ||
284 | return (err < 0) ? err : 0; | 285 | return (err < 0) ? err : 0; |
285 | } | 286 | } |
@@ -290,7 +291,7 @@ int po1030_set_blue_balance(struct gspca_dev *gspca_dev, __s32 val) | |||
290 | u8 i2c_data; | 291 | u8 i2c_data; |
291 | int err; | 292 | int err; |
292 | i2c_data = val & 0xff; | 293 | i2c_data = val & 0xff; |
293 | PDEBUG(DBG_V4L2, "Set blue gain to %d", i2c_data); | 294 | PDEBUG(D_V4L2, "Set blue gain to %d", i2c_data); |
294 | err = po1030_write_sensor(sd, PO1030_REG_BLUE_GAIN, | 295 | err = po1030_write_sensor(sd, PO1030_REG_BLUE_GAIN, |
295 | &i2c_data, 1); | 296 | &i2c_data, 1); |
296 | 297 | ||
diff --git a/drivers/media/video/gspca/m5602/m5602_s5k4aa.c b/drivers/media/video/gspca/m5602/m5602_s5k4aa.c index 77173b687a17..14b1eac5b812 100644 --- a/drivers/media/video/gspca/m5602/m5602_s5k4aa.c +++ b/drivers/media/video/gspca/m5602/m5602_s5k4aa.c | |||
@@ -117,7 +117,7 @@ int s5k4aa_read_sensor(struct sd *sd, const u8 address, | |||
117 | for (i = 0; (i < len) & !err; i++) { | 117 | for (i = 0; (i < len) & !err; i++) { |
118 | err = m5602_read_bridge(sd, M5602_XB_I2C_DATA, &(i2c_data[i])); | 118 | err = m5602_read_bridge(sd, M5602_XB_I2C_DATA, &(i2c_data[i])); |
119 | 119 | ||
120 | PDEBUG(DBG_TRACE, "Reading sensor register " | 120 | PDEBUG(D_CONF, "Reading sensor register " |
121 | "0x%x containing 0x%x ", address, *i2c_data); | 121 | "0x%x containing 0x%x ", address, *i2c_data); |
122 | } | 122 | } |
123 | out: | 123 | out: |
@@ -150,7 +150,7 @@ int s5k4aa_write_sensor(struct sd *sd, const u8 address, | |||
150 | memcpy(p, sensor_urb_skeleton + 16, 4); | 150 | memcpy(p, sensor_urb_skeleton + 16, 4); |
151 | p[3] = i2c_data[i]; | 151 | p[3] = i2c_data[i]; |
152 | p += 4; | 152 | p += 4; |
153 | PDEBUG(DBG_TRACE, "Writing sensor register 0x%x with 0x%x", | 153 | PDEBUG(D_CONF, "Writing sensor register 0x%x with 0x%x", |
154 | address, i2c_data[i]); | 154 | address, i2c_data[i]); |
155 | } | 155 | } |
156 | 156 | ||
@@ -248,7 +248,7 @@ int s5k4aa_get_exposure(struct gspca_dev *gspca_dev, __s32 *val) | |||
248 | *val = data << 8; | 248 | *val = data << 8; |
249 | err = s5k4aa_read_sensor(sd, S5K4AA_EXPOSURE_LO, &data, 1); | 249 | err = s5k4aa_read_sensor(sd, S5K4AA_EXPOSURE_LO, &data, 1); |
250 | *val |= data; | 250 | *val |= data; |
251 | PDEBUG(DBG_V4L2_CID, "Read exposure %d", *val); | 251 | PDEBUG(D_V4L2, "Read exposure %d", *val); |
252 | out: | 252 | out: |
253 | return (err < 0) ? err : 0; | 253 | return (err < 0) ? err : 0; |
254 | } | 254 | } |
@@ -259,7 +259,7 @@ int s5k4aa_set_exposure(struct gspca_dev *gspca_dev, __s32 val) | |||
259 | u8 data = S5K4AA_PAGE_MAP_2; | 259 | u8 data = S5K4AA_PAGE_MAP_2; |
260 | int err; | 260 | int err; |
261 | 261 | ||
262 | PDEBUG(DBG_V4L2_CID, "Set exposure to %d", val); | 262 | PDEBUG(D_V4L2, "Set exposure to %d", val); |
263 | err = s5k4aa_write_sensor(sd, S5K4AA_PAGE_MAP, &data, 1); | 263 | err = s5k4aa_write_sensor(sd, S5K4AA_PAGE_MAP, &data, 1); |
264 | if (err < 0) | 264 | if (err < 0) |
265 | goto out; | 265 | goto out; |
@@ -285,7 +285,7 @@ int s5k4aa_get_vflip(struct gspca_dev *gspca_dev, __s32 *val) | |||
285 | 285 | ||
286 | err = s5k4aa_read_sensor(sd, S5K4AA_PAGE_MAP, &data, 1); | 286 | err = s5k4aa_read_sensor(sd, S5K4AA_PAGE_MAP, &data, 1); |
287 | *val = (data & S5K4AA_RM_V_FLIP) >> 7; | 287 | *val = (data & S5K4AA_RM_V_FLIP) >> 7; |
288 | PDEBUG(DBG_V4L2_CID, "Read vertical flip %d", *val); | 288 | PDEBUG(D_V4L2, "Read vertical flip %d", *val); |
289 | 289 | ||
290 | out: | 290 | out: |
291 | return (err < 0) ? err : 0; | 291 | return (err < 0) ? err : 0; |
@@ -297,7 +297,7 @@ int s5k4aa_set_vflip(struct gspca_dev *gspca_dev, __s32 val) | |||
297 | u8 data = S5K4AA_PAGE_MAP_2; | 297 | u8 data = S5K4AA_PAGE_MAP_2; |
298 | int err; | 298 | int err; |
299 | 299 | ||
300 | PDEBUG(DBG_V4L2_CID, "Set vertical flip to %d", val); | 300 | PDEBUG(D_V4L2, "Set vertical flip to %d", val); |
301 | err = s5k4aa_write_sensor(sd, S5K4AA_PAGE_MAP, &data, 1); | 301 | err = s5k4aa_write_sensor(sd, S5K4AA_PAGE_MAP, &data, 1); |
302 | if (err < 0) | 302 | if (err < 0) |
303 | goto out; | 303 | goto out; |
@@ -341,7 +341,7 @@ int s5k4aa_get_hflip(struct gspca_dev *gspca_dev, __s32 *val) | |||
341 | 341 | ||
342 | err = s5k4aa_read_sensor(sd, S5K4AA_PAGE_MAP, &data, 1); | 342 | err = s5k4aa_read_sensor(sd, S5K4AA_PAGE_MAP, &data, 1); |
343 | *val = (data & S5K4AA_RM_H_FLIP) >> 6; | 343 | *val = (data & S5K4AA_RM_H_FLIP) >> 6; |
344 | PDEBUG(DBG_V4L2_CID, "Read horizontal flip %d", *val); | 344 | PDEBUG(D_V4L2, "Read horizontal flip %d", *val); |
345 | out: | 345 | out: |
346 | return (err < 0) ? err : 0; | 346 | return (err < 0) ? err : 0; |
347 | } | 347 | } |
@@ -352,7 +352,7 @@ int s5k4aa_set_hflip(struct gspca_dev *gspca_dev, __s32 val) | |||
352 | u8 data = S5K4AA_PAGE_MAP_2; | 352 | u8 data = S5K4AA_PAGE_MAP_2; |
353 | int err; | 353 | int err; |
354 | 354 | ||
355 | PDEBUG(DBG_V4L2_CID, "Set horizontal flip to %d", | 355 | PDEBUG(D_V4L2, "Set horizontal flip to %d", |
356 | val); | 356 | val); |
357 | err = s5k4aa_write_sensor(sd, S5K4AA_PAGE_MAP, &data, 1); | 357 | err = s5k4aa_write_sensor(sd, S5K4AA_PAGE_MAP, &data, 1); |
358 | if (err < 0) | 358 | if (err < 0) |
@@ -397,7 +397,7 @@ int s5k4aa_get_gain(struct gspca_dev *gspca_dev, __s32 *val) | |||
397 | 397 | ||
398 | err = s5k4aa_read_sensor(sd, S5K4AA_GAIN_2, &data, 1); | 398 | err = s5k4aa_read_sensor(sd, S5K4AA_GAIN_2, &data, 1); |
399 | *val = data; | 399 | *val = data; |
400 | PDEBUG(DBG_V4L2_CID, "Read gain %d", *val); | 400 | PDEBUG(D_V4L2, "Read gain %d", *val); |
401 | 401 | ||
402 | out: | 402 | out: |
403 | return (err < 0) ? err : 0; | 403 | return (err < 0) ? err : 0; |
@@ -409,7 +409,7 @@ int s5k4aa_set_gain(struct gspca_dev *gspca_dev, __s32 val) | |||
409 | u8 data = S5K4AA_PAGE_MAP_2; | 409 | u8 data = S5K4AA_PAGE_MAP_2; |
410 | int err; | 410 | int err; |
411 | 411 | ||
412 | PDEBUG(DBG_V4L2_CID, "Set gain to %d", val); | 412 | PDEBUG(D_V4L2, "Set gain to %d", val); |
413 | err = s5k4aa_write_sensor(sd, S5K4AA_PAGE_MAP, &data, 1); | 413 | err = s5k4aa_write_sensor(sd, S5K4AA_PAGE_MAP, &data, 1); |
414 | if (err < 0) | 414 | if (err < 0) |
415 | goto out; | 415 | goto out; |
diff --git a/drivers/media/video/gspca/m5602/m5602_s5k83a.c b/drivers/media/video/gspca/m5602/m5602_s5k83a.c index 5fb7f1246722..8988a728e0b4 100644 --- a/drivers/media/video/gspca/m5602/m5602_s5k83a.c +++ b/drivers/media/video/gspca/m5602/m5602_s5k83a.c | |||
@@ -101,7 +101,7 @@ int s5k83a_read_sensor(struct sd *sd, const u8 address, | |||
101 | for (i = 0; i < len && !len; i++) { | 101 | for (i = 0; i < len && !len; i++) { |
102 | err = m5602_read_bridge(sd, M5602_XB_I2C_DATA, &(i2c_data[i])); | 102 | err = m5602_read_bridge(sd, M5602_XB_I2C_DATA, &(i2c_data[i])); |
103 | 103 | ||
104 | PDEBUG(DBG_TRACE, "Reading sensor register " | 104 | PDEBUG(D_CONF, "Reading sensor register " |
105 | "0x%x containing 0x%x ", address, *i2c_data); | 105 | "0x%x containing 0x%x ", address, *i2c_data); |
106 | } | 106 | } |
107 | 107 | ||
@@ -135,7 +135,7 @@ int s5k83a_write_sensor(struct sd *sd, const u8 address, | |||
135 | memcpy(p, sensor_urb_skeleton + 16, 4); | 135 | memcpy(p, sensor_urb_skeleton + 16, 4); |
136 | p[3] = i2c_data[i]; | 136 | p[3] = i2c_data[i]; |
137 | p += 4; | 137 | p += 4; |
138 | PDEBUG(DBG_TRACE, "Writing sensor register 0x%x with 0x%x", | 138 | PDEBUG(D_CONF, "Writing sensor register 0x%x with 0x%x", |
139 | address, i2c_data[i]); | 139 | address, i2c_data[i]); |
140 | } | 140 | } |
141 | 141 | ||