aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMengdong Lin <mengdong.lin@intel.com>2014-11-14 02:51:34 -0500
committerMark Brown <broonie@kernel.org>2014-11-14 05:34:12 -0500
commit0605815e7ec21e048febcebb691d7f0cc3bdc36c (patch)
tree05a8ede7114c4aa6c884cb995c826e3e409ec1de
parent0cf1863219b474e82af9cb1f6715a0bbfa3fdf1a (diff)
ASoC: rt5670 : Add ACPI match ID for Intel CHT/BSW platforms
This patch adds the ACPI match ID for rt5670/5672 codec. So on Intel CherryTrail/Braswell platforms, the codec can be enumerated from ACPI and depends on ACPI to get platform-specific info and power saving. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Reviewed-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/codecs/rt5670.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/soc/codecs/rt5670.c b/sound/soc/codecs/rt5670.c
index 066b58317c24..b0aabd497ae9 100644
--- a/sound/soc/codecs/rt5670.c
+++ b/sound/soc/codecs/rt5670.c
@@ -16,6 +16,7 @@
16#include <linux/pm.h> 16#include <linux/pm.h>
17#include <linux/i2c.h> 17#include <linux/i2c.h>
18#include <linux/platform_device.h> 18#include <linux/platform_device.h>
19#include <linux/acpi.h>
19#include <linux/spi/spi.h> 20#include <linux/spi/spi.h>
20#include <sound/core.h> 21#include <sound/core.h>
21#include <sound/pcm.h> 22#include <sound/pcm.h>
@@ -2503,6 +2504,14 @@ static const struct i2c_device_id rt5670_i2c_id[] = {
2503}; 2504};
2504MODULE_DEVICE_TABLE(i2c, rt5670_i2c_id); 2505MODULE_DEVICE_TABLE(i2c, rt5670_i2c_id);
2505 2506
2507#ifdef CONFIG_ACPI
2508static struct acpi_device_id rt5670_acpi_match[] = {
2509 { "10EC5670", 0},
2510 { },
2511};
2512MODULE_DEVICE_TABLE(acpi, rt5670_acpi_match);
2513#endif
2514
2506static int rt5670_i2c_probe(struct i2c_client *i2c, 2515static int rt5670_i2c_probe(struct i2c_client *i2c,
2507 const struct i2c_device_id *id) 2516 const struct i2c_device_id *id)
2508{ 2517{
@@ -2691,6 +2700,7 @@ static struct i2c_driver rt5670_i2c_driver = {
2691 .driver = { 2700 .driver = {
2692 .name = "rt5670", 2701 .name = "rt5670",
2693 .owner = THIS_MODULE, 2702 .owner = THIS_MODULE,
2703 .acpi_match_table = ACPI_PTR(rt5670_acpi_match),
2694 }, 2704 },
2695 .probe = rt5670_i2c_probe, 2705 .probe = rt5670_i2c_probe,
2696 .remove = rt5670_i2c_remove, 2706 .remove = rt5670_i2c_remove,