drivers/mfd/cs42l43.c
Source file repositories/reference/linux-study-clean/drivers/mfd/cs42l43.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/mfd/cs42l43.c- Extension
.c- Size
- 40153 bytes
- Lines
- 1317
- Domain
- Driver Families
- Bucket
- drivers/mfd
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/array_size.hlinux/bitops.hlinux/build_bug.hlinux/delay.hlinux/device.hlinux/err.hlinux/firmware.hlinux/gpio/consumer.hlinux/jiffies.hlinux/mfd/core.hlinux/mfd/cs42l43.hlinux/mfd/cs42l43-regs.hlinux/module.hlinux/pm.hlinux/pm_runtime.hlinux/regmap.hlinux/soundwire/sdw.hlinux/types.hcs42l43.h
Detected Declarations
struct cs42l43_patch_headerfunction cs42l43_readable_registerfunction cs42l43_precious_registerfunction cs42l43_volatile_registerfunction cs42l43_soft_resetfunction cs42l43_wait_for_attachfunction cs42l43_mcu_stage_2_3function cs42l43_mcu_stage_3_2function cs42l43_mcu_disablefunction cs42l43_mcu_load_firmwarefunction cs42l43_mcu_is_hw_compatiblefunction cs42l43_mcu_update_stepfunction cs42l43_mcu_updatefunction cs42l43_irq_configfunction cs42l43_boot_workfunction cs42l43_power_upfunction cs42l43_power_downfunction cs42l43_dev_removefunction cs42l43_dev_probefunction cs42l43_suspendfunction cs42l43_suspend_noirqfunction cs42l43_resume_noirqfunction cs42l43_resumefunction cs42l43_runtime_suspendfunction cs42l43_runtime_resume
Annotated Snippet
struct cs42l43_patch_header {
__le16 version;
__le16 size;
__u8 reserved;
__u8 secure;
__le16 bss_size;
__le32 apply_addr;
__le32 checksum;
__le32 sha;
__le16 swrev;
__le16 patchid;
__le16 ipxid;
__le16 romver;
__le32 load_addr;
} __packed;
static const struct reg_sequence cs42l43_reva_patch[] = {
{ 0x4000, 0x00000055 },
{ 0x4000, 0x000000AA },
{ 0x10084, 0x00000000 },
{ 0x1741C, 0x00CD2000 },
{ 0x1718C, 0x00000003 },
{ 0x4000, 0x00000000 },
{ CS42L43_CCM_BLK_CLK_CONTROL, 0x00000002 },
{ CS42L43_HPPATHVOL, 0x011B011B },
{ CS42L43_OSC_DIV_SEL, 0x00000001 },
{ CS42L43_DACCNFG2, 0x00000005 },
{ CS42L43_MIC_DETECT_CONTROL_ANDROID, 0x80790079 },
{ CS42L43_RELID, 0x0000000F },
};
const struct reg_default cs42l43_reg_default[CS42L43_N_DEFAULTS] = {
{ CS42L43_DRV_CTRL1, 0x000186C0 },
{ CS42L43_DRV_CTRL3, 0x286DB018 },
{ CS42L43_DRV_CTRL4, 0x000006D8 },
{ CS42L43_DRV_CTRL_5, 0x136C00C0 },
{ CS42L43_GPIO_CTRL1, 0x00000707 },
{ CS42L43_GPIO_CTRL2, 0x00000000 },
{ CS42L43_GPIO_FN_SEL, 0x00000004 },
{ CS42L43_MCLK_SRC_SEL, 0x00000000 },
{ CS42L43_SAMPLE_RATE1, 0x00000003 },
{ CS42L43_SAMPLE_RATE2, 0x00000003 },
{ CS42L43_SAMPLE_RATE3, 0x00000003 },
{ CS42L43_SAMPLE_RATE4, 0x00000003 },
{ CS42L43_PLL_CONTROL, 0x00000000 },
{ CS42L43_FS_SELECT1, 0x00000000 },
{ CS42L43_FS_SELECT2, 0x00000000 },
{ CS42L43_FS_SELECT3, 0x00000000 },
{ CS42L43_FS_SELECT4, 0x00000000 },
{ CS42L43_PDM_CONTROL, 0x00000000 },
{ CS42L43_ASP_CLK_CONFIG1, 0x00010001 },
{ CS42L43_ASP_CLK_CONFIG2, 0x00000000 },
{ CS42L43_OSC_DIV_SEL, 0x00000001 },
{ CS42L43_ADC_B_CTRL1, 0x00000000 },
{ CS42L43_ADC_B_CTRL2, 0x00000000 },
{ CS42L43_DECIM_HPF_WNF_CTRL1, 0x00000001 },
{ CS42L43_DECIM_HPF_WNF_CTRL2, 0x00000001 },
{ CS42L43_DECIM_HPF_WNF_CTRL3, 0x00000001 },
{ CS42L43_DECIM_HPF_WNF_CTRL4, 0x00000001 },
{ CS42L43B_DECIM_HPF_WNF_CTRL5, 0x00000001 },
{ CS42L43B_DECIM_HPF_WNF_CTRL6, 0x00000001 },
{ CS42L43_DMIC_PDM_CTRL, 0x00000000 },
{ CS42L43_DECIM_VOL_CTRL_CH1_CH2, 0x20122012 },
{ CS42L43_DECIM_VOL_CTRL_CH3_CH4, 0x20122012 },
{ CS42L43B_DECIM_VOL_CTRL_CH1_CH2, 0x20122012 },
{ CS42L43B_DECIM_VOL_CTRL_CH3_CH4, 0x20122012 },
{ CS42L43B_DECIM_VOL_CTRL_CH5_CH6, 0x20122012 },
{ CS42L43_INTP_VOLUME_CTRL1, 0x00000180 },
{ CS42L43_INTP_VOLUME_CTRL2, 0x00000180 },
{ CS42L43_AMP1_2_VOL_RAMP, 0x00000022 },
{ CS42L43_ASP_CTRL, 0x00000004 },
{ CS42L43_ASP_FSYNC_CTRL1, 0x000000FA },
{ CS42L43_ASP_FSYNC_CTRL2, 0x00000001 },
{ CS42L43_ASP_FSYNC_CTRL3, 0x00000000 },
{ CS42L43_ASP_FSYNC_CTRL4, 0x000001F4 },
{ CS42L43_ASP_DATA_CTRL, 0x0000003A },
{ CS42L43_ASP_RX_EN, 0x00000000 },
{ CS42L43_ASP_TX_EN, 0x00000000 },
{ CS42L43_ASP_RX_CH1_CTRL, 0x00170001 },
{ CS42L43_ASP_RX_CH2_CTRL, 0x00170031 },
{ CS42L43_ASP_RX_CH3_CTRL, 0x00170061 },
{ CS42L43_ASP_RX_CH4_CTRL, 0x00170091 },
{ CS42L43_ASP_RX_CH5_CTRL, 0x001700C1 },
{ CS42L43_ASP_RX_CH6_CTRL, 0x001700F1 },
{ CS42L43_ASP_TX_CH1_CTRL, 0x00170001 },
{ CS42L43_ASP_TX_CH2_CTRL, 0x00170031 },
{ CS42L43_ASP_TX_CH3_CTRL, 0x00170061 },
{ CS42L43_ASP_TX_CH4_CTRL, 0x00170091 },
{ CS42L43_ASP_TX_CH5_CTRL, 0x001700C1 },
{ CS42L43_ASP_TX_CH6_CTRL, 0x001700F1 },
Annotation
- Immediate include surface: `linux/array_size.h`, `linux/bitops.h`, `linux/build_bug.h`, `linux/delay.h`, `linux/device.h`, `linux/err.h`, `linux/firmware.h`, `linux/gpio/consumer.h`.
- Detected declarations: `struct cs42l43_patch_header`, `function cs42l43_readable_register`, `function cs42l43_precious_register`, `function cs42l43_volatile_register`, `function cs42l43_soft_reset`, `function cs42l43_wait_for_attach`, `function cs42l43_mcu_stage_2_3`, `function cs42l43_mcu_stage_3_2`, `function cs42l43_mcu_disable`, `function cs42l43_mcu_load_firmware`.
- Atlas domain: Driver Families / drivers/mfd.
- Implementation status: integration implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.