From patchwork Fri Apr 16 16:28:17 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?UmljaGFyZCBSw4PCtmpmb3Jz?= X-Patchwork-Id: 93176 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o3GGjnlf016100 for ; Fri, 16 Apr 2010 16:45:50 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758605Ab0DPQpc (ORCPT ); Fri, 16 Apr 2010 12:45:32 -0400 Received: from av9-1-sn3.vrr.skanova.net ([81.228.9.185]:43566 "EHLO av9-1-sn3.vrr.skanova.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758603Ab0DPQpb (ORCPT ); Fri, 16 Apr 2010 12:45:31 -0400 Received: by av9-1-sn3.vrr.skanova.net (Postfix, from userid 502) id 24F05382B6; Fri, 16 Apr 2010 18:28:18 +0200 (CEST) Received: from smtp3-1-sn3.vrr.skanova.net (smtp3-1-sn3.vrr.skanova.net [81.228.9.101]) by av9-1-sn3.vrr.skanova.net (Postfix) with ESMTP id F198F38010; Fri, 16 Apr 2010 18:28:17 +0200 (CEST) Received: from [10.8.36.156] (194-237-7-146.customer.telia.com [194.237.7.146]) by smtp3-1-sn3.vrr.skanova.net (Postfix) with ESMTP id E6E5E37E42; Fri, 16 Apr 2010 18:28:17 +0200 (CEST) Subject: [PATCH 2/2] mfd: Add timberdale video-in driver to timberdale From: Richard =?ISO-8859-1?Q?R=F6jfors?= To: Linux Kernel Mailing List Cc: Linux Media Mailing List , Samuel Ortiz , Douglas Schilling Landgraf , Mauro Carvalho Chehab , "Williams, Dan J" Date: Fri, 16 Apr 2010 18:28:17 +0200 Message-ID: <1271435297.11641.46.camel@debian> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 16 Apr 2010 16:45:50 +0000 (UTC) diff --git a/drivers/mfd/timberdale.c b/drivers/mfd/timberdale.c index 2d4691a..49aa733 100644 --- a/drivers/mfd/timberdale.c +++ b/drivers/mfd/timberdale.c @@ -40,6 +40,7 @@ #include #include +#include #include @@ -238,6 +239,22 @@ const static __devinitconst struct resource timberdale_uartlite_resources[] = { }, }; +static __devinitdata struct i2c_board_info timberdale_adv7180_i2c_board_info = { + /* Requires jumper JP9 to be off */ + I2C_BOARD_INFO("adv7180", 0x42 >> 1), + .irq = IRQ_TIMBERDALE_ADV7180 +}; + +static __devinitdata struct timb_video_platform_data + timberdale_video_platform_data = { + .dma_channel = DMA_VIDEO_RX, + .i2c_adapter = 0, + .encoder = { + .module_name = "adv7180", + .info = &timberdale_adv7180_i2c_board_info + } +}; + const static __devinitconst struct resource timberdale_radio_resources[] = { { .start = RDSOFFSET, @@ -272,6 +289,18 @@ static __devinitdata struct timb_radio_platform_data } }; +const static __devinitconst struct resource timberdale_video_resources[] = { + { + .start = LOGIWOFFSET, + .end = LOGIWEND, + .flags = IORESOURCE_MEM, + }, + /* + note that the "frame buffer" is located in DMA area + starting at 0x1200000 + */ +}; + static __devinitdata struct timb_dma_platform_data timb_dma_platform_data = { .nr_channels = 10, .channels = { @@ -372,6 +401,13 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg0[] = { .data_size = sizeof(timberdale_gpio_platform_data), }, { + .name = "timb-video", + .num_resources = ARRAY_SIZE(timberdale_video_resources), + .resources = timberdale_video_resources, + .platform_data = &timberdale_video_platform_data, + .data_size = sizeof(timberdale_video_platform_data), + }, + { .name = "timb-radio", .num_resources = ARRAY_SIZE(timberdale_radio_resources), .resources = timberdale_radio_resources, @@ -430,6 +466,13 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg1[] = { .resources = timberdale_mlogicore_resources, }, { + .name = "timb-video", + .num_resources = ARRAY_SIZE(timberdale_video_resources), + .resources = timberdale_video_resources, + .platform_data = &timberdale_video_platform_data, + .data_size = sizeof(timberdale_video_platform_data), + }, + { .name = "timb-radio", .num_resources = ARRAY_SIZE(timberdale_radio_resources), .resources = timberdale_radio_resources, @@ -478,6 +521,13 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg2[] = { .data_size = sizeof(timberdale_gpio_platform_data), }, { + .name = "timb-video", + .num_resources = ARRAY_SIZE(timberdale_video_resources), + .resources = timberdale_video_resources, + .platform_data = &timberdale_video_platform_data, + .data_size = sizeof(timberdale_video_platform_data), + }, + { .name = "timb-radio", .num_resources = ARRAY_SIZE(timberdale_radio_resources), .resources = timberdale_radio_resources, @@ -521,6 +571,13 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg3[] = { .data_size = sizeof(timberdale_gpio_platform_data), }, { + .name = "timb-video", + .num_resources = ARRAY_SIZE(timberdale_video_resources), + .resources = timberdale_video_resources, + .platform_data = &timberdale_video_platform_data, + .data_size = sizeof(timberdale_video_platform_data), + }, + { .name = "timb-radio", .num_resources = ARRAY_SIZE(timberdale_radio_resources), .resources = timberdale_radio_resources,