aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Andr?n <erik.andren@gmail.com>2009-01-12 11:56:13 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-06-16 17:20:29 -0400
commit6822df520d0140a0adf667ba6e926d90b2ff6d6d (patch)
tree5bdcdeb9728b542008894b697721747442aff039
parent2ed3bf306745578b0cc862a12492fb2a7a8e2adc (diff)
V4L/DVB (11480): gspca - m5602-mt9m111: Remove lots of redundant sensor reads
Signed-off-by: Erik Andr?n <erik.andren@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/gspca/m5602/m5602_mt9m111.h84
1 files changed, 2 insertions, 82 deletions
diff --git a/drivers/media/video/gspca/m5602/m5602_mt9m111.h b/drivers/media/video/gspca/m5602/m5602_mt9m111.h
index cac902309f8e..d1bb9ddd62f4 100644
--- a/drivers/media/video/gspca/m5602/m5602_mt9m111.h
+++ b/drivers/media/video/gspca/m5602/m5602_mt9m111.h
@@ -193,7 +193,6 @@ static const unsigned char init_mt9m111[][4] =
193 {SENSOR, MT9M111_SC_RESET, 0x00, 0x0c}, 193 {SENSOR, MT9M111_SC_RESET, 0x00, 0x0c},
194 {SENSOR, MT9M111_SC_RESET, 0x00, 0x04}, 194 {SENSOR, MT9M111_SC_RESET, 0x00, 0x04},
195 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x01}, 195 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x01},
196 {BRIDGE, M5602_XB_I2C_REG_ADDR, 0xb3, 0x00},
197 {SENSOR, MT9M111_CP_GLOBAL_CLK_CONTROL, 0x00, 0x03}, 196 {SENSOR, MT9M111_CP_GLOBAL_CLK_CONTROL, 0x00, 0x03},
198 {BRIDGE, M5602_XB_GPIO_EN_H, 0x06, 0x00}, 197 {BRIDGE, M5602_XB_GPIO_EN_H, 0x06, 0x00},
199 {BRIDGE, M5602_XB_GPIO_EN_L, 0x00, 0x00}, 198 {BRIDGE, M5602_XB_GPIO_EN_L, 0x00, 0x00},
@@ -209,81 +208,30 @@ static const unsigned char init_mt9m111[][4] =
209 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, 208 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00},
210 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, 209 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00},
211 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, 210 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00},
212 {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00},
213 {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x0d, 0x00},
214 {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00},
215 {SENSOR, MT9M111_SC_RESET, 0x00, 0x09}, 211 {SENSOR, MT9M111_SC_RESET, 0x00, 0x09},
216 {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00},
217 {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x0d, 0x00},
218 {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00},
219 {SENSOR, MT9M111_SC_RESET, 0x00, 0x29}, 212 {SENSOR, MT9M111_SC_RESET, 0x00, 0x29},
220 {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00},
221 {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x0d, 0x00},
222 {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00},
223 {SENSOR, MT9M111_SC_RESET, 0x00, 0x08}, 213 {SENSOR, MT9M111_SC_RESET, 0x00, 0x08},
224 {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00},
225 {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x0d, 0x00},
226 {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00},
227 {SENSOR, MT9M111_SC_RESET, 0x00, 0x0c}, 214 {SENSOR, MT9M111_SC_RESET, 0x00, 0x0c},
228 {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00},
229 {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x0d, 0x00},
230 {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00},
231 {SENSOR, MT9M111_SC_RESET, 0x00, 0x04}, 215 {SENSOR, MT9M111_SC_RESET, 0x00, 0x04},
232 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x01}, 216 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x01},
233 {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00},
234 {BRIDGE, M5602_XB_I2C_REG_ADDR, 0xb3, 0x00},
235 {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00},
236 {SENSOR, MT9M111_CP_GLOBAL_CLK_CONTROL, 0x00, 0x03}, 217 {SENSOR, MT9M111_CP_GLOBAL_CLK_CONTROL, 0x00, 0x03},
237 {BRIDGE, M5602_XB_GPIO_EN_H, 0x06, 0x00},
238 {BRIDGE, M5602_XB_GPIO_EN_L, 0x00, 0x00},
239 {BRIDGE, M5602_XB_I2C_CLK_DIV, 0x0a, 0x00},
240 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, 218 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00},
241 {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00},
242 {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x0d, 0x00},
243 {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00},
244 {SENSOR, MT9M111_SC_RESET, 0x00, 0x05}, 219 {SENSOR, MT9M111_SC_RESET, 0x00, 0x05},
245 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, 220 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00},
246 {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00},
247 {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x0d, 0x00},
248 {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00},
249 {SENSOR, MT9M111_SC_RESET, 0x00, 0x29}, 221 {SENSOR, MT9M111_SC_RESET, 0x00, 0x29},
250 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, 222 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00},
251 {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00},
252 {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x0d, 0x00},
253 {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00},
254
255 {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00},
256 {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x33, 0x00},
257 {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00},
258 223
259 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, 224 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00},
260 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, 225 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00},
261 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, 226 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00},
262 {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00},
263 {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x0d, 0x00},
264 {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00},
265 {SENSOR, MT9M111_SC_RESET, 0x00, 0x09}, 227 {SENSOR, MT9M111_SC_RESET, 0x00, 0x09},
266 {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00},
267 {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x0d, 0x00},
268 {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00},
269 {SENSOR, MT9M111_SC_RESET, 0x00, 0x29}, 228 {SENSOR, MT9M111_SC_RESET, 0x00, 0x29},
270 {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00},
271 {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x0d, 0x00},
272 {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00},
273 {SENSOR, MT9M111_SC_RESET, 0x00, 0x08}, 229 {SENSOR, MT9M111_SC_RESET, 0x00, 0x08},
274 {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00},
275 {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x0d, 0x00},
276 {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00},
277 {SENSOR, MT9M111_SC_RESET, 0x00, 0x0c}, 230 {SENSOR, MT9M111_SC_RESET, 0x00, 0x0c},
278 {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00},
279 {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x0d, 0x00},
280 {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00},
281 {SENSOR, MT9M111_SC_RESET, 0x00, 0x04}, 231 {SENSOR, MT9M111_SC_RESET, 0x00, 0x04},
282 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x01}, 232 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x01},
283 {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00},
284 {BRIDGE, M5602_XB_I2C_REG_ADDR, 0xb3, 0x00},
285 {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00},
286 {SENSOR, MT9M111_CP_GLOBAL_CLK_CONTROL, 0x00, 0x03}, 233 {SENSOR, MT9M111_CP_GLOBAL_CLK_CONTROL, 0x00, 0x03},
234
287 {BRIDGE, M5602_XB_GPIO_DIR, 0x05, 0x00}, 235 {BRIDGE, M5602_XB_GPIO_DIR, 0x05, 0x00},
288 {BRIDGE, M5602_XB_GPIO_DAT, 0x04, 0x00}, 236 {BRIDGE, M5602_XB_GPIO_DAT, 0x04, 0x00},
289 {BRIDGE, M5602_XB_GPIO_EN_H, 0x3e, 0x00}, 237 {BRIDGE, M5602_XB_GPIO_EN_H, 0x3e, 0x00},
@@ -292,8 +240,6 @@ static const unsigned char init_mt9m111[][4] =
292 {BRIDGE, M5602_XB_GPIO_EN_L, 0xff, 0x00}, 240 {BRIDGE, M5602_XB_GPIO_EN_L, 0xff, 0x00},
293 {BRIDGE, M5602_XB_GPIO_DIR_L, 0xff, 0x00}, 241 {BRIDGE, M5602_XB_GPIO_DIR_L, 0xff, 0x00},
294 {BRIDGE, M5602_XB_GPIO_DAT_L, 0x00, 0x00}, 242 {BRIDGE, M5602_XB_GPIO_DAT_L, 0x00, 0x00},
295 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x04, 0x00},
296 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00},
297 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, 243 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00},
298 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, 244 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00},
299 {BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00}, 245 {BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00},
@@ -305,21 +251,12 @@ static const unsigned char init_mt9m111[][4] =
305 {BRIDGE, M5602_XB_GPIO_EN_H, 0x06, 0x00}, 251 {BRIDGE, M5602_XB_GPIO_EN_H, 0x06, 0x00},
306 {BRIDGE, M5602_XB_GPIO_EN_L, 0x00, 0x00}, 252 {BRIDGE, M5602_XB_GPIO_EN_L, 0x00, 0x00},
307 {BRIDGE, M5602_XB_I2C_CLK_DIV, 0x0a, 0x00}, 253 {BRIDGE, M5602_XB_I2C_CLK_DIV, 0x0a, 0x00},
254
308 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, 255 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00},
309 {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00},
310 {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x0d, 0x00},
311 {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00},
312 {SENSOR, MT9M111_SC_RESET, 0x00, 0x05}, 256 {SENSOR, MT9M111_SC_RESET, 0x00, 0x05},
313 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, 257 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00},
314 {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00},
315 {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x0d, 0x00},
316 {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00},
317 {SENSOR, MT9M111_SC_RESET, 0x00, 0x29}, 258 {SENSOR, MT9M111_SC_RESET, 0x00, 0x29},
318 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, 259 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00},
319 {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00},
320 {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x0d, 0x00},
321 {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00},
322
323 {SENSOR, MT9M111_SC_RESET, 0x00, 0x08}, 260 {SENSOR, MT9M111_SC_RESET, 0x00, 0x08},
324 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x01}, 261 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x01},
325 {SENSOR, MT9M111_CP_OPERATING_MODE_CTL, 0x00, 262 {SENSOR, MT9M111_CP_OPERATING_MODE_CTL, 0x00,
@@ -332,30 +269,13 @@ static const unsigned char init_mt9m111[][4] =
332 {SENSOR, MT9M111_CP_OUTPUT_FORMAT_CTL2_CONTEXT_A, 0x14, 0x00}, 269 {SENSOR, MT9M111_CP_OUTPUT_FORMAT_CTL2_CONTEXT_A, 0x14, 0x00},
333 {SENSOR, MT9M111_CP_OUTPUT_FORMAT_CTL2_CONTEXT_B, 0x14, 0x00}, 270 {SENSOR, MT9M111_CP_OUTPUT_FORMAT_CTL2_CONTEXT_B, 0x14, 0x00},
334 271
335 {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00},
336 {BRIDGE, M5602_XB_I2C_REG_ADDR, 0xcd, 0x00},
337 {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00},
338 {SENSOR, 0xcd, 0x00, 0x0e}, 272 {SENSOR, 0xcd, 0x00, 0x0e},
339 {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00},
340 {BRIDGE, M5602_XB_I2C_REG_ADDR, 0xd0, 0x00},
341 {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00},
342 {SENSOR, 0xd0, 0x00, 0x40}, 273 {SENSOR, 0xd0, 0x00, 0x40},
343 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x02}, 274 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x02},
344 {SENSOR, MT9M111_CC_AUTO_EXPOSURE_PARAMETER_18, 0x00, 0x00}, 275 {SENSOR, MT9M111_CC_AUTO_EXPOSURE_PARAMETER_18, 0x00, 0x00},
345 {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00},
346 {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x28, 0x00},
347 {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00},
348 {SENSOR, MT9M111_CC_AWB_PARAMETER_7, 0xef, 0x07},
349 {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00},
350 {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x28, 0x00},
351 {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00},
352 {SENSOR, MT9M111_CC_AWB_PARAMETER_7, 0xef, 0x03}, 276 {SENSOR, MT9M111_CC_AWB_PARAMETER_7, 0xef, 0x03},
353 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, 277 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00},
354 278
355 {BRIDGE, M5602_XB_I2C_DEV_ADDR, 0xba, 0x00},
356 {BRIDGE, M5602_XB_I2C_REG_ADDR, 0x33, 0x00},
357 {BRIDGE, M5602_XB_I2C_CTRL, 0x1a, 0x00},
358
359 {SENSOR, 0x33, 0x03, 0x49}, 279 {SENSOR, 0x33, 0x03, 0x49},
360 {SENSOR, 0x34, 0xc0, 0x19}, 280 {SENSOR, 0x34, 0xc0, 0x19},
361 {SENSOR, 0x3f, 0x20, 0x20}, 281 {SENSOR, 0x3f, 0x20, 0x20},