Commit cf93feb3 authored by Sonic Zhang's avatar Sonic Zhang Committed by Bob Liu

blackfin: twi: Move TWI peripheral pin request array to platform data

Signed-off-by: default avatarSonic Zhang <sonic.zhang@analog.com>
Signed-off-by: default avatarBob Liu <lliubbo@gmail.com>
parent 913f2f2d
...@@ -529,6 +529,8 @@ static struct platform_device bfin_i2s = { ...@@ -529,6 +529,8 @@ static struct platform_device bfin_i2s = {
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
static struct resource bfin_twi0_resource[] = { static struct resource bfin_twi0_resource[] = {
[0] = { [0] = {
.start = TWI0_REGBASE, .start = TWI0_REGBASE,
...@@ -547,6 +549,9 @@ static struct platform_device i2c_bfin_twi_device = { ...@@ -547,6 +549,9 @@ static struct platform_device i2c_bfin_twi_device = {
.id = 0, .id = 0,
.num_resources = ARRAY_SIZE(bfin_twi0_resource), .num_resources = ARRAY_SIZE(bfin_twi0_resource),
.resource = bfin_twi0_resource, .resource = bfin_twi0_resource,
.dev = {
.platform_data = &bfin_twi0_pins,
},
}; };
#endif #endif
......
...@@ -455,6 +455,8 @@ static struct platform_device bfin_sir1_device = { ...@@ -455,6 +455,8 @@ static struct platform_device bfin_sir1_device = {
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
static struct resource bfin_twi0_resource[] = { static struct resource bfin_twi0_resource[] = {
[0] = { [0] = {
.start = TWI0_REGBASE, .start = TWI0_REGBASE,
...@@ -473,6 +475,9 @@ static struct platform_device i2c_bfin_twi_device = { ...@@ -473,6 +475,9 @@ static struct platform_device i2c_bfin_twi_device = {
.id = 0, .id = 0,
.num_resources = ARRAY_SIZE(bfin_twi0_resource), .num_resources = ARRAY_SIZE(bfin_twi0_resource),
.resource = bfin_twi0_resource, .resource = bfin_twi0_resource,
.dev = {
.platform_data = &bfin_twi0_pins,
},
}; };
#endif #endif
......
...@@ -569,6 +569,8 @@ static const struct ad7160_platform_data bfin_ad7160_ts_info = { ...@@ -569,6 +569,8 @@ static const struct ad7160_platform_data bfin_ad7160_ts_info = {
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
static struct resource bfin_twi0_resource[] = { static struct resource bfin_twi0_resource[] = {
[0] = { [0] = {
.start = TWI0_REGBASE, .start = TWI0_REGBASE,
...@@ -587,6 +589,9 @@ static struct platform_device i2c_bfin_twi_device = { ...@@ -587,6 +589,9 @@ static struct platform_device i2c_bfin_twi_device = {
.id = 0, .id = 0,
.num_resources = ARRAY_SIZE(bfin_twi0_resource), .num_resources = ARRAY_SIZE(bfin_twi0_resource),
.resource = bfin_twi0_resource, .resource = bfin_twi0_resource,
.dev = {
.platform_data = &bfin_twi0_pins,
},
}; };
#endif #endif
......
...@@ -698,6 +698,8 @@ static struct platform_device bfin_sir1_device = { ...@@ -698,6 +698,8 @@ static struct platform_device bfin_sir1_device = {
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
static struct resource bfin_twi0_resource[] = { static struct resource bfin_twi0_resource[] = {
[0] = { [0] = {
.start = TWI0_REGBASE, .start = TWI0_REGBASE,
...@@ -716,6 +718,9 @@ static struct platform_device i2c_bfin_twi_device = { ...@@ -716,6 +718,9 @@ static struct platform_device i2c_bfin_twi_device = {
.id = 0, .id = 0,
.num_resources = ARRAY_SIZE(bfin_twi0_resource), .num_resources = ARRAY_SIZE(bfin_twi0_resource),
.resource = bfin_twi0_resource, .resource = bfin_twi0_resource,
.dev = {
.platform_data = &bfin_twi0_pins,
},
}; };
#endif #endif
......
...@@ -576,6 +576,8 @@ static struct platform_device bfin_sir1_device = { ...@@ -576,6 +576,8 @@ static struct platform_device bfin_sir1_device = {
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
static struct resource bfin_twi0_resource[] = { static struct resource bfin_twi0_resource[] = {
[0] = { [0] = {
.start = TWI0_REGBASE, .start = TWI0_REGBASE,
...@@ -594,6 +596,9 @@ static struct platform_device i2c_bfin_twi_device = { ...@@ -594,6 +596,9 @@ static struct platform_device i2c_bfin_twi_device = {
.id = 0, .id = 0,
.num_resources = ARRAY_SIZE(bfin_twi0_resource), .num_resources = ARRAY_SIZE(bfin_twi0_resource),
.resource = bfin_twi0_resource, .resource = bfin_twi0_resource,
.dev = {
.platform_data = &bfin_twi0_pins,
},
}; };
#endif #endif
......
...@@ -869,6 +869,8 @@ static struct platform_device bfin_sir1_device = { ...@@ -869,6 +869,8 @@ static struct platform_device bfin_sir1_device = {
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
static struct resource bfin_twi0_resource[] = { static struct resource bfin_twi0_resource[] = {
[0] = { [0] = {
.start = TWI0_REGBASE, .start = TWI0_REGBASE,
...@@ -887,6 +889,9 @@ static struct platform_device i2c_bfin_twi_device = { ...@@ -887,6 +889,9 @@ static struct platform_device i2c_bfin_twi_device = {
.id = 0, .id = 0,
.num_resources = ARRAY_SIZE(bfin_twi0_resource), .num_resources = ARRAY_SIZE(bfin_twi0_resource),
.resource = bfin_twi0_resource, .resource = bfin_twi0_resource,
.dev = {
.platform_data = &bfin_twi0_pins,
},
}; };
#endif #endif
......
...@@ -656,6 +656,8 @@ static struct platform_device bfin_sir1_device = { ...@@ -656,6 +656,8 @@ static struct platform_device bfin_sir1_device = {
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
static struct resource bfin_twi0_resource[] = { static struct resource bfin_twi0_resource[] = {
[0] = { [0] = {
.start = TWI0_REGBASE, .start = TWI0_REGBASE,
...@@ -674,6 +676,9 @@ static struct platform_device i2c_bfin_twi_device = { ...@@ -674,6 +676,9 @@ static struct platform_device i2c_bfin_twi_device = {
.id = 0, .id = 0,
.num_resources = ARRAY_SIZE(bfin_twi0_resource), .num_resources = ARRAY_SIZE(bfin_twi0_resource),
.resource = bfin_twi0_resource, .resource = bfin_twi0_resource,
.dev = {
.platform_data = &bfin_twi0_pins,
},
}; };
#endif #endif
......
...@@ -486,6 +486,8 @@ static struct platform_device bfin_sir1_device = { ...@@ -486,6 +486,8 @@ static struct platform_device bfin_sir1_device = {
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
static struct resource bfin_twi0_resource[] = { static struct resource bfin_twi0_resource[] = {
[0] = { [0] = {
.start = TWI0_REGBASE, .start = TWI0_REGBASE,
...@@ -504,6 +506,9 @@ static struct platform_device i2c_bfin_twi_device = { ...@@ -504,6 +506,9 @@ static struct platform_device i2c_bfin_twi_device = {
.id = 0, .id = 0,
.num_resources = ARRAY_SIZE(bfin_twi0_resource), .num_resources = ARRAY_SIZE(bfin_twi0_resource),
.resource = bfin_twi0_resource, .resource = bfin_twi0_resource,
.dev = {
.platform_data = &bfin_twi0_pins,
},
}; };
#endif #endif
......
...@@ -451,6 +451,8 @@ static struct platform_device bfin_sir1_device = { ...@@ -451,6 +451,8 @@ static struct platform_device bfin_sir1_device = {
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
static struct resource bfin_twi0_resource[] = { static struct resource bfin_twi0_resource[] = {
[0] = { [0] = {
.start = TWI0_REGBASE, .start = TWI0_REGBASE,
...@@ -469,6 +471,9 @@ static struct platform_device i2c_bfin_twi_device = { ...@@ -469,6 +471,9 @@ static struct platform_device i2c_bfin_twi_device = {
.id = 0, .id = 0,
.num_resources = ARRAY_SIZE(bfin_twi0_resource), .num_resources = ARRAY_SIZE(bfin_twi0_resource),
.resource = bfin_twi0_resource, .resource = bfin_twi0_resource,
.dev = {
.platform_data = &bfin_twi0_pins,
},
}; };
#endif #endif
......
...@@ -329,6 +329,8 @@ static struct platform_device bfin_uart1_device = { ...@@ -329,6 +329,8 @@ static struct platform_device bfin_uart1_device = {
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
static struct resource bfin_twi0_resource[] = { static struct resource bfin_twi0_resource[] = {
[0] = { [0] = {
.start = TWI0_REGBASE, .start = TWI0_REGBASE,
...@@ -347,6 +349,9 @@ static struct platform_device i2c_bfin_twi_device = { ...@@ -347,6 +349,9 @@ static struct platform_device i2c_bfin_twi_device = {
.id = 0, .id = 0,
.num_resources = ARRAY_SIZE(bfin_twi0_resource), .num_resources = ARRAY_SIZE(bfin_twi0_resource),
.resource = bfin_twi0_resource, .resource = bfin_twi0_resource,
.dev = {
.platform_data = &bfin_twi0_pins,
},
}; };
#endif #endif
......
...@@ -386,6 +386,8 @@ static struct platform_device bfin_sir1_device = { ...@@ -386,6 +386,8 @@ static struct platform_device bfin_sir1_device = {
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
static struct resource bfin_twi0_resource[] = { static struct resource bfin_twi0_resource[] = {
[0] = { [0] = {
.start = TWI0_REGBASE, .start = TWI0_REGBASE,
...@@ -404,6 +406,9 @@ static struct platform_device i2c_bfin_twi_device = { ...@@ -404,6 +406,9 @@ static struct platform_device i2c_bfin_twi_device = {
.id = 0, .id = 0,
.num_resources = ARRAY_SIZE(bfin_twi0_resource), .num_resources = ARRAY_SIZE(bfin_twi0_resource),
.resource = bfin_twi0_resource, .resource = bfin_twi0_resource,
.dev = {
.platform_data = &bfin_twi0_pins,
},
}; };
#endif #endif
......
...@@ -1790,6 +1790,8 @@ static struct platform_device bfin_sir1_device = { ...@@ -1790,6 +1790,8 @@ static struct platform_device bfin_sir1_device = {
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
static struct resource bfin_twi0_resource[] = { static struct resource bfin_twi0_resource[] = {
[0] = { [0] = {
.start = TWI0_REGBASE, .start = TWI0_REGBASE,
...@@ -1808,6 +1810,9 @@ static struct platform_device i2c_bfin_twi_device = { ...@@ -1808,6 +1810,9 @@ static struct platform_device i2c_bfin_twi_device = {
.id = 0, .id = 0,
.num_resources = ARRAY_SIZE(bfin_twi0_resource), .num_resources = ARRAY_SIZE(bfin_twi0_resource),
.resource = bfin_twi0_resource, .resource = bfin_twi0_resource,
.dev = {
.platform_data = &bfin_twi0_pins,
},
}; };
#endif #endif
......
...@@ -453,6 +453,8 @@ static struct platform_device bfin_sir1_device = { ...@@ -453,6 +453,8 @@ static struct platform_device bfin_sir1_device = {
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
static struct resource bfin_twi0_resource[] = { static struct resource bfin_twi0_resource[] = {
[0] = { [0] = {
.start = TWI0_REGBASE, .start = TWI0_REGBASE,
...@@ -471,6 +473,9 @@ static struct platform_device i2c_bfin_twi_device = { ...@@ -471,6 +473,9 @@ static struct platform_device i2c_bfin_twi_device = {
.id = 0, .id = 0,
.num_resources = ARRAY_SIZE(bfin_twi0_resource), .num_resources = ARRAY_SIZE(bfin_twi0_resource),
.resource = bfin_twi0_resource, .resource = bfin_twi0_resource,
.dev = {
.platform_data = &bfin_twi0_pins,
},
}; };
#endif #endif
......
...@@ -718,6 +718,8 @@ static struct platform_device bf538_spi_master2 = { ...@@ -718,6 +718,8 @@ static struct platform_device bf538_spi_master2 = {
}; };
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
static struct resource bfin_twi0_resource[] = { static struct resource bfin_twi0_resource[] = {
[0] = { [0] = {
.start = TWI0_REGBASE, .start = TWI0_REGBASE,
...@@ -736,9 +738,13 @@ static struct platform_device i2c_bfin_twi0_device = { ...@@ -736,9 +738,13 @@ static struct platform_device i2c_bfin_twi0_device = {
.id = 0, .id = 0,
.num_resources = ARRAY_SIZE(bfin_twi0_resource), .num_resources = ARRAY_SIZE(bfin_twi0_resource),
.resource = bfin_twi0_resource, .resource = bfin_twi0_resource,
.dev = {
.platform_data = &bfin_twi0_pins,
},
}; };
#if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */ static const u16 bfin_twi1_pins[] = {P_TWI1_SCL, P_TWI1_SDA, 0};
static struct resource bfin_twi1_resource[] = { static struct resource bfin_twi1_resource[] = {
[0] = { [0] = {
.start = TWI1_REGBASE, .start = TWI1_REGBASE,
......
...@@ -1007,6 +1007,8 @@ static struct platform_device bf54x_spi_master1 = { ...@@ -1007,6 +1007,8 @@ static struct platform_device bf54x_spi_master1 = {
#endif /* spi master and devices */ #endif /* spi master and devices */
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
static struct resource bfin_twi0_resource[] = { static struct resource bfin_twi0_resource[] = {
[0] = { [0] = {
.start = TWI0_REGBASE, .start = TWI0_REGBASE,
...@@ -1025,9 +1027,14 @@ static struct platform_device i2c_bfin_twi0_device = { ...@@ -1025,9 +1027,14 @@ static struct platform_device i2c_bfin_twi0_device = {
.id = 0, .id = 0,
.num_resources = ARRAY_SIZE(bfin_twi0_resource), .num_resources = ARRAY_SIZE(bfin_twi0_resource),
.resource = bfin_twi0_resource, .resource = bfin_twi0_resource,
.dev = {
.platform_data = &bfin_twi0_pins,
},
}; };
#if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */ #if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */
static const u16 bfin_twi1_pins[] = {P_TWI1_SCL, P_TWI1_SDA, 0};
static struct resource bfin_twi1_resource[] = { static struct resource bfin_twi1_resource[] = {
[0] = { [0] = {
.start = TWI1_REGBASE, .start = TWI1_REGBASE,
...@@ -1046,6 +1053,9 @@ static struct platform_device i2c_bfin_twi1_device = { ...@@ -1046,6 +1053,9 @@ static struct platform_device i2c_bfin_twi1_device = {
.id = 1, .id = 1,
.num_resources = ARRAY_SIZE(bfin_twi1_resource), .num_resources = ARRAY_SIZE(bfin_twi1_resource),
.resource = bfin_twi1_resource, .resource = bfin_twi1_resource,
.dev = {
.platform_data = &bfin_twi1_pins,
},
}; };
#endif #endif
#endif #endif
......
...@@ -1252,6 +1252,8 @@ static struct platform_device bfin_capture_device = { ...@@ -1252,6 +1252,8 @@ static struct platform_device bfin_capture_device = {
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
static struct resource bfin_twi0_resource[] = { static struct resource bfin_twi0_resource[] = {
[0] = { [0] = {
.start = TWI0_REGBASE, .start = TWI0_REGBASE,
...@@ -1270,9 +1272,14 @@ static struct platform_device i2c_bfin_twi0_device = { ...@@ -1270,9 +1272,14 @@ static struct platform_device i2c_bfin_twi0_device = {
.id = 0, .id = 0,
.num_resources = ARRAY_SIZE(bfin_twi0_resource), .num_resources = ARRAY_SIZE(bfin_twi0_resource),
.resource = bfin_twi0_resource, .resource = bfin_twi0_resource,
.dev = {
.platform_data = &bfin_twi0_pins,
},
}; };
#if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */ #if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */
static const u16 bfin_twi1_pins[] = {P_TWI1_SCL, P_TWI1_SDA, 0};
static struct resource bfin_twi1_resource[] = { static struct resource bfin_twi1_resource[] = {
[0] = { [0] = {
.start = TWI1_REGBASE, .start = TWI1_REGBASE,
...@@ -1291,6 +1298,9 @@ static struct platform_device i2c_bfin_twi1_device = { ...@@ -1291,6 +1298,9 @@ static struct platform_device i2c_bfin_twi1_device = {
.id = 1, .id = 1,
.num_resources = ARRAY_SIZE(bfin_twi1_resource), .num_resources = ARRAY_SIZE(bfin_twi1_resource),
.resource = bfin_twi1_resource, .resource = bfin_twi1_resource,
.dev = {
.platform_data = &bfin_twi1_pins,
},
}; };
#endif #endif
#endif #endif
......
...@@ -1081,6 +1081,8 @@ static struct platform_device bf60x_spi_master1 = { ...@@ -1081,6 +1081,8 @@ static struct platform_device bf60x_spi_master1 = {
#endif /* spi master and devices */ #endif /* spi master and devices */
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
static struct resource bfin_twi0_resource[] = { static struct resource bfin_twi0_resource[] = {
[0] = { [0] = {
.start = TWI0_CLKDIV, .start = TWI0_CLKDIV,
...@@ -1099,8 +1101,13 @@ static struct platform_device i2c_bfin_twi0_device = { ...@@ -1099,8 +1101,13 @@ static struct platform_device i2c_bfin_twi0_device = {
.id = 0, .id = 0,
.num_resources = ARRAY_SIZE(bfin_twi0_resource), .num_resources = ARRAY_SIZE(bfin_twi0_resource),
.resource = bfin_twi0_resource, .resource = bfin_twi0_resource,
.dev = {
.platform_data = &bfin_twi0_pins,
},
}; };
static const u16 bfin_twi1_pins[] = {P_TWI1_SCL, P_TWI1_SDA, 0};
static struct resource bfin_twi1_resource[] = { static struct resource bfin_twi1_resource[] = {
[0] = { [0] = {
.start = TWI1_CLKDIV, .start = TWI1_CLKDIV,
...@@ -1119,6 +1126,9 @@ static struct platform_device i2c_bfin_twi1_device = { ...@@ -1119,6 +1126,9 @@ static struct platform_device i2c_bfin_twi1_device = {
.id = 1, .id = 1,
.num_resources = ARRAY_SIZE(bfin_twi1_resource), .num_resources = ARRAY_SIZE(bfin_twi1_resource),
.resource = bfin_twi1_resource, .resource = bfin_twi1_resource,
.dev = {
.platform_data = &bfin_twi1_pins,
},
}; };
#endif #endif
......
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