summaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorRobert Baldyga <r.baldyga@samsung.com>2014-05-21 08:52:47 +0200
committerLee Jones <lee.jones@linaro.org>2014-06-17 15:16:10 +0100
commitd0540f91cf74fab90e1143d8d40da8a5b5fabc8a (patch)
tree92f7a18906c67cbc598a4e2b182eea34699fcd97 /drivers/regulator
parent7171511eaec5bf23fb06078f59784a3a0626b38f (diff)
downloadop-kernel-dev-d0540f91cf74fab90e1143d8d40da8a5b5fabc8a.zip
op-kernel-dev-d0540f91cf74fab90e1143d8d40da8a5b5fabc8a.tar.gz
mfd: max77693: Remove unnecessary wrapper functions
This patch removes wrapper functions used to access regmap, and make driver using regmap_*() functions instead. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Acked-by: Mark Brown <broonie@linaro.org> Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/max77693.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/regulator/max77693.c b/drivers/regulator/max77693.c
index 653a58b..c67ff05 100644
--- a/drivers/regulator/max77693.c
+++ b/drivers/regulator/max77693.c
@@ -31,6 +31,7 @@
#include <linux/mfd/max77693.h>
#include <linux/mfd/max77693-private.h>
#include <linux/regulator/of_regulator.h>
+#include <linux/regmap.h>
#define CHGIN_ILIM_STEP_20mA 20000
@@ -39,9 +40,9 @@
static int max77693_chg_is_enabled(struct regulator_dev *rdev)
{
int ret;
- u8 val;
+ unsigned int val;
- ret = max77693_read_reg(rdev->regmap, rdev->desc->enable_reg, &val);
+ ret = regmap_read(rdev->regmap, rdev->desc->enable_reg, &val);
if (ret)
return ret;
@@ -57,12 +58,11 @@ static int max77693_chg_get_current_limit(struct regulator_dev *rdev)
{
unsigned int chg_min_uA = rdev->constraints->min_uA;
unsigned int chg_max_uA = rdev->constraints->max_uA;
- u8 reg, sel;
+ unsigned int reg, sel;
unsigned int val;
int ret;
- ret = max77693_read_reg(rdev->regmap,
- MAX77693_CHG_REG_CHG_CNFG_09, &reg);
+ ret = regmap_read(rdev->regmap, MAX77693_CHG_REG_CHG_CNFG_09, &reg);
if (ret < 0)
return ret;
@@ -96,7 +96,7 @@ static int max77693_chg_set_current_limit(struct regulator_dev *rdev,
/* the first four codes for charger current are all 60mA */
sel += 3;
- return max77693_write_reg(rdev->regmap,
+ return regmap_write(rdev->regmap,
MAX77693_CHG_REG_CHG_CNFG_09, sel);
}
/* end of CHARGER regulator ops */
OpenPOWER on IntegriCloud