aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
authorKuninori Morimoto <morimoto.kuninori@renesas.com>2009-01-21 19:33:21 -0500
committerPaul Mundt <lethal@linux-sh.org>2009-01-28 21:56:02 -0500
commit86746284e20411c66e25bddac391ba821560522b (patch)
treeff6de510c171f82efe51c2ae5200dea32f09aece /arch/sh
parent334d99072d2b740fa3e0d14e1ac1126805dda2ef (diff)
sh: ap325rxa: control camera power toggling.
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh')
-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