aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2014-03-31 13:05:17 -0400
committerMark Brown <broonie@linaro.org>2014-03-31 13:27:14 -0400
commit03a620d8fa5f5423b87aa93e49bfa79b731c5790 (patch)
tree187b71372df9de7e81fa9d422a3575dc65f33b59 /sound/soc/codecs
parentc159a85013afbb8283f0c7272812952e04d5c3a1 (diff)
ASoC: rt5640: add an of_match table
Add a device tree match table. This serves to make the driver's support of device tree more explicit. Perhaps the fallback for DT matching to using the i2c_device_id table will go away one day, since it fails in face of devices from different vendors with the same name. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r--sound/soc/codecs/rt5640.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c
index 0061ae6b6716..68b4dd622b87 100644
--- a/sound/soc/codecs/rt5640.c
+++ b/sound/soc/codecs/rt5640.c
@@ -2074,6 +2074,14 @@ static const struct i2c_device_id rt5640_i2c_id[] = {
2074}; 2074};
2075MODULE_DEVICE_TABLE(i2c, rt5640_i2c_id); 2075MODULE_DEVICE_TABLE(i2c, rt5640_i2c_id);
2076 2076
2077#if defined(CONFIG_OF)
2078static const struct of_device_id rt5640_of_match[] = {
2079 { .compatible = "realtek,rt5640", },
2080 {},
2081};
2082MODULE_DEVICE_TABLE(of, rt5640_of_match);
2083#endif
2084
2077#ifdef CONFIG_ACPI 2085#ifdef CONFIG_ACPI
2078static struct acpi_device_id rt5640_acpi_match[] = { 2086static struct acpi_device_id rt5640_acpi_match[] = {
2079 { "INT33CA", 0 }, 2087 { "INT33CA", 0 },
@@ -2203,6 +2211,7 @@ static struct i2c_driver rt5640_i2c_driver = {
2203 .name = "rt5640", 2211 .name = "rt5640",
2204 .owner = THIS_MODULE, 2212 .owner = THIS_MODULE,
2205 .acpi_match_table = ACPI_PTR(rt5640_acpi_match), 2213 .acpi_match_table = ACPI_PTR(rt5640_acpi_match),
2214 .of_match_table = of_match_ptr(rt5640_of_match),
2206 }, 2215 },
2207 .probe = rt5640_i2c_probe, 2216 .probe = rt5640_i2c_probe,
2208 .remove = rt5640_i2c_remove, 2217 .remove = rt5640_i2c_remove,