diff options
Diffstat (limited to 'arch/arm/mach-pxa/pcm990-baseboard.c')
-rw-r--r-- | arch/arm/mach-pxa/pcm990-baseboard.c | 67 |
1 files changed, 52 insertions, 15 deletions
diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c index 01791d74e08e..bbda57078e0f 100644 --- a/arch/arm/mach-pxa/pcm990-baseboard.c +++ b/arch/arm/mach-pxa/pcm990-baseboard.c | |||
@@ -321,11 +321,14 @@ static void pcm990_mci_exit(struct device *dev, void *data) | |||
321 | #define MSECS_PER_JIFFY (1000/HZ) | 321 | #define MSECS_PER_JIFFY (1000/HZ) |
322 | 322 | ||
323 | static struct pxamci_platform_data pcm990_mci_platform_data = { | 323 | static struct pxamci_platform_data pcm990_mci_platform_data = { |
324 | .detect_delay = 250 / MSECS_PER_JIFFY, | 324 | .detect_delay = 250 / MSECS_PER_JIFFY, |
325 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, | 325 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, |
326 | .init = pcm990_mci_init, | 326 | .init = pcm990_mci_init, |
327 | .setpower = pcm990_mci_setpower, | 327 | .setpower = pcm990_mci_setpower, |
328 | .exit = pcm990_mci_exit, | 328 | .exit = pcm990_mci_exit, |
329 | .gpio_card_detect = -1, | ||
330 | .gpio_card_ro = -1, | ||
331 | .gpio_power = -1, | ||
329 | }; | 332 | }; |
330 | 333 | ||
331 | static struct pxaohci_platform_data pcm990_ohci_platform_data = { | 334 | static struct pxaohci_platform_data pcm990_ohci_platform_data = { |
@@ -427,25 +430,56 @@ static void pcm990_camera_free_bus(struct soc_camera_link *link) | |||
427 | gpio_bus_switch = -EINVAL; | 430 | gpio_bus_switch = -EINVAL; |
428 | } | 431 | } |
429 | 432 | ||
430 | static struct soc_camera_link iclink = { | ||
431 | .bus_id = 0, /* Must match with the camera ID above */ | ||
432 | .query_bus_param = pcm990_camera_query_bus_param, | ||
433 | .set_bus_param = pcm990_camera_set_bus_param, | ||
434 | .free_bus = pcm990_camera_free_bus, | ||
435 | }; | ||
436 | |||
437 | /* Board I2C devices. */ | 433 | /* Board I2C devices. */ |
438 | static struct i2c_board_info __initdata pcm990_i2c_devices[] = { | 434 | static struct i2c_board_info __initdata pcm990_i2c_devices[] = { |
439 | { | 435 | { |
440 | /* Must initialize before the camera(s) */ | 436 | /* Must initialize before the camera(s) */ |
441 | I2C_BOARD_INFO("pca9536", 0x41), | 437 | I2C_BOARD_INFO("pca9536", 0x41), |
442 | .platform_data = &pca9536_data, | 438 | .platform_data = &pca9536_data, |
443 | }, { | 439 | }, |
440 | }; | ||
441 | |||
442 | static struct i2c_board_info pcm990_camera_i2c[] = { | ||
443 | { | ||
444 | I2C_BOARD_INFO("mt9v022", 0x48), | 444 | I2C_BOARD_INFO("mt9v022", 0x48), |
445 | .platform_data = &iclink, /* With extender */ | ||
446 | }, { | 445 | }, { |
447 | I2C_BOARD_INFO("mt9m001", 0x5d), | 446 | I2C_BOARD_INFO("mt9m001", 0x5d), |
448 | .platform_data = &iclink, /* With extender */ | 447 | }, |
448 | }; | ||
449 | |||
450 | static struct soc_camera_link iclink[] = { | ||
451 | { | ||
452 | .bus_id = 0, /* Must match with the camera ID */ | ||
453 | .board_info = &pcm990_camera_i2c[0], | ||
454 | .i2c_adapter_id = 0, | ||
455 | .query_bus_param = pcm990_camera_query_bus_param, | ||
456 | .set_bus_param = pcm990_camera_set_bus_param, | ||
457 | .free_bus = pcm990_camera_free_bus, | ||
458 | .module_name = "mt9v022", | ||
459 | }, { | ||
460 | .bus_id = 0, /* Must match with the camera ID */ | ||
461 | .board_info = &pcm990_camera_i2c[1], | ||
462 | .i2c_adapter_id = 0, | ||
463 | .query_bus_param = pcm990_camera_query_bus_param, | ||
464 | .set_bus_param = pcm990_camera_set_bus_param, | ||
465 | .free_bus = pcm990_camera_free_bus, | ||
466 | .module_name = "mt9m001", | ||
467 | }, | ||
468 | }; | ||
469 | |||
470 | static struct platform_device pcm990_camera[] = { | ||
471 | { | ||
472 | .name = "soc-camera-pdrv", | ||
473 | .id = 0, | ||
474 | .dev = { | ||
475 | .platform_data = &iclink[0], | ||
476 | }, | ||
477 | }, { | ||
478 | .name = "soc-camera-pdrv", | ||
479 | .id = 1, | ||
480 | .dev = { | ||
481 | .platform_data = &iclink[1], | ||
482 | }, | ||
449 | }, | 483 | }, |
450 | }; | 484 | }; |
451 | #endif /* CONFIG_VIDEO_PXA27x ||CONFIG_VIDEO_PXA27x_MODULE */ | 485 | #endif /* CONFIG_VIDEO_PXA27x ||CONFIG_VIDEO_PXA27x_MODULE */ |
@@ -501,6 +535,9 @@ void __init pcm990_baseboard_init(void) | |||
501 | pxa_set_camera_info(&pcm990_pxacamera_platform_data); | 535 | pxa_set_camera_info(&pcm990_pxacamera_platform_data); |
502 | 536 | ||
503 | i2c_register_board_info(0, ARRAY_AND_SIZE(pcm990_i2c_devices)); | 537 | i2c_register_board_info(0, ARRAY_AND_SIZE(pcm990_i2c_devices)); |
538 | |||
539 | platform_device_register(&pcm990_camera[0]); | ||
540 | platform_device_register(&pcm990_camera[1]); | ||
504 | #endif | 541 | #endif |
505 | 542 | ||
506 | printk(KERN_INFO "PCM-990 Evaluation baseboard initialized\n"); | 543 | printk(KERN_INFO "PCM-990 Evaluation baseboard initialized\n"); |