14 #include <linux/module.h>
18 #include <linux/slab.h>
19 #include <linux/i2c.h>
29 static struct mfd_cell s5m8751_devs[] = {
31 .name =
"s5m8751-pmic",
33 .name =
"s5m-charger",
35 .name =
"s5m8751-codec",
39 static struct mfd_cell s5m8763_devs[] = {
41 .name =
"s5m8763-pmic",
45 .name =
"s5m-charger",
49 static struct mfd_cell s5m8767_devs[] = {
51 .name =
"s5m8767-pmic",
57 static struct mfd_cell s2mps11_devs[] = {
59 .name =
"s2mps11-pmic",
93 static struct regmap_config sec_regmap_config = {
98 static int sec_pmic_probe(
struct i2c_client *i2c,
107 if (sec_pmic ==
NULL)
110 i2c_set_clientdata(i2c, sec_pmic);
111 sec_pmic->
dev = &i2c->
dev;
114 sec_pmic->
type =
id->driver_data;
118 sec_pmic->
ono = pdata->
ono;
124 if (IS_ERR(sec_pmic->
regmap)) {
125 ret = PTR_ERR(sec_pmic->
regmap);
126 dev_err(&i2c->
dev,
"Failed to allocate register map: %d\n",
132 i2c_set_clientdata(sec_pmic->
rtc, sec_pmic);
139 pm_runtime_set_active(sec_pmic->
dev);
175 static int sec_pmic_remove(
struct i2c_client *i2c)
177 struct sec_pmic_dev *sec_pmic = i2c_get_clientdata(i2c);
196 .probe = sec_pmic_probe,
197 .remove = sec_pmic_remove,
198 .id_table = sec_pmic_id,
201 static int __init sec_pmic_init(
void)
203 return i2c_add_driver(&sec_pmic_driver);
208 static void __exit sec_pmic_exit(
void)