From patchwork Fri Apr 24 16:40:22 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 19830 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 n3OGeDLq018494 for ; Fri, 24 Apr 2009 16:40:13 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755527AbZDXQkL (ORCPT ); Fri, 24 Apr 2009 12:40:11 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755529AbZDXQkL (ORCPT ); Fri, 24 Apr 2009 12:40:11 -0400 Received: from mail.gmx.net ([213.165.64.20]:54344 "HELO mail.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1755527AbZDXQkJ (ORCPT ); Fri, 24 Apr 2009 12:40:09 -0400 Received: (qmail invoked by alias); 24 Apr 2009 16:40:07 -0000 Received: from p57BD1BE6.dip0.t-ipconnect.de (EHLO axis700.grange) [87.189.27.230] by mail.gmx.net (mp023) with SMTP; 24 Apr 2009 18:40:07 +0200 X-Authenticated: #20450766 X-Provags-ID: V01U2FsdGVkX186fUMmsjs6Ca77I6vt94p/DQXE+j25LfnwUBACll ShamBFXYXouNzp Received: from lyakh (helo=localhost) by axis700.grange with local-esmtp (Exim 4.63) (envelope-from ) id 1LxORq-0002Le-1J; Fri, 24 Apr 2009 18:40:22 +0200 Date: Fri, 24 Apr 2009 18:40:22 +0200 (CEST) From: Guennadi Liakhovetski To: Linux Media Mailing List cc: Hans Verkuil , Robert Jarzmik , Magnus Damm , eric miao Subject: [PATCH 4/8] ARM: convert em-x270 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.53 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/arm/mach-pxa/em-x270.c | 22 ++++++++++++++++------ 1 files changed, 16 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c index bc0f73f..d35bc25 100644 --- a/arch/arm/mach-pxa/em-x270.c +++ b/arch/arm/mach-pxa/em-x270.c @@ -917,14 +917,24 @@ static int em_x270_sensor_power(struct device *dev, int on) return 0; } -static struct soc_camera_link iclink = { - .bus_id = 0, - .power = em_x270_sensor_power, -}; - static struct i2c_board_info em_x270_i2c_cam_info[] = { { I2C_BOARD_INFO("mt9m111", 0x48), + }, +}; + +static struct soc_camera_link iclink = { + .bus_id = 0, + .power = em_x270_sensor_power, + .board_info = &em_x270_i2c_cam_info[0], + .i2c_adapter_id = 0, + .module_name = "mt9m111", +}; + +static struct platform_device em_x270_camera = { + .name = "soc-camera-pdrv", + .id = -1, + .dev = { .platform_data = &iclink, }, }; @@ -936,8 +946,8 @@ static struct i2c_pxa_platform_data em_x270_i2c_info = { static void __init em_x270_init_camera(void) { pxa_set_i2c_info(&em_x270_i2c_info); - i2c_register_board_info(0, ARRAY_AND_SIZE(em_x270_i2c_cam_info)); pxa_set_camera_info(&em_x270_camera_platform_data); + platform_device_register(&em_x270_camera); } #else static inline void em_x270_init_camera(void) {}