From patchwork Thu Jan 22 00:33:21 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 3503 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n0M0m2SL002832 for ; Wed, 21 Jan 2009 16:48:10 -0800 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753728AbZAVAwt (ORCPT ); Wed, 21 Jan 2009 19:52:49 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754401AbZAVAwt (ORCPT ); Wed, 21 Jan 2009 19:52:49 -0500 Received: from mail.renesas.com ([202.234.163.13]:54602 "EHLO mail03.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753728AbZAVAwt (ORCPT ); Wed, 21 Jan 2009 19:52:49 -0500 X-AuditID: ac140386-0000000b00001aa8-f5-4977c35f78cb Received: from guardian01.idc.renesas.com ([172.20.8.200]) by mail03.idc.renesas.com (sendmail) with ESMTP id n0M0qlkn029512; Thu, 22 Jan 2009 09:52:47 +0900 (JST) Received: (from root@localhost) by guardian01.idc.renesas.com with id n0M0qkP8007779; Thu, 22 Jan 2009 09:52:46 +0900 (JST) Received: from mta01.idc.renesas.com (localhost [127.0.0.1]) by mta01.idc.renesas.com with ESMTP id n0M0qk0O021987; Thu, 22 Jan 2009 09:52:46 +0900 (JST) Received: from PG10870.renesas.com ([172.30.8.159]) by ims05.idc.renesas.com (Sendmail) with ESMTPA id <0KDU008EUL3Y34@ims05.idc.renesas.com>; Thu, 22 Jan 2009 09:52:46 +0900 (JST) Date: Thu, 22 Jan 2009 09:33:21 +0900 From: Kuninori Morimoto Subject: [PATCH 1/2] ap325 control camera power To: Paul Mundt Cc: SH-Linux Message-id: MIME-version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-type: text/plain; charset=US-ASCII User-Agent: SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.7 Emacs/22.1 (i386-mingw-nt5.1.2600) MULE/5.0 (SAKAKI) Meadow/3.00-dev (KIKU) X-Brightmail-Tracker: AAAAAA== Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org Signed-off-by: Kuninori Morimoto Signed-off-by: Magnus Damm --- arch/sh/boards/board-ap325rxa.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/arch/sh/boards/board-ap325rxa.c b/arch/sh/boards/board-ap325rxa.c index caf4c33..72da416 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 = { }, }; +static void camera_power(int val) +{ + gpio_set_value(GPIO_PTZ5, val); /* RST_CAM/RSTB */ + mdelay(10); +} + #ifdef CONFIG_I2C static unsigned char camera_ncm03j_magic[] = { @@ -245,9 +251,11 @@ static int camera_set_capture(struct soc_camera_platform_info *info, int ret = 0; int i; + camera_power(0); if (!enable) return 0; /* no disable for now */ + camera_power(1); for (i = 0; i < ARRAY_SIZE(camera_ncm03j_magic); i += 2) { u_int8_t buf[8]; @@ -426,7 +434,7 @@ static int __init ap325rxa_devices_setup(void) gpio_request(GPIO_PTZ6, NULL); gpio_direction_output(GPIO_PTZ6, 0); /* STBY_CAM */ gpio_request(GPIO_PTZ5, NULL); - gpio_direction_output(GPIO_PTZ5, 1); /* RST_CAM */ + gpio_direction_output(GPIO_PTZ5, 0); /* RST_CAM */ gpio_request(GPIO_PTZ4, NULL); gpio_direction_output(GPIO_PTZ4, 0); /* SADDR */