diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2023-12-07 04:03:50 +0300 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-12-07 04:03:50 +0300 |
commit | 0c92218f4e7d4b4a7245d32bea042fa6f9cc39d7 (patch) | |
tree | 44d6ba1879278a5a1b58178e9b0f799427e52e0e /sound/soc/codecs/cs35l41-lib.c | |
parent | b2f557a21bc8fffdcd65794eda8a854e024999f3 (diff) | |
parent | 33cc938e65a98f1d29d0a18403dbbee050dcad9a (diff) | |
download | linux-0c92218f4e7d4b4a7245d32bea042fa6f9cc39d7.tar.xz |
Merge branch 'master' into mm-hotfixes-stable
Diffstat (limited to 'sound/soc/codecs/cs35l41-lib.c')
-rw-r--r-- | sound/soc/codecs/cs35l41-lib.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/soc/codecs/cs35l41-lib.c b/sound/soc/codecs/cs35l41-lib.c index 4569e4f7cf7e..e9993a39f7d0 100644 --- a/sound/soc/codecs/cs35l41-lib.c +++ b/sound/soc/codecs/cs35l41-lib.c @@ -16,6 +16,8 @@ #include <sound/cs35l41.h> +#define CS35L41_FIRMWARE_OLD_VERSION 0x001C00 /* v0.28.0 */ + static const struct reg_default cs35l41_reg[] = { { CS35L41_PWR_CTRL1, 0x00000000 }, { CS35L41_PWR_CTRL2, 0x00000000 }, @@ -1214,7 +1216,7 @@ EXPORT_SYMBOL_GPL(cs35l41_safe_reset); * the PLL Lock interrupt, in the IRQ handler. */ int cs35l41_global_enable(struct device *dev, struct regmap *regmap, enum cs35l41_boost_type b_type, - int enable, bool firmware_running) + int enable, struct cs_dsp *dsp) { int ret; unsigned int gpio1_func, pad_control, pwr_ctrl1, pwr_ctrl3, int_status, pup_pdn_mask; @@ -1309,7 +1311,7 @@ int cs35l41_global_enable(struct device *dev, struct regmap *regmap, enum cs35l4 } regmap_write(regmap, CS35L41_IRQ1_STATUS1, CS35L41_PUP_DONE_MASK); - if (firmware_running) + if (dsp->running && dsp->fw_id_version > CS35L41_FIRMWARE_OLD_VERSION) ret = cs35l41_set_cspl_mbox_cmd(dev, regmap, CSPL_MBOX_CMD_SPK_OUT_ENABLE); else |