summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/ssm2602-i2c.c
diff options
context:
space:
mode:
authorStefan Kristiansson <stefan.kristiansson@saunalahti.fi>2014-09-29 22:41:10 +0300
committerMark Brown <broonie@kernel.org>2014-09-30 13:27:27 +0100
commit555b9ee1368a9ceddd5c963ad918db5120638674 (patch)
tree155751d595b0e076783b7d808d0dc5690fd0c5d1 /sound/soc/codecs/ssm2602-i2c.c
parentfe2a08b3bf1a6e35c00e18843bc19aa1778432c3 (diff)
downloadlinux-next-555b9ee1368a9ceddd5c963ad918db5120638674.tar.gz
ASoC: ssm2602: add device tree bindings
Allow the ssm2602/ssm2603/ssm2604 codec driver to be instantiated from the device tree. Also, add Kconfig prompts to allow manual selection of both the I2C and SPI configuration versions of the driver. Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi> Signed-off-by: Mark Brown <broonie@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Diffstat (limited to 'sound/soc/codecs/ssm2602-i2c.c')
-rw-r--r--sound/soc/codecs/ssm2602-i2c.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/codecs/ssm2602-i2c.c b/sound/soc/codecs/ssm2602-i2c.c
index abd63d537173..0d9779d6bfda 100644
--- a/sound/soc/codecs/ssm2602-i2c.c
+++ b/sound/soc/codecs/ssm2602-i2c.c
@@ -41,10 +41,19 @@ static const struct i2c_device_id ssm2602_i2c_id[] = {
};
MODULE_DEVICE_TABLE(i2c, ssm2602_i2c_id);
+static const struct of_device_id ssm2602_of_match[] = {
+ { .compatible = "adi,ssm2602", },
+ { .compatible = "adi,ssm2603", },
+ { .compatible = "adi,ssm2604", },
+ { }
+};
+MODULE_DEVICE_TABLE(of, ssm2602_of_match);
+
static struct i2c_driver ssm2602_i2c_driver = {
.driver = {
.name = "ssm2602",
.owner = THIS_MODULE,
+ .of_match_table = ssm2602_of_match,
},
.probe = ssm2602_i2c_probe,
.remove = ssm2602_i2c_remove,