summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/ssm2602-spi.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2014-03-13 14:16:35 +0000
committerMark Brown <broonie@linaro.org>2014-03-13 14:16:35 +0000
commit234bf1f0f03f879da2be698fb749f9a4b7322221 (patch)
tree937f7946f6afb26a659d555a56116abed3ddd3e2 /sound/soc/codecs/ssm2602-spi.c
parentf410d5c953cf3c11629f138c5a2c3d3f40c61b5d (diff)
parentdeeed33850c8a376addabbf971df433b2a1ba74c (diff)
downloadblackbird-op-linux-234bf1f0f03f879da2be698fb749f9a4b7322221.tar.gz
blackbird-op-linux-234bf1f0f03f879da2be698fb749f9a4b7322221.zip
Merge tag 'asoc-v3.15' into asoc-intel
ASoC: Updates for v3.15 Quite a busy release for ASoC this time, more on janitorial work than exciting new features but welcome nontheless: - Lots of cleanups from Takashi for enumerations; the original API for these was error prone so he's refactored lots of code to use more modern APIs which avoid issues. - Elimination of the ASoC level wrappers for I2C and SPI moving us closer to converting to regmap completely and avoiding some randconfig hassle. - Provide both manually and transparently locked DAPM APIs rather than a mix of the two fixing some concurrency issues. - Start converting CODEC drivers to use separate bus interface drivers rather than having them all in one file helping avoid dependency issues. - DPCM support for Intel Haswell and Bay Trail platforms. - Lots of work on improvements for simple-card, DaVinci and the Renesas rcar drivers. - New drivers for Analog Devices ADAU1977, TI PCM512x and parts of the CSR SiRF SoC. Conflicts: sound/soc/intel/Kconfig
Diffstat (limited to 'sound/soc/codecs/ssm2602-spi.c')
-rw-r--r--sound/soc/codecs/ssm2602-spi.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/sound/soc/codecs/ssm2602-spi.c b/sound/soc/codecs/ssm2602-spi.c
new file mode 100644
index 000000000000..2bf55e24a7bb
--- /dev/null
+++ b/sound/soc/codecs/ssm2602-spi.c
@@ -0,0 +1,41 @@
+/*
+ * SSM2602 SPI audio driver
+ *
+ * Copyright 2014 Analog Devices Inc.
+ *
+ * Licensed under the GPL-2.
+ */
+
+#include <linux/module.h>
+#include <linux/spi/spi.h>
+#include <linux/regmap.h>
+
+#include <sound/soc.h>
+
+#include "ssm2602.h"
+
+static int ssm2602_spi_probe(struct spi_device *spi)
+{
+ return ssm2602_probe(&spi->dev, SSM2602,
+ devm_regmap_init_spi(spi, &ssm2602_regmap_config));
+}
+
+static int ssm2602_spi_remove(struct spi_device *spi)
+{
+ snd_soc_unregister_codec(&spi->dev);
+ return 0;
+}
+
+static struct spi_driver ssm2602_spi_driver = {
+ .driver = {
+ .name = "ssm2602",
+ .owner = THIS_MODULE,
+ },
+ .probe = ssm2602_spi_probe,
+ .remove = ssm2602_spi_remove,
+};
+module_spi_driver(ssm2602_spi_driver);
+
+MODULE_DESCRIPTION("ASoC SSM2602 SPI driver");
+MODULE_AUTHOR("Cliff Cai");
+MODULE_LICENSE("GPL");
OpenPOWER on IntegriCloud