summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSonic Zhang <sonic.zhang@analog.com>2014-08-20 17:04:55 +0800
committerSteven Miao <realmz6@gmail.com>2015-04-23 21:34:28 +0800
commitea9b706b8688ab155b092abc854bde0224332743 (patch)
tree6c76e6258f132f239a918ea89b5d0e79cd948b50
parent374feb1f049b0a9eed62ac1b865c93b35aaef7c6 (diff)
downloadlinux-ea9b706b8688ab155b092abc854bde0224332743.tar.bz2
bf609: add gpio soft switch platform data for mcp23017 i2c devices
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
-rw-r--r--arch/blackfin/mach-bf609/boards/ezkit.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf609/boards/ezkit.c b/arch/blackfin/mach-bf609/boards/ezkit.c
index 68cd89544a6a..cc03ae2e559c 100644
--- a/arch/blackfin/mach-bf609/boards/ezkit.c
+++ b/arch/blackfin/mach-bf609/boards/ezkit.c
@@ -1862,6 +1862,19 @@ static struct platform_device i2c_bfin_twi1_device = {
};
#endif
+#if IS_ENABLED(CONFIG_GPIO_MCP23S08)
+#include <linux/spi/mcp23s08.h>
+static const struct mcp23s08_platform_data bfin_mcp23s08_soft_switch0 = {
+ .base = 120,
+};
+static const struct mcp23s08_platform_data bfin_mcp23s08_soft_switch1 = {
+ .base = 130,
+};
+static const struct mcp23s08_platform_data bfin_mcp23s08_soft_switch2 = {
+ .base = 140,
+};
+#endif
+
static struct i2c_board_info __initdata bfin_i2c_board_info0[] = {
#if IS_ENABLED(CONFIG_INPUT_ADXL34X_I2C)
{
@@ -1881,6 +1894,20 @@ static struct i2c_board_info __initdata bfin_i2c_board_info0[] = {
I2C_BOARD_INFO("ssm2602", 0x1b),
},
#endif
+#if IS_ENABLED(CONFIG_GPIO_MCP23S08)
+ {
+ I2C_BOARD_INFO("mcp23017", 0x21),
+ .platform_data = (void *)&bfin_mcp23s08_soft_switch0
+ },
+ {
+ I2C_BOARD_INFO("mcp23017", 0x22),
+ .platform_data = (void *)&bfin_mcp23s08_soft_switch1
+ },
+ {
+ I2C_BOARD_INFO("mcp23017", 0x23),
+ .platform_data = (void *)&bfin_mcp23s08_soft_switch2
+ },
+#endif
};
static struct i2c_board_info __initdata bfin_i2c_board_info1[] = {