diff mbox

[V2,4/6] mfd: tps6507x: add device-tree support.

Message ID 1359445134-13323-5-git-send-email-manishv.b@ti.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Vishwanathrao Badarkhe, Manish Jan. 29, 2013, 7:38 a.m. UTC
Add device tree based initialization support for TI's
tps6507x mfd device.

Signed-off-by: Vishwanathrao Badarkhe, Manish <manishv.b@ti.com>
---
Changes since V1:
 - updated subject line for commit.

:100644 100644 409afa2... 5ad4b77... M	drivers/mfd/tps6507x.c
 drivers/mfd/tps6507x.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

Comments

Samuel Ortiz Feb. 3, 2013, 10:31 p.m. UTC | #1
Hi Manish,

On Tue, Jan 29, 2013 at 01:08:52PM +0530, Vishwanathrao Badarkhe, Manish wrote:
> Add device tree based initialization support for TI's
> tps6507x mfd device.
> 
> Signed-off-by: Vishwanathrao Badarkhe, Manish <manishv.b@ti.com>
> ---
> Changes since V1:
>  - updated subject line for commit.
> 
> :100644 100644 409afa2... 5ad4b77... M	drivers/mfd/tps6507x.c
>  drivers/mfd/tps6507x.c |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
Applied, thanks.

Cheers,
Samuel.
diff mbox

Patch

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 <linux/init.h>
 #include <linux/slab.h>
 #include <linux/i2c.h>
+#include <linux/of_device.h>
 #include <linux/mfd/core.h>
 #include <linux/mfd/tps6507x.h>
 
@@ -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,