lkml.org 
[lkml]   [2017]   [Dec]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] regulator: sc2731: Fix defines for SC2731_WR_UNLOCK and SC2731_PWR_WR_PROT_VALUE
Date
The define for SC2731_WR_UNLOCK and SC2731_PWR_WR_PROT_VALUE are
swapped, so the code calling regmap_write() looks strange. Fix it.
regmap_write takes reg parameter first then val.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
Hi Erick,
I don't have the datasheet. Can you check this?
Thanks,
Axel
drivers/regulator/sc2731-regulator.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/regulator/sc2731-regulator.c b/drivers/regulator/sc2731-regulator.c
index 794fcd504b3d..7f2b137bb98a 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_WR_UNLOCK 0xf0c
+#define SC2731_PWR_WR_PROT_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_WR_UNLOCK,
+ SC2731_PWR_WR_PROT_VALUE);
}

static int sc2731_regulator_probe(struct platform_device *pdev)
--
2.14.1
\
 
 \ /
  Last update: 2017-12-29 07:13    [W:0.017 / U:3.980 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site