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

Commit 9876434e authored by Sahil Chandna's avatar Sahil Chandna Committed by Gerrit - the friendly Code Review server
Browse files

power: smb1390-psy: Configure temperature output buffer to High-Z state



Configure temperature buffer output of slave CP to high impedance
since in HW we are only reading temperature for Master CP and
temperature of slave CP is assumed same as that of Master due to
physical proximity between them.

Change-Id: I4f9b8bf0baaf7435c3770bb573bb1a27dd5062b6
Signed-off-by: default avatarSahil Chandna <chandna@codeaurora.org>
parent 6687a60d
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -74,6 +74,7 @@
#define CORE_FTRIM_CTRL_REG		0x1031
#define TEMP_ALERT_LVL_MASK		GENMASK(6, 5)
#define TEMP_ALERT_LVL_SHIFT		5
#define TEMP_BUFFER_OUTPUT_BIT		BIT(7)

#define CORE_FTRIM_LVL_REG		0x1033
#define CFG_WIN_HI_MASK			GENMASK(3, 2)
@@ -1829,6 +1830,15 @@ static int smb1390_slave_probe(struct smb1390 *chip)
	if (rc < 0)
		return rc;

	/* Configure Slave CP Temp buffer O/P to High Impedance */
	rc = smb1390_masked_write(chip, CORE_FTRIM_CTRL_REG,
				  TEMP_BUFFER_OUTPUT_BIT,
				  TEMP_BUFFER_OUTPUT_BIT);
	if (rc < 0) {
		pr_err("Couldn't configure Slave temp Buffer rc=%d\n", rc);
		return rc;
	}

	rc = smb1390_init_cps_psy(chip);
	if (rc < 0)
		pr_err("Couldn't initialize cps psy rc=%d\n", rc);