summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/rt5631.c
diff options
context:
space:
mode:
authorKrishna Mohan Dani <krishna.md@samsung.com>2014-11-13 13:14:24 +0100
committerMark Brown <broonie@kernel.org>2014-11-13 19:08:01 +0100
commit189c88ced169d5197c806828e275c6f063b1d499 (patch)
treeceb328c9671ed17103e3ac16416573d53ae3a438 /sound/soc/codecs/rt5631.c
parentASoC: rt5631: Adding the description of the codec (diff)
downloadlinux-189c88ced169d5197c806828e275c6f063b1d499.tar.xz
linux-189c88ced169d5197c806828e275c6f063b1d499.zip
ASoC: rt5631: Adding Device Tree compatibility to Realtek's ALC5631/RT5631 codec driver
Signed-off-by: Krishna Mohan Dani <krishna.md@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/rt5631.c')
-rw-r--r--sound/soc/codecs/rt5631.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/codecs/rt5631.c b/sound/soc/codecs/rt5631.c
index 1ba27db660a6..3b7d5e4a3ef6 100644
--- a/sound/soc/codecs/rt5631.c
+++ b/sound/soc/codecs/rt5631.c
@@ -1686,10 +1686,18 @@ static struct snd_soc_codec_driver soc_codec_dev_rt5631 = {
static const struct i2c_device_id rt5631_i2c_id[] = {
{ "rt5631", 0 },
+ { "alc5631", 0 },
{ }
};
MODULE_DEVICE_TABLE(i2c, rt5631_i2c_id);
+static struct of_device_id rt5631_i2c_dt_ids[] = {
+ { .compatible = "realtek,rt5631"},
+ { .compatible = "realtek,alc5631"},
+ { }
+};
+MODULE_DEVICE_TABLE(of, rt5631_i2c_dt_ids);
+
static const struct regmap_config rt5631_regmap_config = {
.reg_bits = 8,
.val_bits = 16,
@@ -1734,6 +1742,7 @@ static struct i2c_driver rt5631_i2c_driver = {
.driver = {
.name = "rt5631",
.owner = THIS_MODULE,
+ .of_match_table = of_match_ptr(rt5631_i2c_dt_ids),
},
.probe = rt5631_i2c_probe,
.remove = rt5631_i2c_remove,