mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 14:19:09 -04:00
Merge "asoc: codecs: wcd938x: Fix volatile register function"
This commit is contained in:
commit
e97d41b653
1 changed files with 5 additions and 3 deletions
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue