diff options
Diffstat (limited to 'drivers/regulator/max77693.c')
-rw-r--r-- | drivers/regulator/max77693.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/regulator/max77693.c b/drivers/regulator/max77693.c index 653a58b49cdf..c67ff05fc1dd 100644 --- a/drivers/regulator/max77693.c +++ b/drivers/regulator/max77693.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/mfd/max77693.h> | 31 | #include <linux/mfd/max77693.h> |
32 | #include <linux/mfd/max77693-private.h> | 32 | #include <linux/mfd/max77693-private.h> |
33 | #include <linux/regulator/of_regulator.h> | 33 | #include <linux/regulator/of_regulator.h> |
34 | #include <linux/regmap.h> | ||
34 | 35 | ||
35 | #define CHGIN_ILIM_STEP_20mA 20000 | 36 | #define CHGIN_ILIM_STEP_20mA 20000 |
36 | 37 | ||
@@ -39,9 +40,9 @@ | |||
39 | static int max77693_chg_is_enabled(struct regulator_dev *rdev) | 40 | static int max77693_chg_is_enabled(struct regulator_dev *rdev) |
40 | { | 41 | { |
41 | int ret; | 42 | int ret; |
42 | u8 val; | 43 | unsigned int val; |
43 | 44 | ||
44 | ret = max77693_read_reg(rdev->regmap, rdev->desc->enable_reg, &val); | 45 | ret = regmap_read(rdev->regmap, rdev->desc->enable_reg, &val); |
45 | if (ret) | 46 | if (ret) |
46 | return ret; | 47 | return ret; |
47 | 48 | ||
@@ -57,12 +58,11 @@ static int max77693_chg_get_current_limit(struct regulator_dev *rdev) | |||
57 | { | 58 | { |
58 | unsigned int chg_min_uA = rdev->constraints->min_uA; | 59 | unsigned int chg_min_uA = rdev->constraints->min_uA; |
59 | unsigned int chg_max_uA = rdev->constraints->max_uA; | 60 | unsigned int chg_max_uA = rdev->constraints->max_uA; |
60 | u8 reg, sel; | 61 | unsigned int reg, sel; |
61 | unsigned int val; | 62 | unsigned int val; |
62 | int ret; | 63 | int ret; |
63 | 64 | ||
64 | ret = max77693_read_reg(rdev->regmap, | 65 | ret = regmap_read(rdev->regmap, MAX77693_CHG_REG_CHG_CNFG_09, ®); |
65 | MAX77693_CHG_REG_CHG_CNFG_09, ®); | ||
66 | if (ret < 0) | 66 | if (ret < 0) |
67 | return ret; | 67 | return ret; |
68 | 68 | ||
@@ -96,7 +96,7 @@ static int max77693_chg_set_current_limit(struct regulator_dev *rdev, | |||
96 | /* the first four codes for charger current are all 60mA */ | 96 | /* the first four codes for charger current are all 60mA */ |
97 | sel += 3; | 97 | sel += 3; |
98 | 98 | ||
99 | return max77693_write_reg(rdev->regmap, | 99 | return regmap_write(rdev->regmap, |
100 | MAX77693_CHG_REG_CHG_CNFG_09, sel); | 100 | MAX77693_CHG_REG_CHG_CNFG_09, sel); |
101 | } | 101 | } |
102 | /* end of CHARGER regulator ops */ | 102 | /* end of CHARGER regulator ops */ |