summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs
diff options
context:
space:
mode:
authorFlorian Vaussard <florian.vaussard@gmail.com>2016-02-05 16:32:14 +0100
committerMark Brown <broonie@kernel.org>2016-03-05 14:02:13 +0900
commit4f2bf0ace0f96cc693002e1bbde967fa2356bc43 (patch)
treec3b1a5be07532b897a27562171fdb2ebe4e5e907 /sound/soc/codecs
parentc9146fae4e88fa9864c4a7087289523b96cdbf2d (diff)
downloadlinux-4f2bf0ace0f96cc693002e1bbde967fa2356bc43.tar.bz2
ASoC: ads117x: Add device tree compatible string
This patch adds the necessary device tree compatible string to allow DT probing. Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r--sound/soc/codecs/ads117x.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sound/soc/codecs/ads117x.c b/sound/soc/codecs/ads117x.c
index 1222282e93c3..c5be1bdc2c9a 100644
--- a/sound/soc/codecs/ads117x.c
+++ b/sound/soc/codecs/ads117x.c
@@ -20,6 +20,8 @@
#include <sound/initval.h>
#include <sound/soc.h>
+#include <linux/of.h>
+
#define ADS117X_RATES (SNDRV_PCM_RATE_8000_48000)
#define ADS117X_FORMATS (SNDRV_PCM_FMTBIT_S16_LE)
@@ -75,9 +77,19 @@ static int ads117x_remove(struct platform_device *pdev)
return 0;
}
+#if defined(CONFIG_OF)
+static const struct of_device_id ads117x_dt_ids[] = {
+ { .compatible = "ti,ads1174" },
+ { .compatible = "ti,ads1178" },
+ { },
+};
+MODULE_DEVICE_TABLE(of, ads117x_dt_ids);
+#endif
+
static struct platform_driver ads117x_codec_driver = {
.driver = {
.name = "ads117x-codec",
+ .of_match_table = of_match_ptr(ads117x_dt_ids),
},
.probe = ads117x_probe,