From patchwork Mon Nov 8 13:45:48 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: 308332 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oA8Dk5fj006106 for ; Mon, 8 Nov 2010 13:46:06 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754592Ab0KHNpv (ORCPT ); Mon, 8 Nov 2010 08:45:51 -0500 Received: from smtp-gw11.han.skanova.net ([81.236.55.20]:60647 "EHLO smtp-gw11.han.skanova.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754541Ab0KHNpt (ORCPT ); Mon, 8 Nov 2010 08:45:49 -0500 Received: from [10.8.36.162] (194.237.7.146) by smtp-gw11.han.skanova.net (8.5.124.10) id 4C7CB7ED0253EE03; Mon, 8 Nov 2010 14:45:48 +0100 Subject: [PATCH 2/2 v4] mfd: Add timberdale video-in driver to timberdale From: Richard =?ISO-8859-1?Q?R=F6jfors?= To: Richard =?ISO-8859-1?Q?R=F6jfors?= Cc: Linux Media Mailing List , Samuel Ortiz , Mauro Carvalho Chehab , Douglas Schilling Landgraf Date: Mon, 08 Nov 2010 14:45:48 +0100 Message-ID: <1289223948.23406.23.camel@debian> Mime-Version: 1.0 X-Mailer: Evolution 2.30.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 (demeter1.kernel.org [140.211.167.41]); Mon, 08 Nov 2010 13:46:06 +0000 (UTC) diff --git a/drivers/mfd/timberdale.c b/drivers/mfd/timberdale.c index 727f62c..6e53a16 100644 --- a/drivers/mfd/timberdale.c +++ b/drivers/mfd/timberdale.c @@ -40,6 +40,7 @@ #include #include +#include #include @@ -246,7 +247,24 @@ static const __devinitconst struct resource timberdale_uartlite_resources[] = { }, }; -static const __devinitconst struct resource timberdale_radio_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 + } +}; + +static const __devinitconst struct resource +timberdale_radio_resources[] = { { .start = RDSOFFSET, .end = RDSEND, @@ -280,6 +298,18 @@ static __devinitdata struct timb_radio_platform_data } }; +static const __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 = { @@ -380,6 +410,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, @@ -440,6 +477,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, @@ -490,6 +534,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, @@ -533,6 +584,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, diff --git a/drivers/mfd/timberdale.h b/drivers/mfd/timberdale.h index c11bf6e..4412acd 100644 --- a/drivers/mfd/timberdale.h +++ b/drivers/mfd/timberdale.h @@ -23,7 +23,7 @@ #ifndef MFD_TIMBERDALE_H #define MFD_TIMBERDALE_H -#define DRV_VERSION "0.2" +#define DRV_VERSION "0.3" /* This driver only support versions >= 3.8 and < 4.0 */ #define TIMB_SUPPORTED_MAJOR 3