From patchwork Fri May 15 17:19:10 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 24135 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 n4FHIkid031122 for ; Fri, 15 May 2009 17:19:05 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753601AbZEORTB (ORCPT ); Fri, 15 May 2009 13:19:01 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753663AbZEORTB (ORCPT ); Fri, 15 May 2009 13:19:01 -0400 Received: from mail.gmx.net ([213.165.64.20]:54900 "HELO mail.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1753057AbZEORTA (ORCPT ); Fri, 15 May 2009 13:19:00 -0400 Received: (qmail invoked by alias); 15 May 2009 17:19:00 -0000 Received: from p57BD0961.dip0.t-ipconnect.de (EHLO axis700.grange) [87.189.9.97] by mail.gmx.net (mp001) with SMTP; 15 May 2009 19:19:00 +0200 X-Authenticated: #20450766 X-Provags-ID: V01U2FsdGVkX18QmQpusw4QHSuwcbmndT2gap15Pgbr3pbv3mMF/T aQq1838n8OxwUX Received: from lyakh (helo=localhost) by axis700.grange with local-esmtp (Exim 4.63) (envelope-from ) id 1M513u-0002ZD-SG; Fri, 15 May 2009 19:19:10 +0200 Date: Fri, 15 May 2009 19:19:10 +0200 (CEST) From: Guennadi Liakhovetski To: Linux Media Mailing List cc: Hans Verkuil , Magnus Damm , Robert Jarzmik , Darius Augulis , Sascha Hauer , Paul Mundt Subject: [PATCH 02/10 v2] ARM: convert pcm037 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.46 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Signed-off-by: Guennadi Liakhovetski --- This is actually a completion to the other single patches I've sent earlier for various boards. As I said, pcm037 doesn't have all its outstanding patches in next yet, so, you'll need to collect them from trees / lists, or get them when I upload them. arch/arm/mach-mx3/pcm037.c | 26 ++++++++++++++++++-------- 1 files changed, 18 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-mx3/pcm037.c b/arch/arm/mach-mx3/pcm037.c index bfa814d..af49f03 100644 --- a/arch/arm/mach-mx3/pcm037.c +++ b/arch/arm/mach-mx3/pcm037.c @@ -293,9 +293,18 @@ static int pcm037_camera_power(struct device *dev, int on) return 0; } +static struct i2c_board_info pcm037_i2c_2_devices[] = { + { + I2C_BOARD_INFO("mt9t031", 0x5d), + }, +}; + static struct soc_camera_link iclink = { - .bus_id = 0, /* Must match with the camera ID */ - .power = pcm037_camera_power, + .bus_id = 0, /* Must match with the camera ID */ + .power = pcm037_camera_power, + .board_info = &pcm037_i2c_2_devices[0], + .i2c_adapter_id = 2, + .module_name = "mt9t031", }; static struct i2c_board_info pcm037_i2c_devices[] = { @@ -308,9 +317,10 @@ static struct i2c_board_info pcm037_i2c_devices[] = { } }; -static struct i2c_board_info pcm037_i2c_2_devices[] = { - { - I2C_BOARD_INFO("mt9t031", 0x5d), +static struct platform_device pcm037_camera = { + .name = "soc-camera-pdrv", + .id = 0, + .dev = { .platform_data = &iclink, }, }; @@ -390,6 +400,9 @@ static struct platform_device *devices[] __initdata = { &pcm037_flash, &pcm037_eth, &pcm037_sram_device, +#if defined(CONFIG_I2C_IMX) || defined(CONFIG_I2C_IMX_MODULE) + &pcm037_camera, +#endif }; static struct ipu_platform_data mx3_ipu_data = { @@ -447,9 +460,6 @@ static void __init mxc_board_init(void) i2c_register_board_info(1, pcm037_i2c_devices, ARRAY_SIZE(pcm037_i2c_devices)); - i2c_register_board_info(2, pcm037_i2c_2_devices, - ARRAY_SIZE(pcm037_i2c_2_devices)); - mxc_register_device(&mxc_i2c_device1, &pcm037_i2c_1_data); mxc_register_device(&mxc_i2c_device2, &pcm037_i2c_2_data); #endif