aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c64xx/mach-crag6410-module.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-10-17 04:41:08 -0400
committerKukjin Kim <kgene.kim@samsung.com>2012-10-17 04:41:08 -0400
commit64aecb4a14f084f4c74cc1a0e0a3d223232e630a (patch)
treebd2774ce6e80150736ac78a968295ddf0d40f70f /arch/arm/mach-s3c64xx/mach-crag6410-module.c
parentc8968ad80e0b25031d7c481d271a2d70bf6c894c (diff)
ARM: S3C64XX: Handle revision-specific differences in Cragganmore modules
Allow us to supply different configurations depending on the board revision, catering for changes that are visible to software. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-s3c64xx/mach-crag6410-module.c')
-rw-r--r--arch/arm/mach-s3c64xx/mach-crag6410-module.c52
1 files changed, 27 insertions, 25 deletions
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410-module.c b/arch/arm/mach-s3c64xx/mach-crag6410-module.c
index 32b82c0b9487..15e0c13dad5a 100644
--- a/arch/arm/mach-s3c64xx/mach-crag6410-module.c
+++ b/arch/arm/mach-s3c64xx/mach-crag6410-module.c
@@ -239,45 +239,46 @@ static const struct i2c_board_info wm6230_i2c_devs[] = {
239 239
240static __devinitdata const struct { 240static __devinitdata const struct {
241 u8 id; 241 u8 id;
242 u8 rev;
242 const char *name; 243 const char *name;
243 const struct i2c_board_info *i2c_devs; 244 const struct i2c_board_info *i2c_devs;
244 int num_i2c_devs; 245 int num_i2c_devs;
245 const struct spi_board_info *spi_devs; 246 const struct spi_board_info *spi_devs;
246 int num_spi_devs; 247 int num_spi_devs;
247} gf_mods[] = { 248} gf_mods[] = {
248 { .id = 0x01, .name = "1250-EV1 Springbank" }, 249 { .id = 0x01, .rev = 0xff, .name = "1250-EV1 Springbank" },
249 { .id = 0x02, .name = "1251-EV1 Jura" }, 250 { .id = 0x02, .rev = 0xff, .name = "1251-EV1 Jura" },
250 { .id = 0x03, .name = "1252-EV1 Glenlivet" }, 251 { .id = 0x03, .rev = 0xff, .name = "1252-EV1 Glenlivet" },
251 { .id = 0x06, .name = "WM8997-6721-CS96-EV1 Lapraoig" }, 252 { .id = 0x06, .rev = 0xff, .name = "WM8997-6721-CS96-EV1 Lapraoig" },
252 { .id = 0x07, .name = "WM5110-6271 Deanston" }, 253 { .id = 0x07, .rev = 0xff, .name = "WM5110-6271 Deanston" },
253 { .id = 0x08, .name = "WM8903-6102 Tamdhu" }, 254 { .id = 0x08, .rev = 0xff, .name = "WM8903-6102 Tamdhu" },
254 { .id = 0x09, .name = "WM1811A-6305 Adelphi" }, 255 { .id = 0x09, .rev = 0xff, .name = "WM1811A-6305 Adelphi" },
255 { .id = 0x0a, .name = "WM8996-6272 Blackadder" }, 256 { .id = 0x0a, .rev = 0xff, .name = "WM8996-6272 Blackadder" },
256 { .id = 0x0b, .name = "WM8994-6235 Benromach" }, 257 { .id = 0x0b, .rev = 0xff, .name = "WM8994-6235 Benromach" },
257 { .id = 0x11, .name = "6249-EV2 Glenfarclas", }, 258 { .id = 0x11, .rev = 0xff, .name = "6249-EV2 Glenfarclas", },
258 { .id = 0x14, .name = "6271-EV1 Lochnagar" }, 259 { .id = 0x14, .rev = 0xff, .name = "6271-EV1 Lochnagar" },
259 { .id = 0x15, .name = "6320-EV1 Bells", 260 { .id = 0x15, .rev = 0xff, .name = "6320-EV1 Bells",
260 .i2c_devs = wm6230_i2c_devs, 261 .i2c_devs = wm6230_i2c_devs,
261 .num_i2c_devs = ARRAY_SIZE(wm6230_i2c_devs) }, 262 .num_i2c_devs = ARRAY_SIZE(wm6230_i2c_devs) },
262 { .id = 0x21, .name = "1275-EV1 Mortlach" }, 263 { .id = 0x21, .rev = 0xff, .name = "1275-EV1 Mortlach" },
263 { .id = 0x25, .name = "1274-EV1 Glencadam" }, 264 { .id = 0x25, .rev = 0xff, .name = "1274-EV1 Glencadam" },
264 { .id = 0x31, .name = "1253-EV1 Tomatin", 265 { .id = 0x31, .rev = 0xff, .name = "1253-EV1 Tomatin",
265 .spi_devs = wm1253_devs, .num_spi_devs = ARRAY_SIZE(wm1253_devs) }, 266 .spi_devs = wm1253_devs, .num_spi_devs = ARRAY_SIZE(wm1253_devs) },
266 { .id = 0x32, .name = "XXXX-EV1 Caol Illa" }, 267 { .id = 0x32, .rev = 0xff, .name = "XXXX-EV1 Caol Illa" },
267 { .id = 0x33, .name = "XXXX-EV1 Oban" }, 268 { .id = 0x33, .rev = 0xff, .name = "XXXX-EV1 Oban" },
268 { .id = 0x34, .name = "WM0010-6320-CS42 Balblair", 269 { .id = 0x34, .rev = 0xff, .name = "WM0010-6320-CS42 Balblair",
269 .spi_devs = balblair_devs, 270 .spi_devs = balblair_devs,
270 .num_spi_devs = ARRAY_SIZE(balblair_devs) }, 271 .num_spi_devs = ARRAY_SIZE(balblair_devs) },
271 { .id = 0x39, .name = "1254-EV1 Dallas Dhu", 272 { .id = 0x39, .rev = 0xff, .name = "1254-EV1 Dallas Dhu",
272 .i2c_devs = wm1254_devs, .num_i2c_devs = ARRAY_SIZE(wm1254_devs) }, 273 .i2c_devs = wm1254_devs, .num_i2c_devs = ARRAY_SIZE(wm1254_devs) },
273 { .id = 0x3a, .name = "1259-EV1 Tobermory", 274 { .id = 0x3a, .rev = 0xff, .name = "1259-EV1 Tobermory",
274 .i2c_devs = wm1259_devs, .num_i2c_devs = ARRAY_SIZE(wm1259_devs) }, 275 .i2c_devs = wm1259_devs, .num_i2c_devs = ARRAY_SIZE(wm1259_devs) },
275 { .id = 0x3b, .name = "1255-EV1 Kilchoman", 276 { .id = 0x3b, .rev = 0xff, .name = "1255-EV1 Kilchoman",
276 .i2c_devs = wm1255_devs, .num_i2c_devs = ARRAY_SIZE(wm1255_devs) }, 277 .i2c_devs = wm1255_devs, .num_i2c_devs = ARRAY_SIZE(wm1255_devs) },
277 { .id = 0x3c, .name = "1273-EV1 Longmorn" }, 278 { .id = 0x3c, .rev = 0xff, .name = "1273-EV1 Longmorn" },
278 { .id = 0x3d, .name = "1277-EV1 Littlemill", 279 { .id = 0x3d, .rev = 0xff, .name = "1277-EV1 Littlemill",
279 .i2c_devs = wm1277_devs, .num_i2c_devs = ARRAY_SIZE(wm1277_devs) }, 280 .i2c_devs = wm1277_devs, .num_i2c_devs = ARRAY_SIZE(wm1277_devs) },
280 { .id = 0x3e, .name = "WM5102-6271-EV1-CS127 Amrut", 281 { .id = 0x3e, .rev = -1, .name = "WM5102-6271-EV1-CS127 Amrut",
281 .spi_devs = wm5102_spi_devs, 282 .spi_devs = wm5102_spi_devs,
282 .num_spi_devs = ARRAY_SIZE(wm5102_spi_devs) }, 283 .num_spi_devs = ARRAY_SIZE(wm5102_spi_devs) },
283}; 284};
@@ -296,7 +297,8 @@ static __devinit int wlf_gf_module_probe(struct i2c_client *i2c,
296 id = (ret & 0xfe) >> 2; 297 id = (ret & 0xfe) >> 2;
297 rev = ret & 0x3; 298 rev = ret & 0x3;
298 for (i = 0; i < ARRAY_SIZE(gf_mods); i++) 299 for (i = 0; i < ARRAY_SIZE(gf_mods); i++)
299 if (id == gf_mods[i].id) 300 if (id == gf_mods[i].id && (gf_mods[i].rev == 0xff ||
301 rev == gf_mods[i].rev))
300 break; 302 break;
301 303
302 if (i < ARRAY_SIZE(gf_mods)) { 304 if (i < ARRAY_SIZE(gf_mods)) {