diff options
| -rw-r--r-- | arch/sh/boards/board-ap325rxa.c | 53 |
1 files changed, 3 insertions, 50 deletions
diff --git a/arch/sh/boards/board-ap325rxa.c b/arch/sh/boards/board-ap325rxa.c index 7c35787d29b4..72da416f6162 100644 --- a/arch/sh/boards/board-ap325rxa.c +++ b/arch/sh/boards/board-ap325rxa.c | |||
| @@ -22,7 +22,6 @@ | |||
| 22 | #include <linux/gpio.h> | 22 | #include <linux/gpio.h> |
| 23 | #include <linux/spi/spi.h> | 23 | #include <linux/spi/spi.h> |
| 24 | #include <linux/spi/spi_gpio.h> | 24 | #include <linux/spi/spi_gpio.h> |
| 25 | #include <media/ov772x.h> | ||
| 26 | #include <media/soc_camera_platform.h> | 25 | #include <media/soc_camera_platform.h> |
| 27 | #include <media/sh_mobile_ceu.h> | 26 | #include <media/sh_mobile_ceu.h> |
| 28 | #include <video/sh_mobile_lcdc.h> | 27 | #include <video/sh_mobile_lcdc.h> |
| @@ -224,7 +223,6 @@ static void camera_power(int val) | |||
| 224 | } | 223 | } |
| 225 | 224 | ||
| 226 | #ifdef CONFIG_I2C | 225 | #ifdef CONFIG_I2C |
| 227 | /* support for the old ncm03j camera */ | ||
| 228 | static unsigned char camera_ncm03j_magic[] = | 226 | static unsigned char camera_ncm03j_magic[] = |
| 229 | { | 227 | { |
| 230 | 0x87, 0x00, 0x88, 0x08, 0x89, 0x01, 0x8A, 0xE8, | 228 | 0x87, 0x00, 0x88, 0x08, 0x89, 0x01, 0x8A, 0xE8, |
| @@ -245,23 +243,6 @@ static unsigned char camera_ncm03j_magic[] = | |||
| 245 | 0x63, 0xD4, 0x64, 0xEA, 0xD6, 0x0F, | 243 | 0x63, 0xD4, 0x64, 0xEA, 0xD6, 0x0F, |
| 246 | }; | 244 | }; |
| 247 | 245 | ||
| 248 | static int camera_probe(void) | ||
| 249 | { | ||
| 250 | struct i2c_adapter *a = i2c_get_adapter(0); | ||
| 251 | struct i2c_msg msg; | ||
| 252 | int ret; | ||
| 253 | |||
| 254 | camera_power(1); | ||
| 255 | msg.addr = 0x6e; | ||
| 256 | msg.buf = camera_ncm03j_magic; | ||
| 257 | msg.len = 2; | ||
| 258 | msg.flags = 0; | ||
| 259 | ret = i2c_transfer(a, &msg, 1); | ||
| 260 | camera_power(0); | ||
| 261 | |||
| 262 | return ret; | ||
| 263 | } | ||
| 264 | |||
| 265 | static int camera_set_capture(struct soc_camera_platform_info *info, | 246 | static int camera_set_capture(struct soc_camera_platform_info *info, |
| 266 | int enable) | 247 | int enable) |
| 267 | { | 248 | { |
| @@ -313,35 +294,8 @@ static struct platform_device camera_device = { | |||
| 313 | .platform_data = &camera_info, | 294 | .platform_data = &camera_info, |
| 314 | }, | 295 | }, |
| 315 | }; | 296 | }; |
| 316 | |||
| 317 | static int __init camera_setup(void) | ||
| 318 | { | ||
| 319 | if (camera_probe() > 0) | ||
| 320 | platform_device_register(&camera_device); | ||
| 321 | |||
| 322 | return 0; | ||
| 323 | } | ||
| 324 | late_initcall(camera_setup); | ||
| 325 | |||
| 326 | #endif /* CONFIG_I2C */ | 297 | #endif /* CONFIG_I2C */ |
| 327 | 298 | ||
| 328 | static int ov7725_power(struct device *dev, int mode) | ||
| 329 | { | ||
| 330 | camera_power(0); | ||
| 331 | if (mode) | ||
| 332 | camera_power(1); | ||
| 333 | |||
| 334 | return 0; | ||
| 335 | } | ||
| 336 | |||
| 337 | static struct ov772x_camera_info ov7725_info = { | ||
| 338 | .buswidth = SOCAM_DATAWIDTH_8, | ||
| 339 | .flags = OV772X_FLAG_VFLIP | OV772X_FLAG_HFLIP, | ||
| 340 | .link = { | ||
| 341 | .power = ov7725_power, | ||
| 342 | }, | ||
| 343 | }; | ||
| 344 | |||
| 345 | static struct sh_mobile_ceu_info sh_mobile_ceu_info = { | 299 | static struct sh_mobile_ceu_info sh_mobile_ceu_info = { |
| 346 | .flags = SOCAM_PCLK_SAMPLE_RISING | SOCAM_HSYNC_ACTIVE_HIGH | | 300 | .flags = SOCAM_PCLK_SAMPLE_RISING | SOCAM_HSYNC_ACTIVE_HIGH | |
| 347 | SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_MASTER | SOCAM_DATAWIDTH_8, | 301 | SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_MASTER | SOCAM_DATAWIDTH_8, |
| @@ -392,6 +346,9 @@ static struct platform_device *ap325rxa_devices[] __initdata = { | |||
| 392 | &ap325rxa_nor_flash_device, | 346 | &ap325rxa_nor_flash_device, |
| 393 | &lcdc_device, | 347 | &lcdc_device, |
| 394 | &ceu_device, | 348 | &ceu_device, |
| 349 | #ifdef CONFIG_I2C | ||
| 350 | &camera_device, | ||
| 351 | #endif | ||
| 395 | &nand_flash_device, | 352 | &nand_flash_device, |
| 396 | &sdcard_cn3_device, | 353 | &sdcard_cn3_device, |
| 397 | }; | 354 | }; |
| @@ -400,10 +357,6 @@ static struct i2c_board_info __initdata ap325rxa_i2c_devices[] = { | |||
| 400 | { | 357 | { |
| 401 | I2C_BOARD_INFO("pcf8563", 0x51), | 358 | I2C_BOARD_INFO("pcf8563", 0x51), |
| 402 | }, | 359 | }, |
| 403 | { | ||
| 404 | I2C_BOARD_INFO("ov772x", 0x21), | ||
| 405 | .platform_data = &ov7725_info, | ||
| 406 | }, | ||
| 407 | }; | 360 | }; |
| 408 | 361 | ||
| 409 | static struct spi_board_info ap325rxa_spi_devices[] = { | 362 | static struct spi_board_info ap325rxa_spi_devices[] = { |
