summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorRicard Wanderlof <ricard.wanderlof@axis.com>2015-08-13 15:10:19 +0200
committerMark Brown <broonie@kernel.org>2015-08-14 19:32:30 -0700
commit601e4576594543200bde9201e4d23242e73a778b (patch)
treecbffee8c2647ead6321af7bd78ba2cf8334cd75a /sound
parent1c07a4de5baad76585f7ffb86b5b0bc34c33e8a6 (diff)
ASoC: ssm2518: Add explicit device tree support
Add OF match table to SSM2518 to allow direct matching without going through I2C subsystem. Signed-off-by: Ricard Wanderlof <ricardw@axis.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/ssm2518.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/codecs/ssm2518.c b/sound/soc/codecs/ssm2518.c
index 5d94d6c7ad33..ddb0203fc649 100644
--- a/sound/soc/codecs/ssm2518.c
+++ b/sound/soc/codecs/ssm2518.c
@@ -806,6 +806,14 @@ static int ssm2518_i2c_remove(struct i2c_client *client)
return 0;
}
+#ifdef CONFIG_OF
+static const struct of_device_id ssm2518_dt_ids[] = {
+ { .compatible = "adi,ssm2518", },
+ { }
+};
+MODULE_DEVICE_TABLE(of, ssm2518_dt_ids);
+#endif
+
static const struct i2c_device_id ssm2518_i2c_ids[] = {
{ "ssm2518", 0 },
{ }
@@ -815,6 +823,7 @@ MODULE_DEVICE_TABLE(i2c, ssm2518_i2c_ids);
static struct i2c_driver ssm2518_driver = {
.driver = {
.name = "ssm2518",
+ .of_match_table = of_match_ptr(ssm2518_dt_ids),
},
.probe = ssm2518_i2c_probe,
.remove = ssm2518_i2c_remove,