aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/boards')
-rw-r--r--arch/sh/boards/board-ap325rxa.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/sh/boards/board-ap325rxa.c b/arch/sh/boards/board-ap325rxa.c
index caf4c33f4e84..72da416f6162 100644
--- a/arch/sh/boards/board-ap325rxa.c
+++ b/arch/sh/boards/board-ap325rxa.c
@@ -216,6 +216,12 @@ static struct platform_device lcdc_device = {
216 }, 216 },
217}; 217};
218 218
219static void camera_power(int val)
220{
221 gpio_set_value(GPIO_PTZ5, val); /* RST_CAM/RSTB */
222 mdelay(10);
223}
224
219#ifdef CONFIG_I2C 225#ifdef CONFIG_I2C
220static unsigned char camera_ncm03j_magic[] = 226static unsigned char camera_ncm03j_magic[] =
221{ 227{
@@ -245,9 +251,11 @@ static int camera_set_capture(struct soc_camera_platform_info *info,
245 int ret = 0; 251 int ret = 0;
246 int i; 252 int i;
247 253
254 camera_power(0);
248 if (!enable) 255 if (!enable)
249 return 0; /* no disable for now */ 256 return 0; /* no disable for now */
250 257
258 camera_power(1);
251 for (i = 0; i < ARRAY_SIZE(camera_ncm03j_magic); i += 2) { 259 for (i = 0; i < ARRAY_SIZE(camera_ncm03j_magic); i += 2) {
252 u_int8_t buf[8]; 260 u_int8_t buf[8];
253 261
@@ -426,7 +434,7 @@ static int __init ap325rxa_devices_setup(void)
426 gpio_request(GPIO_PTZ6, NULL); 434 gpio_request(GPIO_PTZ6, NULL);
427 gpio_direction_output(GPIO_PTZ6, 0); /* STBY_CAM */ 435 gpio_direction_output(GPIO_PTZ6, 0); /* STBY_CAM */
428 gpio_request(GPIO_PTZ5, NULL); 436 gpio_request(GPIO_PTZ5, NULL);
429 gpio_direction_output(GPIO_PTZ5, 1); /* RST_CAM */ 437 gpio_direction_output(GPIO_PTZ5, 0); /* RST_CAM */
430 gpio_request(GPIO_PTZ4, NULL); 438 gpio_request(GPIO_PTZ4, NULL);
431 gpio_direction_output(GPIO_PTZ4, 0); /* SADDR */ 439 gpio_direction_output(GPIO_PTZ4, 0); /* SADDR */
432 440