diff options
Diffstat (limited to 'arch/sh/boards/mach-ap325rxa/setup.c')
-rw-r--r-- | arch/sh/boards/mach-ap325rxa/setup.c | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/arch/sh/boards/mach-ap325rxa/setup.c b/arch/sh/boards/mach-ap325rxa/setup.c index cf9dc12dfeb..7a9f69663f1 100644 --- a/arch/sh/boards/mach-ap325rxa/setup.c +++ b/arch/sh/boards/mach-ap325rxa/setup.c | |||
@@ -316,20 +316,23 @@ static struct soc_camera_platform_info camera_info = { | |||
316 | .format_name = "UYVY", | 316 | .format_name = "UYVY", |
317 | .format_depth = 16, | 317 | .format_depth = 16, |
318 | .format = { | 318 | .format = { |
319 | .pixelformat = V4L2_PIX_FMT_UYVY, | 319 | .code = V4L2_MBUS_FMT_YUYV8_2X8_BE, |
320 | .colorspace = V4L2_COLORSPACE_SMPTE170M, | 320 | .colorspace = V4L2_COLORSPACE_SMPTE170M, |
321 | .field = V4L2_FIELD_NONE, | ||
321 | .width = 640, | 322 | .width = 640, |
322 | .height = 480, | 323 | .height = 480, |
323 | }, | 324 | }, |
324 | .bus_param = SOCAM_PCLK_SAMPLE_RISING | SOCAM_HSYNC_ACTIVE_HIGH | | 325 | .bus_param = SOCAM_PCLK_SAMPLE_RISING | SOCAM_HSYNC_ACTIVE_HIGH | |
325 | SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_MASTER | SOCAM_DATAWIDTH_8, | 326 | SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_MASTER | SOCAM_DATAWIDTH_8, |
326 | .set_capture = camera_set_capture, | 327 | .set_capture = camera_set_capture, |
327 | .link = { | 328 | }; |
328 | .bus_id = 0, | 329 | |
329 | .add_device = ap325rxa_camera_add, | 330 | struct soc_camera_link camera_link = { |
330 | .del_device = ap325rxa_camera_del, | 331 | .bus_id = 0, |
331 | .module_name = "soc_camera_platform", | 332 | .add_device = ap325rxa_camera_add, |
332 | }, | 333 | .del_device = ap325rxa_camera_del, |
334 | .module_name = "soc_camera_platform", | ||
335 | .priv = &camera_info, | ||
333 | }; | 336 | }; |
334 | 337 | ||
335 | static void dummy_release(struct device *dev) | 338 | static void dummy_release(struct device *dev) |
@@ -347,7 +350,7 @@ static struct platform_device camera_device = { | |||
347 | static int ap325rxa_camera_add(struct soc_camera_link *icl, | 350 | static int ap325rxa_camera_add(struct soc_camera_link *icl, |
348 | struct device *dev) | 351 | struct device *dev) |
349 | { | 352 | { |
350 | if (icl != &camera_info.link || camera_probe() <= 0) | 353 | if (icl != &camera_link || camera_probe() <= 0) |
351 | return -ENODEV; | 354 | return -ENODEV; |
352 | 355 | ||
353 | camera_info.dev = dev; | 356 | camera_info.dev = dev; |
@@ -357,7 +360,7 @@ static int ap325rxa_camera_add(struct soc_camera_link *icl, | |||
357 | 360 | ||
358 | static void ap325rxa_camera_del(struct soc_camera_link *icl) | 361 | static void ap325rxa_camera_del(struct soc_camera_link *icl) |
359 | { | 362 | { |
360 | if (icl != &camera_info.link) | 363 | if (icl != &camera_link) |
361 | return; | 364 | return; |
362 | 365 | ||
363 | platform_device_unregister(&camera_device); | 366 | platform_device_unregister(&camera_device); |
@@ -470,13 +473,15 @@ static struct ov772x_camera_info ov7725_info = { | |||
470 | .buswidth = SOCAM_DATAWIDTH_8, | 473 | .buswidth = SOCAM_DATAWIDTH_8, |
471 | .flags = OV772X_FLAG_VFLIP | OV772X_FLAG_HFLIP, | 474 | .flags = OV772X_FLAG_VFLIP | OV772X_FLAG_HFLIP, |
472 | .edgectrl = OV772X_AUTO_EDGECTRL(0xf, 0), | 475 | .edgectrl = OV772X_AUTO_EDGECTRL(0xf, 0), |
473 | .link = { | 476 | }; |
474 | .bus_id = 0, | 477 | |
475 | .power = ov7725_power, | 478 | static struct soc_camera_link ov7725_link = { |
476 | .board_info = &ap325rxa_i2c_camera[0], | 479 | .bus_id = 0, |
477 | .i2c_adapter_id = 0, | 480 | .power = ov7725_power, |
478 | .module_name = "ov772x", | 481 | .board_info = &ap325rxa_i2c_camera[0], |
479 | }, | 482 | .i2c_adapter_id = 0, |
483 | .module_name = "ov772x", | ||
484 | .priv = &ov7725_info, | ||
480 | }; | 485 | }; |
481 | 486 | ||
482 | static struct platform_device ap325rxa_camera[] = { | 487 | static struct platform_device ap325rxa_camera[] = { |
@@ -484,13 +489,13 @@ static struct platform_device ap325rxa_camera[] = { | |||
484 | .name = "soc-camera-pdrv", | 489 | .name = "soc-camera-pdrv", |
485 | .id = 0, | 490 | .id = 0, |
486 | .dev = { | 491 | .dev = { |
487 | .platform_data = &ov7725_info.link, | 492 | .platform_data = &ov7725_link, |
488 | }, | 493 | }, |
489 | }, { | 494 | }, { |
490 | .name = "soc-camera-pdrv", | 495 | .name = "soc-camera-pdrv", |
491 | .id = 1, | 496 | .id = 1, |
492 | .dev = { | 497 | .dev = { |
493 | .platform_data = &camera_info.link, | 498 | .platform_data = &camera_link, |
494 | }, | 499 | }, |
495 | }, | 500 | }, |
496 | }; | 501 | }; |