From patchwork Fri Apr 24 16:40:54 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 19833 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 n3OGeDLt018494 for ; Fri, 24 Apr 2009 16:40:44 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753295AbZDXQkm (ORCPT ); Fri, 24 Apr 2009 12:40:42 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754323AbZDXQkm (ORCPT ); Fri, 24 Apr 2009 12:40:42 -0400 Received: from mail.gmx.net ([213.165.64.20]:46215 "HELO mail.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1753295AbZDXQkm (ORCPT ); Fri, 24 Apr 2009 12:40:42 -0400 Received: (qmail invoked by alias); 24 Apr 2009 16:40:40 -0000 Received: from p57BD1BE6.dip0.t-ipconnect.de (EHLO axis700.grange) [87.189.27.230] by mail.gmx.net (mp013) with SMTP; 24 Apr 2009 18:40:40 +0200 X-Authenticated: #20450766 X-Provags-ID: V01U2FsdGVkX19vVU9PB49vmXDaRofr0IHA0MrdX5fQSs0YmMGISD 3Xcc2blFG4CAgG Received: from lyakh (helo=localhost) by axis700.grange with local-esmtp (Exim 4.63) (envelope-from ) id 1LxOSM-0002Ln-3z; Fri, 24 Apr 2009 18:40:54 +0200 Date: Fri, 24 Apr 2009 18:40:54 +0200 (CEST) From: Guennadi Liakhovetski To: Linux Media Mailing List cc: Hans Verkuil , Robert Jarzmik , Magnus Damm , Paul Mundt Subject: [PATCH 7/8] SH: convert ap325rxa to the new platform-device soc-camera interface In-Reply-To: Message-ID: References: MIME-Version: 1.0 X-Y-GMX-Trusted: 0 X-FuHaFi: 0.48 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Signed-off-by: Guennadi Liakhovetski --- For review __ONLY__ for now - will re-submit after I have pushed 1/8 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..4ceed71 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 __initdata 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",