From: Florian Vaussard <florian.vaussard@gmail.com>
To: devicetree@vger.kernel.org, Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>
Cc: Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
Timur Tabi <timur@freescale.com>,
Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>,
Lars-Peter Clausen <lars@metafoo.de>,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
Florian Vaussard <florian.vaussard@heig-vd.ch>
Subject: [PATCH 2/2] ASoC: ads117x: Add device tree compatible string
Date: Mon, 18 Jan 2016 17:04:52 +0100 [thread overview]
Message-ID: <1453133092-29521-3-git-send-email-florian.vaussard@heig-vd.ch> (raw)
In-Reply-To: <1453133092-29521-1-git-send-email-florian.vaussard@heig-vd.ch>
This patch adds the necessary device tree compatible string to allow
DT probing.
Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch>
---
sound/soc/codecs/ads117x.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/sound/soc/codecs/ads117x.c b/sound/soc/codecs/ads117x.c
index 1222282..b3f6618 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,18 @@ 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,ads117x" },
+ { },
+};
+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,
--
2.1.0
prev parent reply other threads:[~2016-01-18 16:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-18 16:04 [PATCH 0/2] ASoC: ads117x: Add device tree support for TI ADS117x Florian Vaussard
[not found] ` <1453133092-29521-1-git-send-email-florian.vaussard-EWQkb/GNqlFyDzI6CaY1VQ@public.gmane.org>
2016-01-18 16:04 ` [PATCH 1/2] dt/bindings: Add bindings documentation for TI ADS117x ADC Florian Vaussard
[not found] ` <1453133092-29521-2-git-send-email-florian.vaussard-EWQkb/GNqlFyDzI6CaY1VQ@public.gmane.org>
2016-01-18 16:34 ` Mark Brown
2016-01-18 16:04 ` Florian Vaussard [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1453133092-29521-3-git-send-email-florian.vaussard@heig-vd.ch \
--to=florian.vaussard@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=florian.vaussard@heig-vd.ch \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=jkrzyszt@tis.icnet.pl \
--cc=lars@metafoo.de \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=perex@perex.cz \
--cc=robh+dt@kernel.org \
--cc=timur@freescale.com \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).