diff options
-rw-r--r-- | Documentation/devicetree/bindings/sound/soc/codecs/fsl-sgtl5000.txt | 11 | ||||
-rw-r--r-- | sound/soc/codecs/sgtl5000.c | 8 |
2 files changed, 19 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/sound/soc/codecs/fsl-sgtl5000.txt b/Documentation/devicetree/bindings/sound/soc/codecs/fsl-sgtl5000.txt new file mode 100644 index 000000000000..2c3cd413f042 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/soc/codecs/fsl-sgtl5000.txt | |||
@@ -0,0 +1,11 @@ | |||
1 | * Freescale SGTL5000 Stereo Codec | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "fsl,sgtl5000". | ||
5 | |||
6 | Example: | ||
7 | |||
8 | codec: sgtl5000@0a { | ||
9 | compatible = "fsl,sgtl5000"; | ||
10 | reg = <0x0a>; | ||
11 | }; | ||
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), |