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

Commit 88697bc8 authored by Yue Ma's avatar Yue Ma
Browse files

cnss2: Update CPR voltage after comparing with BT CxMx voltage



As per requirement, the final CPR voltage being updated to RPMh
should be the larger one between the one sent from firmware and
BT CxMx which is a fixed value voltage.

Change-Id: I095cb30b3f82c50895af449e40950e88fa5fa874
Signed-off-by: default avatarYue Ma <yuem@codeaurora.org>
parent 609e424d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ static struct cnss_vreg_cfg cnss_vreg_list[] = {
#define TCS_CMD_OFFSET			0x10
#define MAX_TCS_NUM			8
#define MAX_TCS_CMD_NUM			5
#define BT_CXMX_VOLTAGE_MV		950

static int cnss_get_vreg_single(struct cnss_plat_data *plat_priv,
				struct cnss_vreg_info *vreg)
@@ -652,6 +653,8 @@ int cnss_update_cpr_info(struct cnss_plat_data *plat_priv)
	}

update_cpr:
	cpr_info->voltage = cpr_info->voltage > BT_CXMX_VOLTAGE_MV ?
		cpr_info->voltage : BT_CXMX_VOLTAGE_MV;
	cnss_pr_dbg("Update TCS CMD data address %pa with voltage %dmV\n",
		    &cpr_info->tcs_cmd_data_addr, cpr_info->voltage);
	writel_relaxed(cpr_info->voltage, cpr_info->tcs_cmd_data_addr_io);