diff options
author | Sonic Zhang <sonic.zhang@analog.com> | 2014-08-20 05:04:55 -0400 |
---|---|---|
committer | Steven Miao <realmz6@gmail.com> | 2015-04-23 09:34:28 -0400 |
commit | ea9b706b8688ab155b092abc854bde0224332743 (patch) | |
tree | 6c76e6258f132f239a918ea89b5d0e79cd948b50 | |
parent | 374feb1f049b0a9eed62ac1b865c93b35aaef7c6 (diff) |
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.c | 27 |
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 = { | |||
1862 | }; | 1862 | }; |
1863 | #endif | 1863 | #endif |
1864 | 1864 | ||
1865 | #if IS_ENABLED(CONFIG_GPIO_MCP23S08) | ||
1866 | #include <linux/spi/mcp23s08.h> | ||
1867 | static const struct mcp23s08_platform_data bfin_mcp23s08_soft_switch0 = { | ||
1868 | .base = 120, | ||
1869 | }; | ||
1870 | static const struct mcp23s08_platform_data bfin_mcp23s08_soft_switch1 = { | ||
1871 | .base = 130, | ||
1872 | }; | ||
1873 | static const struct mcp23s08_platform_data bfin_mcp23s08_soft_switch2 = { | ||
1874 | .base = 140, | ||
1875 | }; | ||
1876 | #endif | ||
1877 | |||
1865 | static struct i2c_board_info __initdata bfin_i2c_board_info0[] = { | 1878 | static struct i2c_board_info __initdata bfin_i2c_board_info0[] = { |
1866 | #if IS_ENABLED(CONFIG_INPUT_ADXL34X_I2C) | 1879 | #if IS_ENABLED(CONFIG_INPUT_ADXL34X_I2C) |
1867 | { | 1880 | { |
@@ -1881,6 +1894,20 @@ static struct i2c_board_info __initdata bfin_i2c_board_info0[] = { | |||
1881 | I2C_BOARD_INFO("ssm2602", 0x1b), | 1894 | I2C_BOARD_INFO("ssm2602", 0x1b), |
1882 | }, | 1895 | }, |
1883 | #endif | 1896 | #endif |
1897 | #if IS_ENABLED(CONFIG_GPIO_MCP23S08) | ||
1898 | { | ||
1899 | I2C_BOARD_INFO("mcp23017", 0x21), | ||
1900 | .platform_data = (void *)&bfin_mcp23s08_soft_switch0 | ||
1901 | }, | ||
1902 | { | ||
1903 | I2C_BOARD_INFO("mcp23017", 0x22), | ||
1904 | .platform_data = (void *)&bfin_mcp23s08_soft_switch1 | ||
1905 | }, | ||
1906 | { | ||
1907 | I2C_BOARD_INFO("mcp23017", 0x23), | ||
1908 | .platform_data = (void *)&bfin_mcp23s08_soft_switch2 | ||
1909 | }, | ||
1910 | #endif | ||
1884 | }; | 1911 | }; |
1885 | 1912 | ||
1886 | static struct i2c_board_info __initdata bfin_i2c_board_info1[] = { | 1913 | static struct i2c_board_info __initdata bfin_i2c_board_info1[] = { |