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

Commit 65725471 authored by Mark Brown's avatar Mark Brown
Browse files

ASoC: io: Remove support for ASoC cache in conjunction with regmap



Since all regmap CODECs should be (and are) using the more advance regmap
cache infrastructure remove the code which supports that and just proxy
I/O straight through to regmap.

Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent a32c17b8
Loading
Loading
Loading
Loading
+4 −31
Original line number Original line Diff line number Diff line
@@ -23,21 +23,6 @@
static int hw_write(struct snd_soc_codec *codec, unsigned int reg,
static int hw_write(struct snd_soc_codec *codec, unsigned int reg,
		    unsigned int value)
		    unsigned int value)
{
{
	int ret;

	if (!snd_soc_codec_volatile_register(codec, reg) &&
	    reg < codec->driver->reg_cache_size &&
	    !codec->cache_bypass) {
		ret = snd_soc_cache_write(codec, reg, value);
		if (ret < 0)
			return -1;
	}

	if (codec->cache_only) {
		codec->cache_sync = 1;
		return 0;
	}

	return regmap_write(codec->control_data, reg, value);
	return regmap_write(codec->control_data, reg, value);
}
}


@@ -46,12 +31,6 @@ static unsigned int hw_read(struct snd_soc_codec *codec, unsigned int reg)
	int ret;
	int ret;
	unsigned int val;
	unsigned int val;


	if (reg >= codec->driver->reg_cache_size ||
	    snd_soc_codec_volatile_register(codec, reg) ||
	    codec->cache_bypass) {
		if (codec->cache_only)
			return -1;

	ret = regmap_read(codec->control_data, reg, &val);
	ret = regmap_read(codec->control_data, reg, &val);
	if (ret == 0)
	if (ret == 0)
		return val;
		return val;
@@ -59,12 +38,6 @@ static unsigned int hw_read(struct snd_soc_codec *codec, unsigned int reg)
		return -1;
		return -1;
}
}


	ret = snd_soc_cache_read(codec, reg, &val);
	if (ret < 0)
		return -1;
	return val;
}

/**
/**
 * snd_soc_codec_set_cache_io: Set up standard I/O functions.
 * snd_soc_codec_set_cache_io: Set up standard I/O functions.
 *
 *