* [PATCH] ASoC: max98095: Add an explicit of_match_table
@ 2014-04-23 9:13 Tushar Behera
2014-04-23 10:43 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Tushar Behera @ 2014-04-23 9:13 UTC (permalink / raw)
To: alsa-devel, linux-kernel, linux-doc, devicetree
Cc: broonie, lgirdwood, rdunlap, robh+dt
Create an explicit of_match_table entry for MAX98095 codec. Also
add a binding Documentation for this compatible string.
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
---
.../devicetree/bindings/sound/max98095.txt | 16 ++++++++++++++++
sound/soc/codecs/max98095.c | 7 +++++++
2 files changed, 23 insertions(+)
create mode 100644 Documentation/devicetree/bindings/sound/max98095.txt
diff --git a/Documentation/devicetree/bindings/sound/max98095.txt b/Documentation/devicetree/bindings/sound/max98095.txt
new file mode 100644
index 0000000..bacbeaa
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/max98095.txt
@@ -0,0 +1,16 @@
+MAX98095 audio CODEC
+
+This device supports I2C only.
+
+Required properties:
+
+- compatible : "maxim,max98095".
+
+- reg : The I2C address of the device.
+
+Example:
+
+max98095: codec@11 {
+ compatible = "maxim,max98095";
+ reg = <0x11>;
+};
diff --git a/sound/soc/codecs/max98095.c b/sound/soc/codecs/max98095.c
index 03f0536..8e548af 100644
--- a/sound/soc/codecs/max98095.c
+++ b/sound/soc/codecs/max98095.c
@@ -2399,10 +2399,17 @@ static const struct i2c_device_id max98095_i2c_id[] = {
};
MODULE_DEVICE_TABLE(i2c, max98095_i2c_id);
+static const struct of_device_id max98095_of_match[] = {
+ { .compatible = "maxim,max98095", },
+ { }
+};
+MODULE_DEVICE_TABLE(of, max98095_of_match);
+
static struct i2c_driver max98095_i2c_driver = {
.driver = {
.name = "max98095",
.owner = THIS_MODULE,
+ .of_match_table = of_match_ptr(max98095_of_match),
},
.probe = max98095_i2c_probe,
.remove = max98095_i2c_remove,
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: max98095: Add an explicit of_match_table
2014-04-23 9:13 [PATCH] ASoC: max98095: Add an explicit of_match_table Tushar Behera
@ 2014-04-23 10:43 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2014-04-23 10:43 UTC (permalink / raw)
To: Tushar Behera
Cc: alsa-devel, linux-kernel, linux-doc, devicetree, lgirdwood,
rdunlap, robh+dt
[-- Attachment #1: Type: text/plain, Size: 206 bytes --]
On Wed, Apr 23, 2014 at 02:43:58PM +0530, Tushar Behera wrote:
> Create an explicit of_match_table entry for MAX98095 codec. Also
> add a binding Documentation for this compatible string.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-23 10:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-23 9:13 [PATCH] ASoC: max98095: Add an explicit of_match_table Tushar Behera
2014-04-23 10:43 ` Mark Brown
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).