From 071193ff4182c8f785e770c54e35f3ea2bb98b84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Richard=20R=C3=B6jfors?= Date: Fri, 19 Feb 2010 19:41:54 -0300 Subject: V4L/DVB: mfd: Add timb-radio to the timberdale MFD MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Cc: sameo@linux.intel.com Signed-off-by: Mauro Carvalho Chehab --- drivers/mfd/timberdale.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) (limited to 'drivers') diff --git a/drivers/mfd/timberdale.c b/drivers/mfd/timberdale.c index 603cf069ad24..1ed44d283803 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, @@ -239,6 +275,13 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg0[] = { .platform_data = &timberdale_gpio_platform_data, .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), @@ -281,6 +324,13 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg1[] = { .num_resources = ARRAY_SIZE(timberdale_mlogicore_resources), .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), @@ -313,6 +363,13 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg2[] = { .platform_data = &timberdale_gpio_platform_data, .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), @@ -347,6 +404,13 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg3[] = { .platform_data = &timberdale_gpio_platform_data, .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), -- cgit v1.2.1