aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorErik Andr?n <erik.andren@gmail.com>2009-01-12 12:17:05 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-06-16 17:20:29 -0400
commit938fe53bf07b8a8315d1734302918339d798ab4f (patch)
treecf326bc4b460c7e427f7da4f3e8d463406b66b14 /drivers/media
parentda773c9e5fd14249cda578f510dd0e20dd7358fb (diff)
V4L/DVB (11482): gspca - m5602-mt9m111: Remove lots of redundant init code
Signed-off-by: Erik Andr?n <erik.andren@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/gspca/m5602/m5602_mt9m111.h95
1 files changed, 4 insertions, 91 deletions
diff --git a/drivers/media/video/gspca/m5602/m5602_mt9m111.h b/drivers/media/video/gspca/m5602/m5602_mt9m111.h
index 5dd90a66afc9..d0fe02ceabbf 100644
--- a/drivers/media/video/gspca/m5602/m5602_mt9m111.h
+++ b/drivers/media/video/gspca/m5602/m5602_mt9m111.h
@@ -162,104 +162,19 @@ static const unsigned char init_mt9m111[][4] =
162 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, 162 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00},
163 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, 163 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00},
164 {BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00}, 164 {BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00},
165 {BRIDGE, M5602_XB_SENSOR_TYPE, 0x0d, 0x00},
166 {BRIDGE, M5602_XB_SENSOR_CTRL, 0x00, 0x00},
167 {BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00},
168 {BRIDGE, M5602_XB_SENSOR_TYPE, 0x09, 0x00}, 165 {BRIDGE, M5602_XB_SENSOR_TYPE, 0x09, 0x00},
169 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00},
170 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00},
171 166
172 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00},
173 {SENSOR, MT9M111_SC_RESET, 0xff, 0xff},
174 {SENSOR, MT9M111_SC_RESET, 0xff, 0xde},
175 {SENSOR, MT9M111_SC_RESET, 0xff, 0xff},
176 {SENSOR, MT9M111_SC_RESET, 0xff, 0xf7},
177 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x01},
178 {SENSOR, MT9M111_CP_GLOBAL_CLK_CONTROL, 0x00,
179 MT9M111_TRISTATE_PIN_IN_STANDBY |
180 MT9M111_SOC_SOFT_STANDBY},
181
182 {BRIDGE, M5602_XB_GPIO_EN_H, 0x06, 0x00},
183 {BRIDGE, M5602_XB_GPIO_EN_L, 0x00, 0x00},
184 {BRIDGE, M5602_XB_I2C_CLK_DIV, 0x0a, 0x00},
185
186 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00},
187 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00},
188
189 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00},
190 {SENSOR, MT9M111_SC_RESET, 0x00, 0x09},
191 {SENSOR, MT9M111_SC_RESET, 0x00, 0x29},
192 {SENSOR, MT9M111_SC_RESET, 0x00, 0x08},
193 {SENSOR, MT9M111_SC_RESET, 0x00, 0x0c},
194 {SENSOR, MT9M111_SC_RESET, 0x00, 0x04},
195 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x01},
196 {SENSOR, MT9M111_CP_GLOBAL_CLK_CONTROL, 0x00,
197 MT9M111_TRISTATE_PIN_IN_STANDBY |
198 MT9M111_SOC_SOFT_STANDBY},
199 {BRIDGE, M5602_XB_GPIO_EN_H, 0x06, 0x00}, 167 {BRIDGE, M5602_XB_GPIO_EN_H, 0x06, 0x00},
200 {BRIDGE, M5602_XB_GPIO_EN_L, 0x00, 0x00}, 168 {BRIDGE, M5602_XB_GPIO_EN_L, 0x00, 0x00},
201 {BRIDGE, M5602_XB_I2C_CLK_DIV, 0x0a, 0x00},
202
203 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00},
204 {SENSOR, MT9M111_SC_RESET, 0x00, 0x05},
205 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00},
206 {SENSOR, MT9M111_SC_RESET, 0x00, 0x29},
207 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00},
208 {SENSOR, MT9M111_SC_RESET, 0x00, 0x08},
209
210 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00},
211 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00},
212 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00},
213 {SENSOR, MT9M111_SC_RESET, 0x00, 0x09},
214 {SENSOR, MT9M111_SC_RESET, 0x00, 0x29},
215 {SENSOR, MT9M111_SC_RESET, 0x00, 0x08},
216 {SENSOR, MT9M111_SC_RESET, 0x00, 0x0c},
217 {SENSOR, MT9M111_SC_RESET, 0x00, 0x04},
218 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x01},
219 {SENSOR, MT9M111_CP_GLOBAL_CLK_CONTROL, 0x00,
220 MT9M111_TRISTATE_PIN_IN_STANDBY |
221 MT9M111_SOC_SOFT_STANDBY},
222 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00},
223 {SENSOR, MT9M111_SC_RESET, 0x00, 0x05},
224 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00},
225 {SENSOR, MT9M111_SC_RESET, 0x00, 0x29},
226 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00},
227
228 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00},
229 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00},
230 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00},
231 {SENSOR, MT9M111_SC_RESET, 0x00, 0x09},
232 {SENSOR, MT9M111_SC_RESET, 0x00, 0x29},
233 {SENSOR, MT9M111_SC_RESET, 0x00, 0x08},
234 {SENSOR, MT9M111_SC_RESET, 0x00, 0x0c},
235 {SENSOR, MT9M111_SC_RESET, 0x00, 0x04},
236 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x01},
237 {SENSOR, MT9M111_CP_GLOBAL_CLK_CONTROL, 0x00,
238 MT9M111_TRISTATE_PIN_IN_STANDBY |
239 MT9M111_SOC_SOFT_STANDBY},
240 {BRIDGE, M5602_XB_GPIO_DIR, 0x05, 0x00},
241 {BRIDGE, M5602_XB_GPIO_DAT, 0x04, 0x00}, 169 {BRIDGE, M5602_XB_GPIO_DAT, 0x04, 0x00},
242 {BRIDGE, M5602_XB_GPIO_EN_H, 0x3e, 0x00},
243 {BRIDGE, M5602_XB_GPIO_DIR_H, 0x3e, 0x00}, 170 {BRIDGE, M5602_XB_GPIO_DIR_H, 0x3e, 0x00},
244 {BRIDGE, M5602_XB_GPIO_DAT_H, 0x02, 0x00},
245 {BRIDGE, M5602_XB_GPIO_EN_L, 0xff, 0x00},
246 {BRIDGE, M5602_XB_GPIO_DIR_L, 0xff, 0x00}, 171 {BRIDGE, M5602_XB_GPIO_DIR_L, 0xff, 0x00},
172 {BRIDGE, M5602_XB_GPIO_DAT_H, 0x02, 0x00},
247 {BRIDGE, M5602_XB_GPIO_DAT_L, 0x00, 0x00}, 173 {BRIDGE, M5602_XB_GPIO_DAT_L, 0x00, 0x00},
248 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00},
249 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00},
250 {BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00},
251 {BRIDGE, M5602_XB_SENSOR_TYPE, 0x09, 0x00},
252 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00},
253 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00},
254 {BRIDGE, M5602_XB_GPIO_DIR, 0x07, 0x00}, 174 {BRIDGE, M5602_XB_GPIO_DIR, 0x07, 0x00},
255 {BRIDGE, M5602_XB_GPIO_DAT, 0x0b, 0x00}, 175 {BRIDGE, M5602_XB_GPIO_DAT, 0x0b, 0x00},
256 {BRIDGE, M5602_XB_GPIO_EN_H, 0x06, 0x00},
257 {BRIDGE, M5602_XB_GPIO_EN_L, 0x00, 0x00},
258 {BRIDGE, M5602_XB_I2C_CLK_DIV, 0x0a, 0x00}, 176 {BRIDGE, M5602_XB_I2C_CLK_DIV, 0x0a, 0x00},
259 177
260 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00},
261 {SENSOR, MT9M111_SC_RESET, 0x00, 0x05},
262 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00},
263 {SENSOR, MT9M111_SC_RESET, 0x00, 0x29}, 178 {SENSOR, MT9M111_SC_RESET, 0x00, 0x29},
264 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, 179 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00},
265 {SENSOR, MT9M111_SC_RESET, 0x00, 0x08}, 180 {SENSOR, MT9M111_SC_RESET, 0x00, 0x08},
@@ -273,9 +188,9 @@ static const unsigned char init_mt9m111[][4] =
273 {SENSOR, MT9M111_CP_LUMA_CLIP, 0xff, 0x00}, 188 {SENSOR, MT9M111_CP_LUMA_CLIP, 0xff, 0x00},
274 {SENSOR, MT9M111_CP_OUTPUT_FORMAT_CTL2_CONTEXT_A, 0x14, 0x00}, 189 {SENSOR, MT9M111_CP_OUTPUT_FORMAT_CTL2_CONTEXT_A, 0x14, 0x00},
275 {SENSOR, MT9M111_CP_OUTPUT_FORMAT_CTL2_CONTEXT_B, 0x14, 0x00}, 190 {SENSOR, MT9M111_CP_OUTPUT_FORMAT_CTL2_CONTEXT_B, 0x14, 0x00},
276
277 {SENSOR, 0xcd, 0x00, 0x0e}, 191 {SENSOR, 0xcd, 0x00, 0x0e},
278 {SENSOR, 0xd0, 0x00, 0x40}, 192 {SENSOR, 0xd0, 0x00, 0x40},
193
279 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x02}, 194 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x02},
280 {SENSOR, MT9M111_CC_AUTO_EXPOSURE_PARAMETER_18, 0x00, 0x00}, 195 {SENSOR, MT9M111_CC_AUTO_EXPOSURE_PARAMETER_18, 0x00, 0x00},
281 {SENSOR, MT9M111_CC_AWB_PARAMETER_7, 0xef, 0x03}, 196 {SENSOR, MT9M111_CC_AWB_PARAMETER_7, 0xef, 0x03},
@@ -327,6 +242,8 @@ static const unsigned char init_mt9m111[][4] =
327 {SENSOR, MT9M111_SC_R_MODE_CONTEXT_B, 0x01, 0x0f}, /* 271 */ 242 {SENSOR, MT9M111_SC_R_MODE_CONTEXT_B, 0x01, 0x0f}, /* 271 */
328 {SENSOR, MT9M111_SC_R_MODE_CONTEXT_A, 0x01, 0x0f}, /* 271 */ 243 {SENSOR, MT9M111_SC_R_MODE_CONTEXT_A, 0x01, 0x0f}, /* 271 */
329 {SENSOR, 0x30, 0x04, 0x00}, 244 {SENSOR, 0x30, 0x04, 0x00},
245 /* Set number of blank rows chosen to 400 */
246 {SENSOR, MT9M111_SC_SHUTTER_WIDTH, 0x01, 0x90},
330 247
331 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x06, 0x00}, 248 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x06, 0x00},
332 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, 249 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00},
@@ -352,10 +269,6 @@ static const unsigned char init_mt9m111[][4] =
352 {BRIDGE, M5602_XB_SIG_INI, 0x00, 0x00}, 269 {BRIDGE, M5602_XB_SIG_INI, 0x00, 0x00},
353 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, 270 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00},
354 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, 271 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00},
355
356 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00},
357 /* Set number of blank rows chosen to 400 */
358 {SENSOR, MT9M111_SC_SHUTTER_WIDTH, 0x01, 0x90},
359}; 272};
360 273
361#endif 274#endif