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

Commit 9ad08d7c authored by Subbaraman Narayanamurthy's avatar Subbaraman Narayanamurthy
Browse files

Revert "power: qpnp-fg-gen4: Enable parallel charging current measurement"



This reverts commit 1b7e5a86.

Enabling parallel charging current measurement causes ADC to lock
up when this register write happens right in the middle of a
conversion cycle. Keep it disabled until the proper way to enable
it is found.

CRs-Fixed: 2305615
Change-Id: I08e6e887fb11bca2e582091308798fec3c29357d
Signed-off-by: default avatarSubbaraman Narayanamurthy <subbaram@codeaurora.org>
parent 2fe3bbf5
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -268,9 +268,6 @@
#define BATT_INFO_IADC_MSB(chip)		(chip->batt_info_base + 0xAF)
#define IADC_MSB_MASK				GENMASK(6, 0)

#define BATT_INFO_FG_CNV_CHAR_CFG(chip)		(chip->batt_info_base + 0xB7)
#define SMB_MEASURE_EN_BIT			BIT(2)

#define BATT_INFO_TM_MISC(chip)			(chip->batt_info_base + 0xE5)
#define FORCE_SEQ_RESP_TOGGLE_BIT		BIT(6)
#define ALG_DIRECT_VALID_DATA_BIT		BIT(5)
+0 −9
Original line number Diff line number Diff line
@@ -3613,15 +3613,6 @@ static int fg_gen4_hw_init(struct fg_gen4_chip *chip)
	int rc;
	u8 buf[4], val, mask;

	/* Enable measurement of parallel charging current */
	val = mask = SMB_MEASURE_EN_BIT;
	rc = fg_masked_write(fg, BATT_INFO_FG_CNV_CHAR_CFG(fg), mask, val);
	if (rc < 0) {
		pr_err("Error in writing to 0x%04x, rc=%d\n",
			BATT_INFO_FG_CNV_CHAR_CFG(fg), rc);
		return rc;
	}

	fg_encode(fg->sp, FG_SRAM_CUTOFF_VOLT, chip->dt.cutoff_volt_mv, buf);
	rc = fg_sram_write(fg, fg->sp[FG_SRAM_CUTOFF_VOLT].addr_word,
			fg->sp[FG_SRAM_CUTOFF_VOLT].addr_byte, buf,