From patchwork Tue May 12 15:13:36 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 23264 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 n4CFDTTG027920 for ; Tue, 12 May 2009 15:13:29 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752229AbZELPN0 (ORCPT ); Tue, 12 May 2009 11:13:26 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753840AbZELPN0 (ORCPT ); Tue, 12 May 2009 11:13:26 -0400 Received: from mail.gmx.net ([213.165.64.20]:58101 "HELO mail.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752229AbZELPNZ (ORCPT ); Tue, 12 May 2009 11:13:25 -0400 Received: (qmail invoked by alias); 12 May 2009 15:13:25 -0000 Received: from p57BD1CA6.dip0.t-ipconnect.de (EHLO axis700.grange) [87.189.28.166] by mail.gmx.net (mp006) with SMTP; 12 May 2009 17:13:25 +0200 X-Authenticated: #20450766 X-Provags-ID: V01U2FsdGVkX19QzzsduNxQ2xn1HpD6d4KRLAJEx+ZkJg7JLWA3Gc b2fOxGQkU9pJ8X Received: from lyakh (helo=localhost) by axis700.grange with local-esmtp (Exim 4.63) (envelope-from ) id 1M3tfk-0002N0-Mn; Tue, 12 May 2009 17:13:36 +0200 Date: Tue, 12 May 2009 17:13:36 +0200 (CEST) From: Guennadi Liakhovetski To: Linux Media Mailing List cc: Paul Mundt , linux-sh@vger.kernel.org, Magnus Damm Subject: [PATCH 2/3] SH: convert ap325rxa to soc-camera as platform-device In-Reply-To: Message-ID: References: MIME-Version: 1.0 X-Y-GMX-Trusted: 0 X-FuHaFi: 0.47 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Signed-off-by: Guennadi Liakhovetski --- arch/sh/boards/board-ap325rxa.c | 50 +++++++++++++++++++++++++-------------- 1 files changed, 32 insertions(+), 18 deletions(-) diff --git a/arch/sh/boards/board-ap325rxa.c b/arch/sh/boards/board-ap325rxa.c index 54c5cd1..cd1fcc0 100644 --- a/arch/sh/boards/board-ap325rxa.c +++ b/arch/sh/boards/board-ap325rxa.c @@ -346,15 +346,6 @@ static int ov7725_power(struct device *dev, int mode) return 0; } -static struct ov772x_camera_info ov7725_info = { - .buswidth = SOCAM_DATAWIDTH_8, - .flags = OV772X_FLAG_VFLIP | OV772X_FLAG_HFLIP, - .edgectrl = OV772X_AUTO_EDGECTRL(0xf, 0), - .link = { - .power = ov7725_power, - }, -}; - static struct sh_mobile_ceu_info sh_mobile_ceu_info = { .flags = SH_CEU_FLAG_USE_8BIT_BUS, }; @@ -399,25 +390,48 @@ static struct platform_device sdcard_cn3_device = { }, }; -static struct platform_device *ap325rxa_devices[] __initdata = { - &smsc9118_device, - &ap325rxa_nor_flash_device, - &lcdc_device, - &ceu_device, - &nand_flash_device, - &sdcard_cn3_device, -}; - static struct i2c_board_info __initdata ap325rxa_i2c_devices[] = { { I2C_BOARD_INFO("pcf8563", 0x51), }, +}; + +static struct i2c_board_info ap325rxa_i2c_camera[] = { { I2C_BOARD_INFO("ov772x", 0x21), + }, +}; + +static struct ov772x_camera_info ov7725_info = { + .buswidth = SOCAM_DATAWIDTH_8, + .flags = OV772X_FLAG_VFLIP | OV772X_FLAG_HFLIP, + .edgectrl = OV772X_AUTO_EDGECTRL(0xf, 0), + .link = { + .power = ov7725_power, + .board_info = &ap325rxa_i2c_camera[0], + .i2c_adapter_id = 0, + .module_name = "ov772x", + }, +}; + +static struct platform_device ap325rxa_camera = { + .name = "soc-camera-pdrv", + .id = 0, + .dev = { .platform_data = &ov7725_info.link, }, }; +static struct platform_device *ap325rxa_devices[] __initdata = { + &smsc9118_device, + &ap325rxa_nor_flash_device, + &lcdc_device, + &ceu_device, + &nand_flash_device, + &sdcard_cn3_device, + &ap325rxa_camera, +}; + static struct spi_board_info ap325rxa_spi_devices[] = { { .modalias = "mmc_spi",