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

Commit df93e594 authored by Phani Kumar Uppalapati's avatar Phani Kumar Uppalapati
Browse files

driver: mfd: Mark RCO calibration registers are volatile



RCO calibration codec registers are read only and they can
be modified at any time during codec operation. Mark them as
volatile so that reads to these registers always happen from
hardware instead of cache.

CRs-Fixed: 974785
Change-Id: I1fb66ca19d0889aa7e21f433f8722af7b527705c
Signed-off-by: default avatarPhani Kumar Uppalapati <phaniu@codeaurora.org>
parent 1b1ec93f
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2015, The Linux Foundation. All rights reserved.
 * Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -1532,6 +1532,10 @@ static bool wcd9335_is_volatile_register(struct device *dev, unsigned int reg)
	    reg <= WCD9335_CPE_SS_OUTBOX2_ACK)
		return true;

	if (reg >= WCD9335_RCO_CAL_OUT_1 &&
	    reg <= WCD9335_RCO_CAL_OUT_5)
		return true;

	switch (reg) {
	case WCD9335_CPE_SS_INBOX1_TRG:
	case WCD9335_CPE_SS_INBOX2_TRG: