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

Commit 28771612 authored by Sahil Chandna's avatar Sahil Chandna
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 H/W 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 11979285
Loading
Loading
Loading
Loading
+10 −0
Original line number Original line Diff line number Diff line
@@ -67,6 +67,7 @@
#define CORE_FTRIM_CTRL_REG		0x1031
#define CORE_FTRIM_CTRL_REG		0x1031
#define TEMP_ALERT_LVL_MASK		GENMASK(6, 5)
#define TEMP_ALERT_LVL_MASK		GENMASK(6, 5)
#define TEMP_ALERT_LVL_SHIFT		5
#define TEMP_ALERT_LVL_SHIFT		5
#define TEMP_BUFFER_OUTPUT_BIT		BIT(7)


#define CORE_FTRIM_LVL_REG		0x1033
#define CORE_FTRIM_LVL_REG		0x1033
#define CFG_WIN_HI_MASK			GENMASK(3, 2)
#define CFG_WIN_HI_MASK			GENMASK(3, 2)
@@ -1822,6 +1823,15 @@ static int smb1390_slave_probe(struct smb1390 *chip)
	if (rc < 0)
	if (rc < 0)
		return rc;
		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);
	rc = smb1390_init_cps_psy(chip);
	if (rc < 0)
	if (rc < 0)
		pr_err("Couldn't initialize cps psy rc=%d\n", rc);
		pr_err("Couldn't initialize cps psy rc=%d\n", rc);