16 #include <linux/module.h>
20 #include <linux/i2c.h>
24 #include <linux/slab.h>
26 static int wm8350_i2c_probe(
struct i2c_client *i2c,
37 if (IS_ERR(wm8350->
regmap)) {
38 ret = PTR_ERR(wm8350->
regmap);
39 dev_err(&i2c->
dev,
"Failed to allocate register map: %d\n",
44 i2c_set_clientdata(i2c, wm8350);
50 static int wm8350_i2c_remove(
struct i2c_client *i2c)
52 struct wm8350 *wm8350 = i2c_get_clientdata(i2c);
73 .probe = wm8350_i2c_probe,
74 .remove = wm8350_i2c_remove,
75 .id_table = wm8350_i2c_id,
78 static int __init wm8350_i2c_init(
void)
80 return i2c_add_driver(&wm8350_i2c_driver);
85 static void __exit wm8350_i2c_exit(
void)