Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1296553
| From | Caesar Wang <wxt@rock-chips.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 1/2] ASoC: rt5616: add an of_match table |
| Date | 2015-12-22 06:50 +0100 |
| Message-ID | <qInZD-8gJ-1@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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>
---
Changes in v2: None
Changes in v1: None
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH v2 1/2] ASoC: rt5616: add an of_match table Caesar Wang <wxt@rock-chips.com> - 2015-12-22 06:50 +0100
[PATCH v2 2/2] dt-bindings: sound: add devicetree document for rt5616 Caesar Wang <wxt@rock-chips.com> - 2015-12-22 06:50 +0100
Re: [PATCH v2 2/2] dt-bindings: sound: add devicetree document for rt5616 Mark Brown <broonie@kernel.org> - 2015-12-23 01:00 +0100
Re: [PATCH v2 2/2] dt-bindings: sound: add devicetree document for rt5616 Rob Herring <robh@kernel.org> - 2015-12-23 01:40 +0100
csiph-web