* [PATCH v2 1/2] ASoC: rt5616: add an of_match table
@ 2015-12-22 5:45 Caesar Wang
2015-12-22 5:45 ` [PATCH v2 2/2] dt-bindings: sound: add devicetree document for rt5616 Caesar Wang
0 siblings, 1 reply; 4+ messages in thread
From: Caesar Wang @ 2015-12-22 5:45 UTC (permalink / raw)
To: broonie-DgEjT+Ai2ygdnm+yROfE0A, robh+dt-DgEjT+Ai2ygdnm+yROfE0A
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
alsa-devel-K7yf7f+aM1UjKrWyv+zT/A, heiko-4mtYJXux2i+zQB+pC5nmwQ,
bardliao-Rasf1IRRPZFBDgjK7y7TUQ, Caesar Wang
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-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
---
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 devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2 2/2] dt-bindings: sound: add devicetree document for rt5616
2015-12-22 5:45 [PATCH v2 1/2] ASoC: rt5616: add an of_match table Caesar Wang
@ 2015-12-22 5:45 ` Caesar Wang
[not found] ` <1450763103-21073-2-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2015-12-23 0:37 ` Rob Herring
0 siblings, 2 replies; 4+ messages in thread
From: Caesar Wang @ 2015-12-22 5:45 UTC (permalink / raw)
To: broonie, robh+dt
Cc: devicetree, linux-kernel, alsa-devel, heiko, bardliao,
Caesar Wang
Add the description for rt5616 codec.
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
---
Changes in v2:
- As Frank comments, rt5616@1b to instead of rt5616.
- Update the Pins device from Bard.
Changes in v1:
- As Heiko comments, remove the not exist option properties.
Documentation/devicetree/bindings/sound/rt5616.txt | 26 ++++++++++++++++++++++
1 file changed, 26 insertions(+)
create mode 100644 Documentation/devicetree/bindings/sound/rt5616.txt
diff --git a/Documentation/devicetree/bindings/sound/rt5616.txt b/Documentation/devicetree/bindings/sound/rt5616.txt
new file mode 100644
index 0000000..efc48c6
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/rt5616.txt
@@ -0,0 +1,26 @@
+RT5616 audio CODEC
+
+This device supports I2C only.
+
+Required properties:
+
+- compatible : "realtek,rt5616".
+
+- reg : The I2C address of the device.
+
+Pins on the device (for linking into audio routes) for RT5616:
+
+ * IN1P
+ * IN2P
+ * IN2N
+ * LOUTL
+ * LOUTR
+ * HPOL
+ * HPOR
+
+Example:
+
+codec: rt5616@1b {
+ compatible = "realtek,rt5616";
+ reg = <0x1b>;
+};
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 2/2] dt-bindings: sound: add devicetree document for rt5616
[not found] ` <1450763103-21073-2-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
@ 2015-12-22 23:53 ` Mark Brown
0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2015-12-22 23:53 UTC (permalink / raw)
To: Caesar Wang
Cc: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
alsa-devel-K7yf7f+aM1UjKrWyv+zT/A, heiko-4mtYJXux2i+zQB+pC5nmwQ,
bardliao-Rasf1IRRPZFBDgjK7y7TUQ
[-- Attachment #1: Type: text/plain, Size: 165 bytes --]
On Tue, Dec 22, 2015 at 01:45:03PM +0800, Caesar Wang wrote:
> Add the description for rt5616 codec.
Please use subject lines matching the style for the subsystem.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 2/2] dt-bindings: sound: add devicetree document for rt5616
2015-12-22 5:45 ` [PATCH v2 2/2] dt-bindings: sound: add devicetree document for rt5616 Caesar Wang
[not found] ` <1450763103-21073-2-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
@ 2015-12-23 0:37 ` Rob Herring
1 sibling, 0 replies; 4+ messages in thread
From: Rob Herring @ 2015-12-23 0:37 UTC (permalink / raw)
To: Caesar Wang
Cc: broonie, devicetree, linux-kernel, alsa-devel, heiko, bardliao
On Tue, Dec 22, 2015 at 01:45:03PM +0800, Caesar Wang wrote:
> Add the description for rt5616 codec.
>
> Signed-off-by: Caesar Wang <wxt@rock-chips.com>
>
> ---
>
> Changes in v2:
> - As Frank comments, rt5616@1b to instead of rt5616.
> - Update the Pins device from Bard.
>
> Changes in v1:
> - As Heiko comments, remove the not exist option properties.
>
> Documentation/devicetree/bindings/sound/rt5616.txt | 26 ++++++++++++++++++++++
> 1 file changed, 26 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/sound/rt5616.txt
Acked-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-12-23 0:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-22 5:45 [PATCH v2 1/2] ASoC: rt5616: add an of_match table Caesar Wang
2015-12-22 5:45 ` [PATCH v2 2/2] dt-bindings: sound: add devicetree document for rt5616 Caesar Wang
[not found] ` <1450763103-21073-2-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2015-12-22 23:53 ` Mark Brown
2015-12-23 0:37 ` Rob Herring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox