aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-io.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/soc-io.c')
-rw-r--r--sound/soc/soc-io.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/sound/soc/soc-io.c b/sound/soc/soc-io.c
index 122c0c18b9dd..4f11d23f2062 100644
--- a/sound/soc/soc-io.c
+++ b/sound/soc/soc-io.c
@@ -65,31 +65,6 @@ static unsigned int hw_read(struct snd_soc_codec *codec, unsigned int reg)
65 return val; 65 return val;
66} 66}
67 67
68/* Primitive bulk write support for soc-cache. The data pointed to by
69 * `data' needs to already be in the form the hardware expects. Any
70 * data written through this function will not go through the cache as
71 * it only handles writing to volatile or out of bounds registers.
72 *
73 * This is currently only supported for devices using the regmap API
74 * wrappers.
75 */
76static int snd_soc_hw_bulk_write_raw(struct snd_soc_codec *codec,
77 unsigned int reg,
78 const void *data, size_t len)
79{
80 /* To ensure that we don't get out of sync with the cache, check
81 * whether the base register is volatile or if we've directly asked
82 * to bypass the cache. Out of bounds registers are considered
83 * volatile.
84 */
85 if (!codec->cache_bypass
86 && !snd_soc_codec_volatile_register(codec, reg)
87 && reg < codec->driver->reg_cache_size)
88 return -EINVAL;
89
90 return regmap_raw_write(codec->control_data, reg, data, len);
91}
92
93/** 68/**
94 * snd_soc_codec_set_cache_io: Set up standard I/O functions. 69 * snd_soc_codec_set_cache_io: Set up standard I/O functions.
95 * 70 *
@@ -119,7 +94,6 @@ int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec,
119 memset(&config, 0, sizeof(config)); 94 memset(&config, 0, sizeof(config));
120 codec->write = hw_write; 95 codec->write = hw_write;
121 codec->read = hw_read; 96 codec->read = hw_read;
122 codec->bulk_write_raw = snd_soc_hw_bulk_write_raw;
123 97
124 config.reg_bits = addr_bits; 98 config.reg_bits = addr_bits;
125 config.val_bits = data_bits; 99 config.val_bits = data_bits;