diff options
author | Mark Brown <broonie@linaro.org> | 2013-06-17 17:20:14 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-06-17 17:20:14 +0100 |
commit | 9912b30f95e22d5722abc225c1c3784a51643aef (patch) | |
tree | f73c69fd2406c63743716b2f8ff4937a5cb340cd /drivers/mfd/arizona-i2c.c | |
parent | e768f4e12f6aaa991fb07e9ac05073bd8cb280cd (diff) | |
parent | 7c470373e097822ce6ca7bbac44b3afec0e7c1f8 (diff) | |
download | linux-9912b30f95e22d5722abc225c1c3784a51643aef.tar.bz2 |
Merge remote-tracking branch 'asoc/topic/arizona' into asoc-next
Diffstat (limited to 'drivers/mfd/arizona-i2c.c')
-rw-r--r-- | drivers/mfd/arizona-i2c.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/mfd/arizona-i2c.c b/drivers/mfd/arizona-i2c.c index 44a1bb969841..deb267ebf84e 100644 --- a/drivers/mfd/arizona-i2c.c +++ b/drivers/mfd/arizona-i2c.c @@ -27,9 +27,14 @@ static int arizona_i2c_probe(struct i2c_client *i2c, { struct arizona *arizona; const struct regmap_config *regmap_config; - int ret; + int ret, type; - switch (id->driver_data) { + if (i2c->dev.of_node) + type = arizona_of_get_type(&i2c->dev); + else + type = id->driver_data; + + switch (type) { #ifdef CONFIG_MFD_WM5102 case WM5102: regmap_config = &wm5102_i2c_regmap; @@ -84,6 +89,7 @@ static struct i2c_driver arizona_i2c_driver = { .name = "arizona", .owner = THIS_MODULE, .pm = &arizona_pm_ops, + .of_match_table = of_match_ptr(arizona_of_match), }, .probe = arizona_i2c_probe, .remove = arizona_i2c_remove, |