diff options
author | Simon Trimmer <simont@opensource.cirrus.com> | 2023-07-21 16:21:10 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-07-24 01:40:14 +0300 |
commit | 898673b905b9318489430663083f629bc38c7461 (patch) | |
tree | c56440712affa23ba343a027fe3016574b0ffc56 /include/sound/cs35l56.h | |
parent | de1b43a57aff8b1808bbfe0402932f9e373d1172 (diff) | |
download | linux-898673b905b9318489430663083f629bc38c7461.tar.xz |
ASoC: cs35l56: Move shared data into a common data structure
The ASoC and HDA drivers have structures that contain some of the same
information - instead of maintaining two locations for this data the
drivers should share a common data structure as this will enable common
utility functions to be created.
The first step is to move the location of these members in the ASoC
driver.
Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230721132120.5523-2-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound/cs35l56.h')
-rw-r--r-- | include/sound/cs35l56.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/sound/cs35l56.h b/include/sound/cs35l56.h index ec672daa36cf..532796efdaa5 100644 --- a/include/sound/cs35l56.h +++ b/include/sound/cs35l56.h @@ -252,6 +252,19 @@ #define CS35L56_NUM_BULK_SUPPLIES 3 #define CS35L56_NUM_DSP_REGIONS 5 +struct cs35l56_base { + struct device *dev; + struct regmap *regmap; + int irq; + struct mutex irq_lock; + u8 rev; + bool init_done; + bool fw_patched; + bool secured; + bool can_hibernate; + struct gpio_desc *reset_gpio; +}; + extern struct regmap_config cs35l56_regmap_i2c; extern struct regmap_config cs35l56_regmap_spi; extern struct regmap_config cs35l56_regmap_sdw; @@ -260,7 +273,7 @@ extern const struct cs_dsp_region cs35l56_dsp1_regions[CS35L56_NUM_DSP_REGIONS]; extern const char * const cs35l56_tx_input_texts[CS35L56_NUM_INPUT_SRC]; extern const unsigned int cs35l56_tx_input_values[CS35L56_NUM_INPUT_SRC]; -int cs35l56_set_patch(struct regmap *regmap); +int cs35l56_set_patch(struct cs35l56_base *cs35l56_base); int cs35l56_get_bclk_freq_id(unsigned int freq); void cs35l56_fill_supply_names(struct regulator_bulk_data *data); |