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

Commit 3cf508f6 authored by Bhalchandra Gajare's avatar Bhalchandra Gajare Committed by Gerrit - the friendly Code Review server
Browse files

mfd: wcd934x: Mark CPE registers as volatile



Currently only read-only registers are marked as volatile. It is
possible that some registers could be read-write and still have
subset of the bits that are updated by the hardware. Add change
to mark such CPE (codec processing engine) register as volatile.

CRs-Fixed: 1049012
Change-Id: I1cedf646d0df1ab5968df4830502649de305c9d1
Signed-off-by: default avatarBhalchandra Gajare <gajare@codeaurora.org>
parent ec9fd7cc
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -1848,6 +1848,15 @@ static bool wcd934x_is_volatile_register(struct device *dev, unsigned int reg)
	if (reg_tbl && reg_tbl[reg_offset] == WCD934X_READ)
	if (reg_tbl && reg_tbl[reg_offset] == WCD934X_READ)
		return true;
		return true;


	/*
	 * Need to mark volatile for registers that are writable but
	 * only few bits are read-only
	 */
	switch (reg) {
	case WCD934X_CPE_SS_SOC_SW_COLLAPSE_CTL:
		return true;
	}

	return false;
	return false;
}
}