aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Thomson <Adam.Thomson.Opensource@diasemi.com>2014-02-06 13:03:09 -0500
committerMark Brown <broonie@linaro.org>2014-02-10 08:44:00 -0500
commit9f10b36ffde2b732def037c1e764a0c71745a372 (patch)
treeabb86c21d475a70109f005695268be1b655cd590
parent07b0e5b10258b48e5edfb6c8ac156f05510eb775 (diff)
ASoC: da9055: Add DT support for CODEC
Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r--Documentation/devicetree/bindings/sound/da9055.txt22
-rw-r--r--sound/soc/codecs/da9055.c8
2 files changed, 30 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/sound/da9055.txt b/Documentation/devicetree/bindings/sound/da9055.txt
new file mode 100644
index 000000000000..ed1b7cc6f249
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/da9055.txt
@@ -0,0 +1,22 @@
1* Dialog DA9055 Audio CODEC
2
3DA9055 provides Audio CODEC support (I2C only).
4
5The Audio CODEC device in DA9055 has it's own I2C address which is configurable,
6so the device is instantiated separately from the PMIC (MFD) device.
7
8For details on accompanying PMIC I2C device, see the following:
9Documentation/devicetree/bindings/mfd/da9055.txt
10
11Required properties:
12
13 - compatible: "dlg,da9055-codec"
14 - reg: Specifies the I2C slave address
15
16
17Example:
18
19 codec: da9055-codec@1a {
20 compatible = "dlg,da9055-codec";
21 reg = <0x1a>;
22 };
diff --git a/sound/soc/codecs/da9055.c b/sound/soc/codecs/da9055.c
index 422812613a28..be31f3cfd46e 100644
--- a/sound/soc/codecs/da9055.c
+++ b/sound/soc/codecs/da9055.c
@@ -18,6 +18,8 @@
18#include <linux/regmap.h> 18#include <linux/regmap.h>
19#include <linux/slab.h> 19#include <linux/slab.h>
20#include <linux/module.h> 20#include <linux/module.h>
21#include <linux/of.h>
22#include <linux/of_device.h>
21#include <sound/pcm.h> 23#include <sound/pcm.h>
22#include <sound/pcm_params.h> 24#include <sound/pcm_params.h>
23#include <sound/soc.h> 25#include <sound/soc.h>
@@ -1536,11 +1538,17 @@ static const struct i2c_device_id da9055_i2c_id[] = {
1536}; 1538};
1537MODULE_DEVICE_TABLE(i2c, da9055_i2c_id); 1539MODULE_DEVICE_TABLE(i2c, da9055_i2c_id);
1538 1540
1541static const struct of_device_id da9055_of_match[] = {
1542 { .compatible = "dlg,da9055-codec", },
1543 { }
1544};
1545
1539/* I2C codec control layer */ 1546/* I2C codec control layer */
1540static struct i2c_driver da9055_i2c_driver = { 1547static struct i2c_driver da9055_i2c_driver = {
1541 .driver = { 1548 .driver = {
1542 .name = "da9055-codec", 1549 .name = "da9055-codec",
1543 .owner = THIS_MODULE, 1550 .owner = THIS_MODULE,
1551 .of_match_table = of_match_ptr(da9055_of_match),
1544 }, 1552 },
1545 .probe = da9055_i2c_probe, 1553 .probe = da9055_i2c_probe,
1546 .remove = da9055_remove, 1554 .remove = da9055_remove,