diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2011-07-21 12:28:51 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-07-29 12:37:15 -0400 |
commit | 58e494247a9f09f0ae8d9867fcfb672a9bcdd6ae (patch) | |
tree | 6dfd99ff590ac04ceee7c56cbf26e8f83a820016 /sound/soc/codecs | |
parent | a7f96e4dc6bb5f45d0612782419e6a63032a2ac0 (diff) |
ASoC: sgtl5000: add device tree probe support
It adds device tree probe support for sgtl5000 driver.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r-- | sound/soc/codecs/sgtl5000.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index 76258f2a2ffb..cf6eea8b458e 100644 --- a/sound/soc/codecs/sgtl5000.c +++ b/sound/soc/codecs/sgtl5000.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/regulator/driver.h> | 20 | #include <linux/regulator/driver.h> |
21 | #include <linux/regulator/machine.h> | 21 | #include <linux/regulator/machine.h> |
22 | #include <linux/regulator/consumer.h> | 22 | #include <linux/regulator/consumer.h> |
23 | #include <linux/of_device.h> | ||
23 | #include <sound/core.h> | 24 | #include <sound/core.h> |
24 | #include <sound/tlv.h> | 25 | #include <sound/tlv.h> |
25 | #include <sound/pcm.h> | 26 | #include <sound/pcm.h> |
@@ -1494,10 +1495,17 @@ static const struct i2c_device_id sgtl5000_id[] = { | |||
1494 | 1495 | ||
1495 | MODULE_DEVICE_TABLE(i2c, sgtl5000_id); | 1496 | MODULE_DEVICE_TABLE(i2c, sgtl5000_id); |
1496 | 1497 | ||
1498 | static const struct of_device_id sgtl5000_dt_ids[] = { | ||
1499 | { .compatible = "fsl,sgtl5000", }, | ||
1500 | { /* sentinel */ } | ||
1501 | }; | ||
1502 | MODULE_DEVICE_TABLE(i2c, sgtl5000_dt_ids); | ||
1503 | |||
1497 | static struct i2c_driver sgtl5000_i2c_driver = { | 1504 | static struct i2c_driver sgtl5000_i2c_driver = { |
1498 | .driver = { | 1505 | .driver = { |
1499 | .name = "sgtl5000", | 1506 | .name = "sgtl5000", |
1500 | .owner = THIS_MODULE, | 1507 | .owner = THIS_MODULE, |
1508 | .of_match_table = sgtl5000_dt_ids, | ||
1501 | }, | 1509 | }, |
1502 | .probe = sgtl5000_i2c_probe, | 1510 | .probe = sgtl5000_i2c_probe, |
1503 | .remove = __devexit_p(sgtl5000_i2c_remove), | 1511 | .remove = __devexit_p(sgtl5000_i2c_remove), |