aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/power/supply/axp288_charger.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2016-12-21 15:36:55 +0100
committerSebastian Reichel <sre@kernel.org>2017-01-04 22:03:08 +0100
commit8cffbe47e5986465a485290791f8dff7c2b0db3c (patch)
treef12f0b7e270f6df3f219d1ed461692d0ace9ee98 /drivers/power/supply/axp288_charger.c
parentpower: supply: axp288_charger: Get and process initial hardware-state (diff)
downloadwireguard-linux-8cffbe47e5986465a485290791f8dff7c2b0db3c.tar.xz
wireguard-linux-8cffbe47e5986465a485290791f8dff7c2b0db3c.zip
power: supply: axp288_charger: Fix wrong regmap_update_bits
To set a bit to 1 one needs to pass the mask for the bit to set as second argument into regmap_update_bits, not "1". Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
Diffstat (limited to 'drivers/power/supply/axp288_charger.c')
-rw-r--r--drivers/power/supply/axp288_charger.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/supply/axp288_charger.c b/drivers/power/supply/axp288_charger.c
index 42a6b9238d16..d3932cd77fb7 100644
--- a/drivers/power/supply/axp288_charger.c
+++ b/drivers/power/supply/axp288_charger.c
@@ -706,7 +706,7 @@ static int charger_init_hw_regs(struct axp288_chrg_info *info)
/* Do not turn-off charger o/p after charge cycle ends */
ret = regmap_update_bits(info->regmap,
AXP20X_CHRG_CTRL2,
- CNTL2_CHG_OUT_TURNON, 1);
+ CNTL2_CHG_OUT_TURNON, CNTL2_CHG_OUT_TURNON);
if (ret < 0) {
dev_err(&info->pdev->dev, "register(%x) write error(%d)\n",
AXP20X_CHRG_CTRL2, ret);