diff options
author | Richard Röjfors <richard.rojfors@pelagicore.com> | 2010-03-16 10:43:28 +0100 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2010-05-28 01:37:27 +0200 |
commit | d84027bc4d176a0c06e8f62a9f7a002bdd444012 (patch) | |
tree | c6372e25b911abf83934993cf089af0b0d398da5 /drivers/mfd/timberdale.c | |
parent | 9ad285d6db6e04c1c51c79152d2214fffefc92ab (diff) | |
download | kernel_samsung_smdk4412-d84027bc4d176a0c06e8f62a9f7a002bdd444012.zip kernel_samsung_smdk4412-d84027bc4d176a0c06e8f62a9f7a002bdd444012.tar.gz kernel_samsung_smdk4412-d84027bc4d176a0c06e8f62a9f7a002bdd444012.tar.bz2 |
mfd: Add in XIIC to some configurations of timberdale
This patch adds in the Xilinx I2C bus driver to some of the
configurations of the timberdale MFD.
It provides the I2C devices to the XIIC via platform data in a
similar way as done to the ocores driver.
Signed-off-by: Richard Röjfors <richard.rojfors@pelagicore.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/timberdale.c')
-rw-r--r-- | drivers/mfd/timberdale.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/drivers/mfd/timberdale.c b/drivers/mfd/timberdale.c index 7f478ec..1ac77d1 100644 --- a/drivers/mfd/timberdale.c +++ b/drivers/mfd/timberdale.c @@ -31,6 +31,7 @@ #include <linux/i2c.h> #include <linux/i2c-ocores.h> +#include <linux/i2c-xiic.h> #include <linux/i2c/tsc2007.h> #include <linux/spi/spi.h> @@ -69,6 +70,12 @@ static struct i2c_board_info timberdale_i2c_board_info[] = { }, }; +static __devinitdata struct xiic_i2c_platform_data +timberdale_xiic_platform_data = { + .devices = timberdale_i2c_board_info, + .num_devices = ARRAY_SIZE(timberdale_i2c_board_info) +}; + static __devinitdata struct ocores_i2c_platform_data timberdale_ocores_platform_data = { .regstep = 4, @@ -77,6 +84,19 @@ timberdale_ocores_platform_data = { .num_devices = ARRAY_SIZE(timberdale_i2c_board_info) }; +const static __devinitconst struct resource timberdale_xiic_resources[] = { + { + .start = XIICOFFSET, + .end = XIICEND, + .flags = IORESOURCE_MEM, + }, + { + .start = IRQ_TIMBERDALE_I2C, + .end = IRQ_TIMBERDALE_I2C, + .flags = IORESOURCE_IRQ, + }, +}; + const static __devinitconst struct resource timberdale_ocores_resources[] = { { .start = OCORESOFFSET, @@ -270,6 +290,13 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg0[] = { .resources = timberdale_uart_resources, }, { + .name = "xiic-i2c", + .num_resources = ARRAY_SIZE(timberdale_xiic_resources), + .resources = timberdale_xiic_resources, + .platform_data = &timberdale_xiic_platform_data, + .data_size = sizeof(timberdale_xiic_platform_data), + }, + { .name = "timb-gpio", .num_resources = ARRAY_SIZE(timberdale_gpio_resources), .resources = timberdale_gpio_resources, @@ -314,6 +341,13 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg1[] = { .resources = timberdale_uartlite_resources, }, { + .name = "xiic-i2c", + .num_resources = ARRAY_SIZE(timberdale_xiic_resources), + .resources = timberdale_xiic_resources, + .platform_data = &timberdale_xiic_platform_data, + .data_size = sizeof(timberdale_xiic_platform_data), + }, + { .name = "timb-gpio", .num_resources = ARRAY_SIZE(timberdale_gpio_resources), .resources = timberdale_gpio_resources, @@ -358,6 +392,13 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg2[] = { .resources = timberdale_uart_resources, }, { + .name = "xiic-i2c", + .num_resources = ARRAY_SIZE(timberdale_xiic_resources), + .resources = timberdale_xiic_resources, + .platform_data = &timberdale_xiic_platform_data, + .data_size = sizeof(timberdale_xiic_platform_data), + }, + { .name = "timb-gpio", .num_resources = ARRAY_SIZE(timberdale_gpio_resources), .resources = timberdale_gpio_resources, |