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

Commit b523954d authored by Guru Das Srinagesh's avatar Guru Das Srinagesh Committed by Umang Agrawal
Browse files

power: smb1355: Raise PCL value for SMB1354



For SMB1354, set peak current limit to 8.6A as the previous limit, 5.6 A
was found to be too low during testing. The previous limit was set in
CSIR.

CRs-Fixed: 2215592
Change-Id: I9ab18b0b7756e751cd003ae15ffb8e0b464d515c
Signed-off-by: default avatarGuru Das Srinagesh <gurus@codeaurora.org>
parent a2e53991
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@
#include <linux/power_supply.h>
#include <linux/workqueue.h>
#include <linux/pmic-voter.h>
#include <linux/string.h>

/* SMB1355 registers, different than mentioned in smb-reg.h */

@@ -125,6 +126,7 @@

#define MISC_CUST_SDCDC_ILIMIT_CFG_REG		(MISC_BASE + 0xA1)
#define LS_VALLEY_THRESH_PCT_BIT		BIT(3)
#define PCL_LIMIT_MASK				GENMASK(1, 0)

#define SNARL_BARK_BITE_WD_CFG_REG		(MISC_BASE + 0x53)
#define BITE_WDOG_DISABLE_CHARGING_CFG_BIT	BIT(7)
@@ -1025,6 +1027,16 @@ static int smb1355_init_hw(struct smb1355 *chip)
		return rc;
	}

	/* For SMB1354, set PCL to 8.6 A */
	if (!strcmp(chip->name, "smb1354")) {
		rc = smb1355_masked_write(chip, MISC_CUST_SDCDC_ILIMIT_CFG_REG,
				PCL_LIMIT_MASK, PCL_LIMIT_MASK);
		if (rc < 0) {
			pr_err("Couldn't set PCL limit to 8.6A rc=%d\n", rc);
			return rc;
		}
	}

	rc = smb1355_tskin_sensor_config(chip);
	if (rc < 0) {
		pr_err("Couldn't configure tskin regs rc=%d\n", rc);