14 #include <linux/module.h>
15 #include <linux/device.h>
16 #include <linux/i2c.h>
32 if (IS_ERR(da9055->
regmap)) {
33 ret = PTR_ERR(da9055->
regmap);
34 dev_err(&i2c->
dev,
"Failed to allocate register map: %d\n",
42 i2c_set_clientdata(i2c, da9055);
49 struct da9055 *da9055 = i2c_get_clientdata(i2c);
62 .probe = da9055_i2c_probe,
64 .id_table = da9055_i2c_id,
71 static int __init da9055_i2c_init(
void)
75 ret = i2c_add_driver(&da9055_i2c_driver);
77 pr_err(
"DA9055 I2C registration failed %d\n", ret);
85 static void __exit da9055_i2c_exit(
void)