diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2018-01-15 20:59:01 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-01-16 08:22:48 -0500 |
commit | 3d3dd0d3ac207e8d28f6289896b99c1c0dad2fbe (patch) | |
tree | 4d68c705bd653db0d492d70333c4375103d3e227 | |
parent | c4305af43a80158fba0d2801be9a0e774634add0 (diff) |
ASoC: tlv320dac33: fix regression by adding back .read/.write
commit c4305af43a8 ("ASoC: use internal reg_cache on tlv320dac33")
removed .read/.write from driver, but it might breaks non-regmap
driver, because ALSA SoC framework might call it.
To fix this regression, this patch back .read/.write
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/codecs/tlv320dac33.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c index 675f5b1b90a6..8c71d2f876ff 100644 --- a/sound/soc/codecs/tlv320dac33.c +++ b/sound/soc/codecs/tlv320dac33.c | |||
@@ -246,6 +246,19 @@ static int dac33_write(struct snd_soc_codec *codec, unsigned int reg, | |||
246 | return ret; | 246 | return ret; |
247 | } | 247 | } |
248 | 248 | ||
249 | static int dac33_write_locked(struct snd_soc_codec *codec, unsigned int reg, | ||
250 | unsigned int value) | ||
251 | { | ||
252 | struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec); | ||
253 | int ret; | ||
254 | |||
255 | mutex_lock(&dac33->mutex); | ||
256 | ret = dac33_write(codec, reg, value); | ||
257 | mutex_unlock(&dac33->mutex); | ||
258 | |||
259 | return ret; | ||
260 | } | ||
261 | |||
249 | #define DAC33_I2C_ADDR_AUTOINC 0x80 | 262 | #define DAC33_I2C_ADDR_AUTOINC 0x80 |
250 | static int dac33_write16(struct snd_soc_codec *codec, unsigned int reg, | 263 | static int dac33_write16(struct snd_soc_codec *codec, unsigned int reg, |
251 | unsigned int value) | 264 | unsigned int value) |
@@ -1422,6 +1435,8 @@ static int dac33_soc_remove(struct snd_soc_codec *codec) | |||
1422 | } | 1435 | } |
1423 | 1436 | ||
1424 | static const struct snd_soc_codec_driver soc_codec_dev_tlv320dac33 = { | 1437 | static const struct snd_soc_codec_driver soc_codec_dev_tlv320dac33 = { |
1438 | .read = dac33_read_reg_cache, | ||
1439 | .write = dac33_write_locked, | ||
1425 | .set_bias_level = dac33_set_bias_level, | 1440 | .set_bias_level = dac33_set_bias_level, |
1426 | .idle_bias_off = true, | 1441 | .idle_bias_off = true, |
1427 | 1442 | ||