All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ricard Wanderlof <ricard.wanderlof@axis.com>
To: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	Mark Brown <broonie@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>
Subject: [PATCH v2] ASoC: ssm2518: Add explicit device tree support
Date: Thu, 13 Aug 2015 15:10:19 +0200	[thread overview]
Message-ID: <alpine.DEB.2.02.1508131456110.27635@lnxricardw1.se.axis.com> (raw)


Add OF match table to SSM2518 to allow direct matching without going
through I2C subsystem.

Signed-off-by: Ricard Wanderlof <ricardw@axis.com>

---
 sound/soc/codecs/ssm2518.c |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/sound/soc/codecs/ssm2518.c b/sound/soc/codecs/ssm2518.c
index 67ea55a..2d199b1 100644
--- a/sound/soc/codecs/ssm2518.c
+++ b/sound/soc/codecs/ssm2518.c
@@ -811,6 +811,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 },
 	{ }
@@ -821,6 +829,7 @@ static struct i2c_driver ssm2518_driver = {
 	.driver = {
 		.name = "ssm2518",
 		.owner = THIS_MODULE,
+		.of_match_table = of_match_ptr(ssm2518_dt_ids),
 	},
 	.probe = ssm2518_i2c_probe,
 	.remove = ssm2518_i2c_remove,
-- 
1.7.10.4

-- 
Ricard Wolf Wanderlöf                           ricardw(at)axis.com
Axis Communications AB, Lund, Sweden            www.axis.com
Phone +46 46 272 2016                           Fax +46 46 13 61 30

             reply	other threads:[~2015-08-13 13:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-13 13:10 Ricard Wanderlof [this message]
2015-08-13 13:30 ` [PATCH v2] ASoC: ssm2518: Add explicit device tree support Lars-Peter Clausen
2015-08-14 15:53 ` Mark Brown
2015-08-17  6:43   ` Ricard Wanderlof
2015-08-17 17:28     ` Mark Brown
2015-08-15  2:15 ` Applied "ASoC: ssm2518: Add explicit device tree support" to the asoc tree Mark Brown

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=alpine.DEB.2.02.1508131456110.27635@lnxricardw1.se.axis.com \
    --to=ricard.wanderlof@axis.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.