summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/cs35l41.h
diff options
context:
space:
mode:
authorLucas Tanure <tanureal@opensource.cirrus.com>2021-11-25 15:35:01 +0100
committerMark Brown <broonie@kernel.org>2021-11-26 14:24:31 +0100
commita5e0091d62abb9599d9dea505ec0e8c820001831 (patch)
tree4d5acab9a09d3060960d811e41ec19c5b88972c5 /sound/soc/codecs/cs35l41.h
parentASoC: codecs/jz4770: Add missing gain control after DAC/ADC mixer (diff)
downloadlinux-a5e0091d62abb9599d9dea505ec0e8c820001831.tar.xz
linux-a5e0091d62abb9599d9dea505ec0e8c820001831.zip
ASoC: cs35l41: Fix link problem
Can't link I2C and SPI to the same binary, better to move CS35L41 to 3 modules approach. And instead of exposing cs35l41_reg, volatile_reg, readable_reg and precious_reg arrays, move cs35l41_regmap_i2c/spi to new module and expose it. Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Link: https://lore.kernel.org/r/20211125143501.7720-1-tanureal@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/cs35l41.h')
-rw-r--r--sound/soc/codecs/cs35l41.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/sound/soc/codecs/cs35l41.h b/sound/soc/codecs/cs35l41.h
index eea3b14acb0b..f82075ea855f 100644
--- a/sound/soc/codecs/cs35l41.h
+++ b/sound/soc/codecs/cs35l41.h
@@ -538,7 +538,6 @@
#define CS35L41_OTP_TRIM_35 0x0000400C
#define CS35L41_OTP_TRIM_36 0x00002030
-#define CS35L41_MAX_CACHE_REG 36
#define CS35L41_OTP_SIZE_WORDS 32
#define CS35L41_NUM_OTP_ELEM 100
#define CS35L41_NUM_OTP_MAPS 5
@@ -734,9 +733,8 @@
#define CS35L41_RX_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE)
#define CS35L41_TX_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE)
-bool cs35l41_readable_reg(struct device *dev, unsigned int reg);
-bool cs35l41_precious_reg(struct device *dev, unsigned int reg);
-bool cs35l41_volatile_reg(struct device *dev, unsigned int reg);
+extern struct regmap_config cs35l41_regmap_i2c;
+extern struct regmap_config cs35l41_regmap_spi;
struct cs35l41_otp_packed_element_t {
u32 reg;
@@ -752,7 +750,6 @@ struct cs35l41_otp_map_element_t {
u32 word_offset;
};
-extern const struct reg_default cs35l41_reg[CS35L41_MAX_CACHE_REG];
extern const struct cs35l41_otp_map_element_t
cs35l41_otp_map_map[CS35L41_NUM_OTP_MAPS];