10 #include <linux/slab.h>
11 #include <linux/module.h>
19 #include <linux/i2c.h>
36 .compatible =
"fsl,mc13892",
37 .data = (
void *) &mc13xxx_i2c_device_id[0],
44 static struct regmap_config mc13xxx_regmap_i2c_config = {
66 mc13xxx->
dev = &client->
dev;
70 &mc13xxx_regmap_i2c_config);
71 if (IS_ERR(mc13xxx->
regmap)) {
72 ret = PTR_ERR(mc13xxx->
regmap);
73 dev_err(mc13xxx->
dev,
"Failed to initialize register map: %d\n",
81 if (ret == 0 && (id->driver_data != mc13xxx->
ictype))
83 "device id doesn't match auto detection!\n");
97 static struct i2c_driver mc13xxx_i2c_driver = {
98 .id_table = mc13xxx_i2c_device_id,
102 .of_match_table = mc13xxx_dt_ids,
104 .probe = mc13xxx_i2c_probe,
108 static int __init mc13xxx_i2c_init(
void)
110 return i2c_add_driver(&mc13xxx_i2c_driver);
114 static void __exit mc13xxx_i2c_exit(
void)