[PATCH v2 1/2] mfd: cs42l43: Add load detection register needed for cs42l43b
From: Charles Keepax
Date: Thu Nov 12 2026 - 09:51:00 EST
The headphone load detection procedure on cs42l43b is slightly different
and require a register that wasn't used on previous versions of the
chip. Add that register into the driver.
Signed-off-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxx>
---
Changes since v1:
- Make LOAD_DET_SEL readable
drivers/mfd/cs42l43.c | 2 ++
include/linux/mfd/cs42l43-regs.h | 2 ++
2 files changed, 4 insertions(+)
diff --git a/drivers/mfd/cs42l43.c b/drivers/mfd/cs42l43.c
index a83b62064dae6..76f2eba28aaf1 100644
--- a/drivers/mfd/cs42l43.c
+++ b/drivers/mfd/cs42l43.c
@@ -402,6 +402,7 @@ bool cs42l43_readable_register(struct device *dev, unsigned int reg)
case CS42L43_BLOCK_EN:
case CS42L43_SHUTTER_CONTROL:
case CS42L43B_MCU_SW_REV ... CS42L43B_MCU_RAM_MAX:
+ case CS42L43B_LOAD_DET_SEL:
return true; // registers present on all variants
case CS42L43_MCU_SW_REV ... CS42L43B_MCU_SW_REV - 1:
case CS42L43B_MCU_RAM_MAX + 1 ... CS42L43_MCU_RAM_MAX:
@@ -425,6 +426,7 @@ bool cs42l43_precious_register(struct device *dev, unsigned int reg)
case CS42L43_RX_DATA:
case CS42L43_DECIM_INT ... CS42L43_HPOUT_INT:
case CS42L43_MCU_SW_REV ... CS42L43_MCU_RAM_MAX:
+ case CS42L43B_LOAD_DET_SEL:
return true;
default:
return false;
diff --git a/include/linux/mfd/cs42l43-regs.h b/include/linux/mfd/cs42l43-regs.h
index 4c00ceae8b461..924438655c630 100644
--- a/include/linux/mfd/cs42l43-regs.h
+++ b/include/linux/mfd/cs42l43-regs.h
@@ -1204,6 +1204,8 @@
#define CS42L43B_ISRC2DEC3_INPUT1 0x0000C7A0
#define CS42L43B_ISRC2DEC4_INPUT1 0x0000C7B0
+#define CS42L43B_LOAD_DET_SEL 0x000170E8
+
#define CS42L43B_FW_MISSION_CTRL_NEED_CONFIGS 0x00117E00
#define CS42L43B_FW_MISSION_CTRL_HAVE_CONFIGS 0x00117E04
#define CS42L43B_FW_MISSION_CTRL_PATCH_START_ADDR_REG 0x00117E08
--
2.47.3