Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 050f9f97 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "power: smb1351: Enable battery-charging by default"

parents bea88d59 1bd6ff71
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
/* Copyright (c) 2015 The Linux Foundation. All rights reserved.
/* Copyright (c) 2015-2016 The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -682,7 +682,7 @@ static int smb1351_battchg_disable(struct smb1351_charger *chip,
	rc = smb1351_masked_write(chip, CMD_CHG_REG, CMD_CHG_EN_BIT,
					disabled ? 0 : CMD_CHG_ENABLE);
	if (rc)
		pr_err("Couldn't %s charging rc=%d\n",
		pr_err("Couldn't %s battery-charging rc=%d\n",
					disable ? "disable" : "enable", rc);
	else
		chip->battchg_disabled_status = disabled;
@@ -962,6 +962,11 @@ static int smb1351_hw_init(struct smb1351_charger *chip)
		return rc;
	}

	/* Enable charging before we move into register based CHG_EN control */
	rc = smb1351_battchg_disable(chip, USER, chip->usb_suspended_status);
	if (rc)
		return rc;

	/* setup battery missing source */
	reg = BATT_MISSING_THERM_PIN_SOURCE_BIT;
	mask = BATT_MISSING_THERM_PIN_SOURCE_BIT;