Commit d84027bc authored by Richard Röjfors's avatar Richard Röjfors Committed by Samuel Ortiz

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: default avatarRichard Röjfors <richard.rojfors@pelagicore.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 9ad285d6
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/i2c-ocores.h> #include <linux/i2c-ocores.h>
#include <linux/i2c-xiic.h>
#include <linux/i2c/tsc2007.h> #include <linux/i2c/tsc2007.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
...@@ -69,6 +70,12 @@ static struct i2c_board_info timberdale_i2c_board_info[] = { ...@@ -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 static __devinitdata struct ocores_i2c_platform_data
timberdale_ocores_platform_data = { timberdale_ocores_platform_data = {
.regstep = 4, .regstep = 4,
...@@ -77,6 +84,19 @@ timberdale_ocores_platform_data = { ...@@ -77,6 +84,19 @@ timberdale_ocores_platform_data = {
.num_devices = ARRAY_SIZE(timberdale_i2c_board_info) .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[] = { const static __devinitconst struct resource timberdale_ocores_resources[] = {
{ {
.start = OCORESOFFSET, .start = OCORESOFFSET,
...@@ -269,6 +289,13 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg0[] = { ...@@ -269,6 +289,13 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg0[] = {
.num_resources = ARRAY_SIZE(timberdale_uart_resources), .num_resources = ARRAY_SIZE(timberdale_uart_resources),
.resources = timberdale_uart_resources, .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", .name = "timb-gpio",
.num_resources = ARRAY_SIZE(timberdale_gpio_resources), .num_resources = ARRAY_SIZE(timberdale_gpio_resources),
...@@ -313,6 +340,13 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg1[] = { ...@@ -313,6 +340,13 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg1[] = {
.num_resources = ARRAY_SIZE(timberdale_uartlite_resources), .num_resources = ARRAY_SIZE(timberdale_uartlite_resources),
.resources = timberdale_uartlite_resources, .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", .name = "timb-gpio",
.num_resources = ARRAY_SIZE(timberdale_gpio_resources), .num_resources = ARRAY_SIZE(timberdale_gpio_resources),
...@@ -357,6 +391,13 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg2[] = { ...@@ -357,6 +391,13 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg2[] = {
.num_resources = ARRAY_SIZE(timberdale_uart_resources), .num_resources = ARRAY_SIZE(timberdale_uart_resources),
.resources = timberdale_uart_resources, .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", .name = "timb-gpio",
.num_resources = ARRAY_SIZE(timberdale_gpio_resources), .num_resources = ARRAY_SIZE(timberdale_gpio_resources),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment