From: Axel Lin <axel.lin@ingics.com>
To: Mark Brown <broonie@kernel.org>
Cc: Erick Chen <erick.chen@spreadtrum.com>,
Baolin Wang <baolin.wang@spreadtrum.com>,
Liam Girdwood <lgirdwood@gmail.com>,
linux-kernel@vger.kernel.org, Axel Lin <axel.lin@ingics.com>
Subject: [PATCH] regulator: sc2731: Fix defines for SC2731_WR_UNLOCK and SC2731_PWR_WR_PROT_VALUE
Date: Fri, 29 Dec 2017 14:12:18 +0800 [thread overview]
Message-ID: <20171229061218.14766-1-axel.lin@ingics.com> (raw)
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
next reply other threads:[~2017-12-29 6:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-29 6:12 Axel Lin [this message]
2018-01-01 6:14 ` Erick Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171229061218.14766-1-axel.lin@ingics.com \
--to=axel.lin@ingics.com \
--cc=baolin.wang@spreadtrum.com \
--cc=broonie@kernel.org \
--cc=erick.chen@spreadtrum.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome