Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: tps6507x: Add DT support

Add device tree based initialization support for TI's
tps6507x mfd device.

Signed-off-by: Vishwanathrao Badarkhe, Manish <manishv.b@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>

authored by

Vishwanathrao Badarkhe, Manish and committed by
Samuel Ortiz
154c4c7b 306df798

+9
+9
drivers/mfd/tps6507x.c
··· 19 19 #include <linux/init.h> 20 20 #include <linux/slab.h> 21 21 #include <linux/i2c.h> 22 + #include <linux/of_device.h> 22 23 #include <linux/mfd/core.h> 23 24 #include <linux/mfd/tps6507x.h> 24 25 ··· 117 116 }; 118 117 MODULE_DEVICE_TABLE(i2c, tps6507x_i2c_id); 119 118 119 + #ifdef CONFIG_OF 120 + static struct of_device_id tps6507x_of_match[] = { 121 + {.compatible = "ti,tps6507x", }, 122 + {}, 123 + }; 124 + MODULE_DEVICE_TABLE(of, tps6507x_of_match); 125 + #endif 120 126 121 127 static struct i2c_driver tps6507x_i2c_driver = { 122 128 .driver = { 123 129 .name = "tps6507x", 124 130 .owner = THIS_MODULE, 131 + .of_match_table = of_match_ptr(tps6507x_of_match), 125 132 }, 126 133 .probe = tps6507x_i2c_probe, 127 134 .remove = tps6507x_i2c_remove,