14 #include <linux/module.h>
17 #include <linux/slab.h>
18 #include <linux/i2c.h>
28 static struct regmap_config smsc_regmap_config = {
35 static int smsc_i2c_probe(
struct i2c_client *i2c,
45 dev_err(&i2c->
dev,
"smsc mfd driver memory allocation failed\n");
50 if (IS_ERR(smsc->
regmap)) {
51 ret = PTR_ERR(smsc->
regmap);
55 i2c_set_clientdata(i2c, smsc);
59 of_property_read_u32(i2c->
dev.of_node,
"clock", &smsc->
clk);
67 dev_info(&i2c->
dev,
"SMSCxxx devid: %02x rev: %02x venid: %02x\n",
68 devid, rev, (venid_h << 8) | venid_l);
76 ret = of_platform_populate(i2c->
dev.of_node,
84 static int smsc_i2c_remove(
struct i2c_client *i2c)
86 struct smsc *smsc = i2c_get_clientdata(i2c);
104 .probe = smsc_i2c_probe,
105 .remove = smsc_i2c_remove,
106 .id_table = smsc_i2c_id,