2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-15 00:34:10 +08:00

bf609: add gpio soft switch platform data for mcp23017 i2c devices

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
This commit is contained in:
Sonic Zhang 2014-08-20 17:04:55 +08:00 committed by Steven Miao
parent 374feb1f04
commit ea9b706b86

View File

@ -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[] = {