devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: rt5616: add an of_match table
@ 2015-12-21 13:18 Caesar Wang
  2015-12-21 13:18 ` [PATCH 2/2] dt-bindings: sound: add devicetree document for rt5616 Caesar Wang
  0 siblings, 1 reply; 8+ messages in thread
From: Caesar Wang @ 2015-12-21 13:18 UTC (permalink / raw)
  To: robh+dt, broonie
  Cc: devicetree, wxt, linux-kernel, bardliao, alsa-devel, heiko

Add a device tree match table. This serves to make the driver's support
of device tree more explicit.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
---

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

diff --git a/sound/soc/codecs/rt5616.c b/sound/soc/codecs/rt5616.c
index f4005cb..e01a32d 100644
--- a/sound/soc/codecs/rt5616.c
+++ b/sound/soc/codecs/rt5616.c
@@ -1287,6 +1287,14 @@ static const struct i2c_device_id rt5616_i2c_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, rt5616_i2c_id);
 
+#if defined(CONFIG_OF)
+static const struct of_device_id rt5616_of_match[] = {
+	{ .compatible = "realtek,rt5616", },
+	{},
+};
+MODULE_DEVICE_TABLE(of, rt5616_of_match);
+#endif
+
 static int rt5616_i2c_probe(struct i2c_client *i2c,
 		    const struct i2c_device_id *id)
 {
@@ -1359,6 +1367,7 @@ static void rt5616_i2c_shutdown(struct i2c_client *client)
 static struct i2c_driver rt5616_i2c_driver = {
 	.driver = {
 		.name = "rt5616",
+		.of_match_table = of_match_ptr(rt5616_of_match),
 	},
 	.probe = rt5616_i2c_probe,
 	.remove = rt5616_i2c_remove,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-12-22  1:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-21 13:18 [PATCH 1/2] ASoC: rt5616: add an of_match table Caesar Wang
2015-12-21 13:18 ` [PATCH 2/2] dt-bindings: sound: add devicetree document for rt5616 Caesar Wang
     [not found]   ` <1450703894-32623-2-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2015-12-21 14:10     ` Heiko Stübner
2015-12-21 14:44       ` Caesar Wang
2015-12-21 14:56     ` [PATCH v1 " Caesar Wang
     [not found]       ` <1450709768-14898-1-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2015-12-21 21:15         ` Frank Rowand
     [not found]           ` <56786BF7.7070608-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-12-22  0:54             ` Caesar Wang
2015-12-22  1:50       ` Bard Liao

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).