aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/sound/soc.h3
-rw-r--r--sound/soc/soc-core.c7
-rw-r--r--sound/soc/soc-io.c26
3 files changed, 0 insertions, 36 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 447278a3b3e6..3f7de6f992c0 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -686,7 +686,6 @@ struct snd_soc_codec {
686 unsigned int (*hw_read)(struct snd_soc_codec *, unsigned int); 686 unsigned int (*hw_read)(struct snd_soc_codec *, unsigned int);
687 unsigned int (*read)(struct snd_soc_codec *, unsigned int); 687 unsigned int (*read)(struct snd_soc_codec *, unsigned int);
688 int (*write)(struct snd_soc_codec *, unsigned int, unsigned int); 688 int (*write)(struct snd_soc_codec *, unsigned int, unsigned int);
689 int (*bulk_write_raw)(struct snd_soc_codec *, unsigned int, const void *, size_t);
690 void *reg_cache; 689 void *reg_cache;
691 const void *reg_def_copy; 690 const void *reg_def_copy;
692 const struct snd_soc_cache_ops *cache_ops; 691 const struct snd_soc_cache_ops *cache_ops;
@@ -1097,8 +1096,6 @@ struct soc_enum {
1097unsigned int snd_soc_read(struct snd_soc_codec *codec, unsigned int reg); 1096unsigned int snd_soc_read(struct snd_soc_codec *codec, unsigned int reg);
1098unsigned int snd_soc_write(struct snd_soc_codec *codec, 1097unsigned int snd_soc_write(struct snd_soc_codec *codec,
1099 unsigned int reg, unsigned int val); 1098 unsigned int reg, unsigned int val);
1100unsigned int snd_soc_bulk_write_raw(struct snd_soc_codec *codec,
1101 unsigned int reg, const void *data, size_t len);
1102 1099
1103/* device driver data */ 1100/* device driver data */
1104 1101
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index f5ec301603d8..4ce02e6777e5 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2298,13 +2298,6 @@ unsigned int snd_soc_write(struct snd_soc_codec *codec,
2298} 2298}
2299EXPORT_SYMBOL_GPL(snd_soc_write); 2299EXPORT_SYMBOL_GPL(snd_soc_write);
2300 2300
2301unsigned int snd_soc_bulk_write_raw(struct snd_soc_codec *codec,
2302 unsigned int reg, const void *data, size_t len)
2303{
2304 return codec->bulk_write_raw(codec, reg, data, len);
2305}
2306EXPORT_SYMBOL_GPL(snd_soc_bulk_write_raw);
2307
2308/** 2301/**
2309 * snd_soc_update_bits - update codec register bits 2302 * snd_soc_update_bits - update codec register bits
2310 * @codec: audio codec 2303 * @codec: audio codec
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;