提交 0605815e 编写于 作者: M Mengdong Lin 提交者: Mark Brown

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: NMengdong Lin <mengdong.lin@intel.com>
Reviewed-by: NBard Liao <bardliao@realtek.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 0cf18632
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <linux/pm.h> #include <linux/pm.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/acpi.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <sound/core.h> #include <sound/core.h>
#include <sound/pcm.h> #include <sound/pcm.h>
...@@ -2503,6 +2504,14 @@ static const struct i2c_device_id rt5670_i2c_id[] = { ...@@ -2503,6 +2504,14 @@ static const struct i2c_device_id rt5670_i2c_id[] = {
}; };
MODULE_DEVICE_TABLE(i2c, rt5670_i2c_id); MODULE_DEVICE_TABLE(i2c, rt5670_i2c_id);
#ifdef CONFIG_ACPI
static struct acpi_device_id rt5670_acpi_match[] = {
{ "10EC5670", 0},
{ },
};
MODULE_DEVICE_TABLE(acpi, rt5670_acpi_match);
#endif
static int rt5670_i2c_probe(struct i2c_client *i2c, static int rt5670_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id) const struct i2c_device_id *id)
{ {
...@@ -2691,6 +2700,7 @@ static struct i2c_driver rt5670_i2c_driver = { ...@@ -2691,6 +2700,7 @@ static struct i2c_driver rt5670_i2c_driver = {
.driver = { .driver = {
.name = "rt5670", .name = "rt5670",
.owner = THIS_MODULE, .owner = THIS_MODULE,
.acpi_match_table = ACPI_PTR(rt5670_acpi_match),
}, },
.probe = rt5670_i2c_probe, .probe = rt5670_i2c_probe,
.remove = rt5670_i2c_remove, .remove = rt5670_i2c_remove,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册