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

Commit e97d41b6 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "asoc: codecs: wcd938x: Fix volatile register function"

parents 2251014f 9e013b2d
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
// 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 = {