From patchwork Fri Feb 19 22:41:54 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmljaGFyZCBSw4PCtmpmb3Jz?= X-Patchwork-Id: 80838 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 o1JMlxgH012078 for ; Fri, 19 Feb 2010 22:47:59 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755577Ab0BSWr6 (ORCPT ); Fri, 19 Feb 2010 17:47:58 -0500 Received: from qw-out-2122.google.com ([74.125.92.27]:47829 "EHLO qw-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755110Ab0BSWr6 (ORCPT ); Fri, 19 Feb 2010 17:47:58 -0500 Received: by qw-out-2122.google.com with SMTP id 8so110905qwh.37 for ; Fri, 19 Feb 2010 14:47:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :organization:user-agent:mime-version:to:cc:subject:references :in-reply-to:content-type; bh=OuXd1Mhd6hDGP/UgzPUjMLjjCr4eOsc4LFfSIfoTYj8=; b=psHCAZm/vW0sDvz91NvfVsZDU9GqUxYcOH2t+U7EBk4uNmdXPWioNwVHiT3a3hERHY XTLEGvY8fCwSWaX3tsQW/Jibg/UB/kg6G/2dmmtDq/8ysDWzSO1oNSud7Y0ctvTqc1dS UyVt4FwzYE1WUMVlNtaWzTiwmITLHBoN46LcU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:organization:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type; b=RVH6tzB8ldPP2rUomJKDWsmeNt/hv4Q/XijIS3p6I7+jJwJC9sA6+7EhbKsqwzz2x9 6Gk8bb64HyVi7c1dVtARxLPro+Yl7oH6I8Xyu5KYQC5znZmWCOfVHfb1+Hrj/MLWzZfb Erg/dndUmPO5vOQJ50FvAi4kNnKl9qxIymBCQ= Received: by 10.224.88.129 with SMTP id a1mr1315586qam.257.1266619320530; Fri, 19 Feb 2010 14:42:00 -0800 (PST) Received: from ?10.251.21.148? ([192.55.60.21]) by mx.google.com with ESMTPS id 6sm1788611qwd.46.2010.02.19.14.41.57 (version=SSLv3 cipher=RC4-MD5); Fri, 19 Feb 2010 14:41:59 -0800 (PST) Message-ID: <4B7F13B2.50804@pelagicore.com> Date: Fri, 19 Feb 2010 15:41:54 -0700 From: =?ISO-8859-1?Q?Richard_R=F6jfors?= Organization: Pelagicore AB User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.7) Gecko/20100121 Iceowl/1.0b1 Icedove/3.0.1 MIME-Version: 1.0 To: Mauro Carvalho Chehab CC: Linux Media Mailing List , sameo@linux.intel.com Subject: Re: [PATCH] mfd: Add timb-radio to the timberdale MFD References: <4B7845F0.1070800@pelagicore.com> <4B7E7B75.3040205@redhat.com> In-Reply-To: <4B7E7B75.3040205@redhat.com> 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, 19 Feb 2010 22:47:59 +0000 (UTC) This patch addes timb-radio to all configurations of the timberdale MFD. Connected to the FPGA is a TEF6862 tuner and a SAA7706H DSP, the I2C board info of these devices is passed via the timb-radio platform data. Signed-off-by: Richard Röjfors --- diff --git a/drivers/mfd/timberdale.c b/drivers/mfd/timberdale.c index 603cf06..1ed44d2 100644 --- a/drivers/mfd/timberdale.c +++ b/drivers/mfd/timberdale.c @@ -37,6 +37,8 @@ #include #include +#include + #include "timberdale.h" #define DRIVER_NAME "timberdale" @@ -213,6 +215,40 @@ const static __devinitconst struct resource timberdale_uartlite_resources[] = { }, }; +const static __devinitconst struct resource timberdale_radio_resources[] = { + { + .start = RDSOFFSET, + .end = RDSEND, + .flags = IORESOURCE_MEM, + }, + { + .start = IRQ_TIMBERDALE_RDS, + .end = IRQ_TIMBERDALE_RDS, + .flags = IORESOURCE_IRQ, + }, +}; + +static __devinitdata struct i2c_board_info timberdale_tef6868_i2c_board_info = { + I2C_BOARD_INFO("tef6862", 0x60) +}; + +static __devinitdata struct i2c_board_info timberdale_saa7706_i2c_board_info = { + I2C_BOARD_INFO("saa7706h", 0x1C) +}; + +static __devinitdata struct timb_radio_platform_data + timberdale_radio_platform_data = { + .i2c_adapter = 0, + .tuner = { + .module_name = "tef6862", + .info = &timberdale_tef6868_i2c_board_info + }, + .dsp = { + .module_name = "saa7706h", + .info = &timberdale_saa7706_i2c_board_info + } +}; + const static __devinitconst struct resource timberdale_dma_resources[] = { { .start = DMAOFFSET, @@ -240,6 +276,13 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg0[] = { .data_size = sizeof(timberdale_gpio_platform_data), }, { + .name = "timb-radio", + .num_resources = ARRAY_SIZE(timberdale_radio_resources), + .resources = timberdale_radio_resources, + .platform_data = &timberdale_radio_platform_data, + .data_size = sizeof(timberdale_radio_platform_data), + }, + { .name = "xilinx_spi", .num_resources = ARRAY_SIZE(timberdale_spi_resources), .resources = timberdale_spi_resources, @@ -282,6 +325,13 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg1[] = { .resources = timberdale_mlogicore_resources, }, { + .name = "timb-radio", + .num_resources = ARRAY_SIZE(timberdale_radio_resources), + .resources = timberdale_radio_resources, + .platform_data = &timberdale_radio_platform_data, + .data_size = sizeof(timberdale_radio_platform_data), + }, + { .name = "xilinx_spi", .num_resources = ARRAY_SIZE(timberdale_spi_resources), .resources = timberdale_spi_resources, @@ -314,6 +364,13 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg2[] = { .data_size = sizeof(timberdale_gpio_platform_data), }, { + .name = "timb-radio", + .num_resources = ARRAY_SIZE(timberdale_radio_resources), + .resources = timberdale_radio_resources, + .platform_data = &timberdale_radio_platform_data, + .data_size = sizeof(timberdale_radio_platform_data), + }, + { .name = "xilinx_spi", .num_resources = ARRAY_SIZE(timberdale_spi_resources), .resources = timberdale_spi_resources, @@ -348,6 +405,13 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg3[] = { .data_size = sizeof(timberdale_gpio_platform_data), }, { + .name = "timb-radio", + .num_resources = ARRAY_SIZE(timberdale_radio_resources), + .resources = timberdale_radio_resources, + .platform_data = &timberdale_radio_platform_data, + .data_size = sizeof(timberdale_radio_platform_data), + }, + { .name = "xilinx_spi", .num_resources = ARRAY_SIZE(timberdale_spi_resources), .resources = timberdale_spi_resources,