Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 094c52db authored by João Seckler's avatar João Seckler Committed by Jonathan Cameron
Browse files

staging: iio: ad7746: add device tree support



Add a of_device_id struct variable and subsequent call to
MODULE_DEVICE_TABLE macro to support device tree.

Signed-off-by: default avatarJoão Seckler <joaoseckler@gmail.com>
Signed-off-by: default avatarLucas Oshiro <lucasseikioshiro@gmail.com>
Co-developed-by: default avatarLucas Oshiro <lucasseikioshiro@gmail.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent ed83144e
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -748,9 +748,19 @@ static const struct i2c_device_id ad7746_id[] = {

MODULE_DEVICE_TABLE(i2c, ad7746_id);

static const struct of_device_id ad7746_of_match[] = {
	{ .compatible = "adi,ad7745" },
	{ .compatible = "adi,ad7746" },
	{ .compatible = "adi,ad7747" },
	{ },
};

MODULE_DEVICE_TABLE(of, ad7746_of_match);

static struct i2c_driver ad7746_driver = {
	.driver = {
		.name = KBUILD_MODNAME,
		.of_match_table = ad7746_of_match,
	},
	.probe = ad7746_probe,
	.id_table = ad7746_id,