Commit bac257b0 authored by Marcelo Schmitt's avatar Marcelo Schmitt Committed by Jonathan Cameron

staging: iio: ad5933: add device tree support

Add a of_device_id struct variable and subsequent call to
MODULE_DEVICE_TABLE macro to complete device tree support.
Signed-off-by: default avatarMarcelo Schmitt <marcelo.schmitt1@gmail.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent b911b0ab
......@@ -786,9 +786,18 @@ static const struct i2c_device_id ad5933_id[] = {
MODULE_DEVICE_TABLE(i2c, ad5933_id);
static const struct of_device_id ad5933_of_match[] = {
{ .compatible = "adi,ad5933" },
{ .compatible = "adi,ad5934" },
{ },
};
MODULE_DEVICE_TABLE(of, ad5933_of_match);
static struct i2c_driver ad5933_driver = {
.driver = {
.name = "ad5933",
.of_match_table = ad5933_of_match,
},
.probe = ad5933_probe,
.remove = ad5933_remove,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment