aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorRichard Röjfors <richard.rojfors@pelagicore.com>2010-03-16 05:43:28 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2010-05-27 19:37:27 -0400
commitd84027bc4d176a0c06e8f62a9f7a002bdd444012 (patch)
treec6372e25b911abf83934993cf089af0b0d398da5 /drivers/mfd
parent9ad285d6db6e04c1c51c79152d2214fffefc92ab (diff)
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')
-rw-r--r--drivers/mfd/timberdale.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/drivers/mfd/timberdale.c b/drivers/mfd/timberdale.c
index 7f478ec4184b..1ac77d16dce9 100644
--- a/drivers/mfd/timberdale.c
+++ b/drivers/mfd/timberdale.c
@@ -31,6 +31,7 @@
31 31
32#include <linux/i2c.h> 32#include <linux/i2c.h>
33#include <linux/i2c-ocores.h> 33#include <linux/i2c-ocores.h>
34#include <linux/i2c-xiic.h>
34#include <linux/i2c/tsc2007.h> 35#include <linux/i2c/tsc2007.h>
35 36
36#include <linux/spi/spi.h> 37#include <linux/spi/spi.h>
@@ -69,6 +70,12 @@ static struct i2c_board_info timberdale_i2c_board_info[] = {
69 }, 70 },
70}; 71};
71 72
73static __devinitdata struct xiic_i2c_platform_data
74timberdale_xiic_platform_data = {
75 .devices = timberdale_i2c_board_info,
76 .num_devices = ARRAY_SIZE(timberdale_i2c_board_info)
77};
78
72static __devinitdata struct ocores_i2c_platform_data 79static __devinitdata struct ocores_i2c_platform_data
73timberdale_ocores_platform_data = { 80timberdale_ocores_platform_data = {
74 .regstep = 4, 81 .regstep = 4,
@@ -77,6 +84,19 @@ timberdale_ocores_platform_data = {
77 .num_devices = ARRAY_SIZE(timberdale_i2c_board_info) 84 .num_devices = ARRAY_SIZE(timberdale_i2c_board_info)
78}; 85};
79 86
87const static __devinitconst struct resource timberdale_xiic_resources[] = {
88 {
89 .start = XIICOFFSET,
90 .end = XIICEND,
91 .flags = IORESOURCE_MEM,
92 },
93 {
94 .start = IRQ_TIMBERDALE_I2C,
95 .end = IRQ_TIMBERDALE_I2C,
96 .flags = IORESOURCE_IRQ,
97 },
98};
99
80const static __devinitconst struct resource timberdale_ocores_resources[] = { 100const static __devinitconst struct resource timberdale_ocores_resources[] = {
81 { 101 {
82 .start = OCORESOFFSET, 102 .start = OCORESOFFSET,
@@ -270,6 +290,13 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg0[] = {
270 .resources = timberdale_uart_resources, 290 .resources = timberdale_uart_resources,
271 }, 291 },
272 { 292 {
293 .name = "xiic-i2c",
294 .num_resources = ARRAY_SIZE(timberdale_xiic_resources),
295 .resources = timberdale_xiic_resources,
296 .platform_data = &timberdale_xiic_platform_data,
297 .data_size = sizeof(timberdale_xiic_platform_data),
298 },
299 {
273 .name = "timb-gpio", 300 .name = "timb-gpio",
274 .num_resources = ARRAY_SIZE(timberdale_gpio_resources), 301 .num_resources = ARRAY_SIZE(timberdale_gpio_resources),
275 .resources = timberdale_gpio_resources, 302 .resources = timberdale_gpio_resources,
@@ -314,6 +341,13 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg1[] = {
314 .resources = timberdale_uartlite_resources, 341 .resources = timberdale_uartlite_resources,
315 }, 342 },
316 { 343 {
344 .name = "xiic-i2c",
345 .num_resources = ARRAY_SIZE(timberdale_xiic_resources),
346 .resources = timberdale_xiic_resources,
347 .platform_data = &timberdale_xiic_platform_data,
348 .data_size = sizeof(timberdale_xiic_platform_data),
349 },
350 {
317 .name = "timb-gpio", 351 .name = "timb-gpio",
318 .num_resources = ARRAY_SIZE(timberdale_gpio_resources), 352 .num_resources = ARRAY_SIZE(timberdale_gpio_resources),
319 .resources = timberdale_gpio_resources, 353 .resources = timberdale_gpio_resources,
@@ -358,6 +392,13 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg2[] = {
358 .resources = timberdale_uart_resources, 392 .resources = timberdale_uart_resources,
359 }, 393 },
360 { 394 {
395 .name = "xiic-i2c",
396 .num_resources = ARRAY_SIZE(timberdale_xiic_resources),
397 .resources = timberdale_xiic_resources,
398 .platform_data = &timberdale_xiic_platform_data,
399 .data_size = sizeof(timberdale_xiic_platform_data),
400 },
401 {
361 .name = "timb-gpio", 402 .name = "timb-gpio",
362 .num_resources = ARRAY_SIZE(timberdale_gpio_resources), 403 .num_resources = ARRAY_SIZE(timberdale_gpio_resources),
363 .resources = timberdale_gpio_resources, 404 .resources = timberdale_gpio_resources,