From: Vishwanathrao Badarkhe, Manish Date: Thu, 24 Jan 2013 10:55:17 +0000 (+0530) Subject: mfd: tps6507x: Add DT support X-Git-Tag: v3.9-rc1~92^2~34 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=154c4c7b613049168e2923d096b7c2d100ba8a6a;p=platform%2Fkernel%2Flinux-exynos.git mfd: tps6507x: Add DT support Add device tree based initialization support for TI's tps6507x mfd device. Signed-off-by: Vishwanathrao Badarkhe, Manish Signed-off-by: Samuel Ortiz --- diff --git a/drivers/mfd/tps6507x.c b/drivers/mfd/tps6507x.c index 409afa2..5ad4b77 100644 --- a/drivers/mfd/tps6507x.c +++ b/drivers/mfd/tps6507x.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -116,11 +117,19 @@ static const struct i2c_device_id tps6507x_i2c_id[] = { }; MODULE_DEVICE_TABLE(i2c, tps6507x_i2c_id); +#ifdef CONFIG_OF +static struct of_device_id tps6507x_of_match[] = { + {.compatible = "ti,tps6507x", }, + {}, +}; +MODULE_DEVICE_TABLE(of, tps6507x_of_match); +#endif static struct i2c_driver tps6507x_i2c_driver = { .driver = { .name = "tps6507x", .owner = THIS_MODULE, + .of_match_table = of_match_ptr(tps6507x_of_match), }, .probe = tps6507x_i2c_probe, .remove = tps6507x_i2c_remove,