18 #include <linux/kernel.h>
19 #include <linux/module.h>
24 #include <linux/i2c.h>
25 #include <linux/slab.h>
27 #define ISL6271A_VOLTAGE_MIN 850000
28 #define ISL6271A_VOLTAGE_MAX 1600000
29 #define ISL6271A_VOLTAGE_STEP 50000
53 static int isl6271a_set_voltage_sel(
struct regulator_dev *dev,
70 .get_voltage_sel = isl6271a_get_voltage_sel,
71 .set_voltage_sel = isl6271a_set_voltage_sel,
94 .ops = &isl_fixed_ops,
102 .ops = &isl_fixed_ops,
128 for (i = 0; i < 3; i++) {
137 if (IS_ERR(pmic->
rdev[i])) {
139 err = PTR_ERR(pmic->
rdev[i]);
144 i2c_set_clientdata(i2c, pmic);
156 struct isl_pmic *pmic = i2c_get_clientdata(i2c);
159 for (i = 0; i < 3; i++)
165 {.name =
"isl6271a", 0 },
171 static struct i2c_driver isl6271a_i2c_driver = {
176 .probe = isl6271a_probe,
178 .id_table = isl6271a_id,
181 static int __init isl6271a_init(
void)
183 return i2c_add_driver(&isl6271a_i2c_driver);
186 static void __exit isl6271a_cleanup(
void)