aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2018-01-01 20:38:50 +0800
committerMark Brown <broonie@kernel.org>2018-01-03 12:10:14 +0000
commitfa32f7a3fedd800161ca529397da14faa6c47c67 (patch)
tree748af901dfa1a62bc4d0814dc3c4f257411aae1d /drivers/regulator
parentregulator: sc2731: Add regulator driver to support Spreadtrum SC2731 PMIC (diff)
downloadlinux-dev-fa32f7a3fedd800161ca529397da14faa6c47c67.tar.xz
linux-dev-fa32f7a3fedd800161ca529397da14faa6c47c67.zip
regulator: sc2731: Fix defines for SC2731_WR_UNLOCK and SC2731_PWR_WR_PROT_VALUE
The defines for SC2731_WR_UNLOCK and SC2731_PWR_WR_PROT_VALUE makes regmap_write() call looks strange because it takes reg parameter fist then val. Base on Erick's suggestion to define SC2731_PWR_WR_PROT and SC2731_WR_UNLOCK_VALUE instead. Signed-off-by: Axel Lin <axel.lin@ingics.com> Reviewed-by: Erick Chen <erick.chen@spreadtrum.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/sc2731-regulator.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/regulator/sc2731-regulator.c b/drivers/regulator/sc2731-regulator.c
index 794fcd504b3d..eb2bdf060b7b 100644
--- a/drivers/regulator/sc2731-regulator.c
+++ b/drivers/regulator/sc2731-regulator.c
@@ -13,8 +13,8 @@
/*
* SC2731 regulator lock register
*/
-#define SC2731_PWR_WR_PROT_VALUE 0xf0c
-#define SC2731_WR_UNLOCK 0x6e7f
+#define SC2731_PWR_WR_PROT 0xf0c
+#define SC2731_WR_UNLOCK_VALUE 0x6e7f
/*
* SC2731 enable register
@@ -203,8 +203,8 @@ static struct regulator_desc regulators[] = {
static int sc2731_regulator_unlock(struct regmap *regmap)
{
- return regmap_write(regmap, SC2731_PWR_WR_PROT_VALUE,
- SC2731_WR_UNLOCK);
+ return regmap_write(regmap, SC2731_PWR_WR_PROT,
+ SC2731_WR_UNLOCK_VALUE);
}
static int sc2731_regulator_probe(struct platform_device *pdev)