提交 2951f93f 编写于 作者: S Stephen Warren 提交者: Mark Brown

ASoC: max98090: 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: NStephen Warren <swarren@nvidia.com>
Signed-off-by: NMark Brown <broonie@linaro.org>
上级 e585ca34
...@@ -2406,11 +2406,18 @@ static const struct i2c_device_id max98090_i2c_id[] = { ...@@ -2406,11 +2406,18 @@ static const struct i2c_device_id max98090_i2c_id[] = {
}; };
MODULE_DEVICE_TABLE(i2c, max98090_i2c_id); MODULE_DEVICE_TABLE(i2c, max98090_i2c_id);
static const struct of_device_id max98090_of_match[] = {
{ .compatible = "maxim,max98090", },
{ }
};
MODULE_DEVICE_TABLE(of, max98090_of_match);
static struct i2c_driver max98090_i2c_driver = { static struct i2c_driver max98090_i2c_driver = {
.driver = { .driver = {
.name = "max98090", .name = "max98090",
.owner = THIS_MODULE, .owner = THIS_MODULE,
.pm = &max98090_pm, .pm = &max98090_pm,
.of_match_table = of_match_ptr(max98090_of_match),
}, },
.probe = max98090_i2c_probe, .probe = max98090_i2c_probe,
.remove = max98090_i2c_remove, .remove = max98090_i2c_remove,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册