mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ben Zhang <benzh@chromium.org>
To: alsa-devel@alsa-project.org
Cc: Bard Liao <bardliao@realtek.com>,
	Oder Chiou <oder_chiou@realtek.com>,
	Mark Brown <broonie@kernel.org>,
	linux-kernel@vger.kernel.org, Ben Zhang <benzh@chromium.org>
Subject: [PATCH 2/3] ASoC: rt5677: Add ACPI device probing
Date: Fri,  3 Oct 2014 14:37:25 -0700	[thread overview]
Message-ID: <1412372246-10489-2-git-send-email-benzh@chromium.org> (raw)
In-Reply-To: <1412372246-10489-1-git-send-email-benzh@chromium.org>

The rt5677 codec driver looks for ACPI device ID "RT5677CE",
which is specified in coreboot.

Signed-off-by: Ben Zhang <benzh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/207622
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Reviewed-by: AndyX C Huang <andyx.c.huang@intel.com>
---
 sound/soc/codecs/rt5677.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/sound/soc/codecs/rt5677.c b/sound/soc/codecs/rt5677.c
index cecbdb1..19dbb8a 100644
--- a/sound/soc/codecs/rt5677.c
+++ b/sound/soc/codecs/rt5677.c
@@ -20,6 +20,7 @@
 #include <linux/i2c.h>
 #include <linux/platform_device.h>
 #include <linux/spi/spi.h>
+#include <linux/acpi.h>
 #include <linux/gpio.h>
 #include <sound/core.h>
 #include <sound/pcm.h>
@@ -3680,10 +3681,21 @@ static int rt5677_i2c_remove(struct i2c_client *i2c)
 	return 0;
 }
 
+#ifdef CONFIG_ACPI
+static const struct acpi_device_id rt5677_acpi_id[] = {
+	{ "RT5677CE", 0 },
+	{ }
+};
+MODULE_DEVICE_TABLE(acpi, rt5677_acpi_id);
+#endif
+
 static struct i2c_driver rt5677_i2c_driver = {
 	.driver = {
 		.name = "rt5677",
 		.owner = THIS_MODULE,
+#ifdef CONFIG_ACPI
+		.acpi_match_table = ACPI_PTR(rt5677_acpi_id),
+#endif
 	},
 	.probe = rt5677_i2c_probe,
 	.remove   = rt5677_i2c_remove,
-- 
2.1.0.rc2.206.gedb03e5


  reply	other threads:[~2014-10-03 21:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-03 21:37 [PATCH 1/3] ASoC: rt5677: Include gpio driver header Ben Zhang
2014-10-03 21:37 ` Ben Zhang [this message]
2014-10-07 19:12   ` [PATCH 2/3] ASoC: rt5677: Add ACPI device probing Mark Brown
2014-10-03 21:37 ` [PATCH 3/3] ASoC: rt5677: Add jack detection support Ben Zhang
2014-10-07 19:35   ` Mark Brown
2014-10-07 19:36 ` [PATCH 1/3] ASoC: rt5677: Include gpio driver header 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=1412372246-10489-2-git-send-email-benzh@chromium.org \
    --to=benzh@chromium.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=bardliao@realtek.com \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oder_chiou@realtek.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®