All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Cercueil <paul@crapouillou.net>
To: Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>
Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Paul Cercueil <paul@crapouillou.net>
Subject: [PATCH v2 4/6] ASoC: codecs: jz4740: Add support for devicetree
Date: Thu,  7 Feb 2019 10:31:41 -0300	[thread overview]
Message-ID: <20190207133143.5232-4-paul@crapouillou.net> (raw)
In-Reply-To: <20190207133143.5232-1-paul@crapouillou.net>

Add support for probing the driver from devicetree.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---

Changes:

v2: No change

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

diff --git a/sound/soc/codecs/jz4740.c b/sound/soc/codecs/jz4740.c
index 9b3e1227a971..974e17fa1911 100644
--- a/sound/soc/codecs/jz4740.c
+++ b/sound/soc/codecs/jz4740.c
@@ -346,10 +346,19 @@ static int jz4740_codec_probe(struct platform_device *pdev)
 	return ret;
 }
 
+#ifdef CONFIG_OF
+static const struct of_device_id jz4740_codec_of_matches[] = {
+	{ .compatible = "ingenic,jz4740-codec", },
+	{ }
+};
+MODULE_DEVICE_TABLE(of, jz4740_codec_of_matches);
+#endif
+
 static struct platform_driver jz4740_codec_driver = {
 	.probe = jz4740_codec_probe,
 	.driver = {
 		.name = "jz4740-codec",
+		.of_match_table = of_match_ptr(jz4740_codec_of_matches),
 	},
 };
 
-- 
2.11.0


  parent reply	other threads:[~2019-02-07 13:32 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-07 13:31 [PATCH v2 1/6] dt-bindings: sound: Document jz4740-codec bindings Paul Cercueil
2019-02-07 13:31 ` [PATCH v2 2/6] dt-bindings: sound: Document jz4725b-codec bindings Paul Cercueil
2019-02-07 13:31 ` [PATCH v2 3/6] ASoC: codecs: jz4740: Use SPDX license notifier Paul Cercueil
2019-02-07 15:22   ` Applied "ASoC: codecs: jz4740: Use SPDX license notifier" to the asoc tree Mark Brown
2019-02-07 15:22     ` Mark Brown
2019-02-07 13:31 ` Paul Cercueil [this message]
2019-02-07 13:31 ` [PATCH v2 5/6] ASoC: codecs: Kconfig: Show knob, and depend on MIPS || COMPILE_TEST Paul Cercueil
2019-02-07 15:22   ` Applied "ASoC: codecs: Kconfig: Show knob, and depend on MIPS || COMPILE_TEST" to the asoc tree Mark Brown
2019-02-07 15:22     ` Mark Brown
2019-02-07 13:31 ` [PATCH v2 6/6] ASoC: codecs: jz4725b: Use C++ style comments in header Paul Cercueil
2019-02-07 15:22   ` Applied "ASoC: codecs: jz4725b: Use C++ style comments in header" to the asoc tree Mark Brown
2019-02-07 15:22     ` Mark Brown
2019-02-07 14:00 ` [PATCH v2 1/6] dt-bindings: sound: Document jz4740-codec bindings Mark Brown
2019-02-07 14:17   ` Paul Cercueil
2019-02-07 15:22     ` Mark Brown
2019-02-07 15:22       ` 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=20190207133143.5232-4-paul@crapouillou.net \
    --to=paul@crapouillou.net \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=perex@perex.cz \
    --cc=robh+dt@kernel.org \
    --cc=tiwai@suse.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.