asoc: codecs: wcd938x: Fix volatile register function
Fix the volatile register function to return false if the registers are not volatile so that the reads will happen from cache and this improves read timing. Change-Id: I73149be3855be09a71ad61a6f3143038a7ba029b Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Cette révision appartient à :

révisé par
Gerrit - the friendly Code Review server

Parent
c63ec8cd8f
révision
9e013b2d5a
@@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2018, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/regmap.h>
|
||||
@@ -494,8 +494,10 @@ static bool wcd938x_volatile_register(struct device *dev, unsigned int reg)
|
||||
{
|
||||
if(reg <= WCD938X_BASE_ADDRESS)
|
||||
return 0;
|
||||
return (wcd938x_reg_access[WCD938X_REG(reg)] & RD_REG)
|
||||
& ~(wcd938x_reg_access[WCD938X_REG(reg)] & WR_REG);
|
||||
if ((wcd938x_reg_access[WCD938X_REG(reg)] & RD_REG)
|
||||
&& !(wcd938x_reg_access[WCD938X_REG(reg)] & WR_REG))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
struct regmap_config wcd938x_regmap_config = {
|
||||
|
Référencer dans un nouveau ticket
Bloquer un utilisateur