From patchwork Fri Apr 24 16:41:02 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 19834 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 n3OGeDLu018494 for ; Fri, 24 Apr 2009 16:40:55 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754323AbZDXQky (ORCPT ); Fri, 24 Apr 2009 12:40:54 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755547AbZDXQky (ORCPT ); Fri, 24 Apr 2009 12:40:54 -0400 Received: from mail.gmx.net ([213.165.64.20]:55238 "HELO mail.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1754323AbZDXQkx (ORCPT ); Fri, 24 Apr 2009 12:40:53 -0400 Received: (qmail invoked by alias); 24 Apr 2009 16:40:48 -0000 Received: from p57BD1BE6.dip0.t-ipconnect.de (EHLO axis700.grange) [87.189.27.230] by mail.gmx.net (mp019) with SMTP; 24 Apr 2009 18:40:48 +0200 X-Authenticated: #20450766 X-Provags-ID: V01U2FsdGVkX19dqXMyr3RdnTmNog1gtdXId/UndDgi4RWcC88Imp erQp6v56O4ubay Received: from lyakh (helo=localhost) by axis700.grange with local-esmtp (Exim 4.63) (envelope-from ) id 1LxOSU-0002Lq-Ng; Fri, 24 Apr 2009 18:41:02 +0200 Date: Fri, 24 Apr 2009 18:41:02 +0200 (CEST) From: Guennadi Liakhovetski To: Linux Media Mailing List cc: Hans Verkuil , Robert Jarzmik , Magnus Damm , Paul Mundt Subject: [PATCH 8/8] SH: convert migor 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/mach-migor/setup.c | 79 ++++++++++++++++++++++++------------- 1 files changed, 52 insertions(+), 27 deletions(-) diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c index c4b97e1..785c3e1 100644 --- a/arch/sh/boards/mach-migor/setup.c +++ b/arch/sh/boards/mach-migor/setup.c @@ -381,21 +381,6 @@ static struct platform_device migor_ceu_device = { }, }; -static struct ov772x_camera_info ov7725_info = { - .buswidth = SOCAM_DATAWIDTH_8, - .link = { - .power = ov7725_power, - }, -}; - -static struct tw9910_video_info tw9910_info = { - .buswidth = SOCAM_DATAWIDTH_8, - .mpout = TW9910_MPO_FIELD, - .link = { - .power = tw9910_power, - } -}; - struct spi_gpio_platform_data sdcard_cn9_platform_data = { .sck = GPIO_PTD0, .mosi = GPIO_PTD1, @@ -410,16 +395,6 @@ static struct platform_device sdcard_cn9_device = { }, }; -static struct platform_device *migor_devices[] __initdata = { - &smc91x_eth_device, - &sh_keysc_device, - &migor_lcdc_device, - &migor_ceu_device, - &migor_nor_flash_device, - &migor_nand_flash_device, - &sdcard_cn9_device, -}; - static struct i2c_board_info migor_i2c_devices[] = { { I2C_BOARD_INFO("rs5c372b", 0x32), @@ -428,16 +403,66 @@ static struct i2c_board_info migor_i2c_devices[] = { I2C_BOARD_INFO("migor_ts", 0x51), .irq = 38, /* IRQ6 */ }, +}; + +static struct i2c_board_info migor_i2c_camera[] = { { I2C_BOARD_INFO("ov772x", 0x21), - .platform_data = &ov7725_info.link, }, { I2C_BOARD_INFO("tw9910", 0x45), - .platform_data = &tw9910_info.link, }, }; +static struct ov772x_camera_info ov7725_info = { + .buswidth = SOCAM_DATAWIDTH_8, + .link = { + .power = ov7725_power, + .board_info = &migor_i2c_camera[0], + .i2c_adapter_id = 0, + .module_name = "ov772x", + }, +}; + +static struct tw9910_video_info tw9910_info = { + .buswidth = SOCAM_DATAWIDTH_8, + .mpout = TW9910_MPO_FIELD, + .link = { + .power = tw9910_power, + .board_info = &migor_i2c_camera[1], + .i2c_adapter_id = 0, + .module_name = "tw9910", + } +}; + +static struct platform_device migor_camera[] = { + { + .name = "soc-camera-pdrv", + .id = 0, + .dev = { + .platform_data = &ov7725_info.link, + }, + }, { + .name = "soc-camera-pdrv", + .id = 1, + .dev = { + .platform_data = &tw9910_info.link, + }, + }, +}; + +static struct platform_device *migor_devices[] __initdata = { + &smc91x_eth_device, + &sh_keysc_device, + &migor_lcdc_device, + &migor_ceu_device, + &migor_nor_flash_device, + &migor_nand_flash_device, + &sdcard_cn9_device, + &migor_camera[0], + &migor_camera[1], +}; + static struct spi_board_info migor_spi_devices[] = { { .modalias = "mmc_spi",