From: Mengdong Lin Date: Fri, 14 Nov 2014 07:51:34 +0000 (+0800) Subject: ASoC: rt5670 : Add ACPI match ID for Intel CHT/BSW platforms X-Git-Tag: v3.19-rc1~119^2~20^2~12^3~3 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0605815e7ec21e048febcebb691d7f0cc3bdc36c;p=karo-tx-linux.git 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 Reviewed-by: Bard Liao Signed-off-by: Mark Brown --- 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 @@ #include #include #include +#include #include #include #include @@ -2503,6 +2504,14 @@ static const struct i2c_device_id 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, const struct i2c_device_id *id) { @@ -2691,6 +2700,7 @@ static struct i2c_driver rt5670_i2c_driver = { .driver = { .name = "rt5670", .owner = THIS_MODULE, + .acpi_match_table = ACPI_PTR(rt5670_acpi_match), }, .probe = rt5670_i2c_probe, .remove = rt5670_i2c_remove,