mfd: wcd9335-regmap: Mark necessary CPE registers volatile
Some of the CPE registers can be updated by the codec hardware to indicate the CPE status. Mark these registers as volatile so that read or write for these registers always goes to the codec hardware bypassing the register cache. Change-Id: I2c1e15b84b19136649f83072a6b0ca35f93c73a3 Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
This commit is contained in:
parent
744ac4d0d5
commit
2f958717c4
|
@ -1327,6 +1327,15 @@ static bool wcd9335_is_volatile_register(struct device *dev, unsigned int reg)
|
|||
(reg <= WCD9335_CDC_SIDETONE_IIR1_IIR_COEF_B2_CTL))
|
||||
return true;
|
||||
|
||||
/*
|
||||
* CPE inbox and outbox registers are volatile
|
||||
* since they can be updated in the codec hardware
|
||||
* to indicate CPE status
|
||||
*/
|
||||
if (reg >= WCD9335_CPE_SS_MEM_PTR_0 &&
|
||||
reg <= WCD9335_CPE_SS_OUTBOX2_ACK)
|
||||
return true;
|
||||
|
||||
switch (reg) {
|
||||
case WCD9335_CPE_SS_INBOX1_TRG:
|
||||
case WCD9335_CPE_SS_INBOX2_TRG:
|
||||
|
@ -1357,6 +1366,9 @@ static bool wcd9335_is_volatile_register(struct device *dev, unsigned int reg)
|
|||
case WCD9335_ANA_MBHC_ELECT:
|
||||
case WCD9335_ANA_MBHC_ZDET:
|
||||
case WCD9335_ANA_MICB2:
|
||||
case WCD9335_CPE_SS_SS_ERROR_INT_STATUS:
|
||||
case WCD9335_CPE_SS_STATUS:
|
||||
case WCD9335_CPE_SS_BACKUP_INT:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue