Skip to content

Commit d496ad3

Browse files
mstrozeklag-linaro
authored andcommitted
mfd: cs42l43: Prepare support for updated bios patch
Newer bios patch firmware versions now require use of the shadow register interface, which was previously only required by the full firmware, update the check accordingly. Signed-off-by: Maciej Strozek <[email protected]> Signed-off-by: Charles Keepax <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent b787a44 commit d496ad3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/mfd/cs42l43.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848

4949
#define CS42L43_MCU_SUPPORTED_REV 0x2105
5050
#define CS42L43_MCU_SHADOW_REGS_REQUIRED_REV 0x2200
51+
#define CS42L43_BIOS_SHADOW_REGS_REQUIRED_REV 0x1002
5152
#define CS42L43_MCU_SUPPORTED_BIOS_REV 0x0001
5253

5354
#define CS42L43_VDDP_DELAY_US 50
@@ -773,7 +774,8 @@ static int cs42l43_mcu_update_step(struct cs42l43 *cs42l43)
773774
* Later versions of the firmwware require the driver to access some
774775
* features through a set of shadow registers.
775776
*/
776-
shadow = mcu_rev >= CS42L43_MCU_SHADOW_REGS_REQUIRED_REV;
777+
shadow = (mcu_rev >= CS42L43_MCU_SHADOW_REGS_REQUIRED_REV) ||
778+
(bios_rev >= CS42L43_BIOS_SHADOW_REGS_REQUIRED_REV);
777779

778780
ret = regmap_read(cs42l43->regmap, CS42L43_BOOT_CONTROL, &secure_cfg);
779781
if (ret) {

0 commit comments

Comments
 (0)