sound/soc/codecs/cs35l36.c
Source file repositories/reference/linux-study-clean/sound/soc/codecs/cs35l36.c
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/codecs/cs35l36.c- Extension
.c- Size
- 57352 bytes
- Lines
- 1941
- Domain
- Driver Families
- Bucket
- sound/soc
- Inferred role
- Driver Families: implementation source
- Status
- source 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/moduleparam.hlinux/kernel.hlinux/init.hlinux/delay.hlinux/i2c.hlinux/slab.hlinux/workqueue.hlinux/platform_device.hlinux/regulator/consumer.hlinux/gpio/consumer.hlinux/irq.hlinux/of.hlinux/regmap.hsound/core.hsound/pcm.hsound/pcm_params.hsound/soc.hsound/soc-dapm.hsound/initval.hsound/tlv.hsound/cs35l36.hlinux/completion.hcs35l36.h
Detected Declarations
struct cs35l36_privatestruct cs35l36_pll_configstruct cs35l36_global_fs_configfunction cs35l36_readable_regfunction cs35l36_precious_regfunction cs35l36_volatile_regfunction cs35l36_ldm_sel_getfunction cs35l36_ldm_sel_putfunction cs35l36_main_amp_eventfunction cs35l36_boost_eventfunction cs35l36_set_dai_fmtfunction cs35l36_pcm_hw_paramsfunction cs35l36_dai_set_sysclkfunction cs35l36_component_set_sysclkfunction cs35l36_boost_inductorfunction cs35l36_component_probefunction cs35l36_irqfunction cs35l36_handle_of_datafunction cs35l36_pacfunction cs35l36_apply_vpbr_configfunction cs35l36_i2c_probefunction cs35l36_i2c_remove
Annotated Snippet
struct cs35l36_private {
struct device *dev;
struct cs35l36_platform_data pdata;
struct regmap *regmap;
struct regulator_bulk_data supplies[2];
int num_supplies;
int clksrc;
int chip_version;
int rev_id;
int ldm_mode_sel;
struct gpio_desc *reset_gpio;
};
struct cs35l36_pll_config {
int freq;
int clk_cfg;
int fll_igain;
};
static const struct cs35l36_pll_config cs35l36_pll_sysclk[] = {
{32768, 0x00, 0x05},
{8000, 0x01, 0x03},
{11025, 0x02, 0x03},
{12000, 0x03, 0x03},
{16000, 0x04, 0x04},
{22050, 0x05, 0x04},
{24000, 0x06, 0x04},
{32000, 0x07, 0x05},
{44100, 0x08, 0x05},
{48000, 0x09, 0x05},
{88200, 0x0A, 0x06},
{96000, 0x0B, 0x06},
{128000, 0x0C, 0x07},
{176400, 0x0D, 0x07},
{192000, 0x0E, 0x07},
{256000, 0x0F, 0x08},
{352800, 0x10, 0x08},
{384000, 0x11, 0x08},
{512000, 0x12, 0x09},
{705600, 0x13, 0x09},
{750000, 0x14, 0x09},
{768000, 0x15, 0x09},
{1000000, 0x16, 0x0A},
{1024000, 0x17, 0x0A},
{1200000, 0x18, 0x0A},
{1411200, 0x19, 0x0A},
{1500000, 0x1A, 0x0A},
{1536000, 0x1B, 0x0A},
{2000000, 0x1C, 0x0A},
{2048000, 0x1D, 0x0A},
{2400000, 0x1E, 0x0A},
{2822400, 0x1F, 0x0A},
{3000000, 0x20, 0x0A},
{3072000, 0x21, 0x0A},
{3200000, 0x22, 0x0A},
{4000000, 0x23, 0x0A},
{4096000, 0x24, 0x0A},
{4800000, 0x25, 0x0A},
{5644800, 0x26, 0x0A},
{6000000, 0x27, 0x0A},
{6144000, 0x28, 0x0A},
{6250000, 0x29, 0x08},
{6400000, 0x2A, 0x0A},
{6500000, 0x2B, 0x08},
{6750000, 0x2C, 0x09},
{7526400, 0x2D, 0x0A},
{8000000, 0x2E, 0x0A},
{8192000, 0x2F, 0x0A},
{9600000, 0x30, 0x0A},
{11289600, 0x31, 0x0A},
{12000000, 0x32, 0x0A},
{12288000, 0x33, 0x0A},
{12500000, 0x34, 0x08},
{12800000, 0x35, 0x0A},
{13000000, 0x36, 0x0A},
{13500000, 0x37, 0x0A},
{19200000, 0x38, 0x0A},
{22579200, 0x39, 0x0A},
{24000000, 0x3A, 0x0A},
{24576000, 0x3B, 0x0A},
{25000000, 0x3C, 0x0A},
{25600000, 0x3D, 0x0A},
{26000000, 0x3E, 0x0A},
{27000000, 0x3F, 0x0A},
};
static const struct reg_default cs35l36_reg[] = {
{CS35L36_TESTKEY_CTRL, 0x00000000},
{CS35L36_USERKEY_CTL, 0x00000000},
{CS35L36_OTP_CTRL1, 0x00002460},
Annotation
- Immediate include surface: `linux/module.h`, `linux/moduleparam.h`, `linux/kernel.h`, `linux/init.h`, `linux/delay.h`, `linux/i2c.h`, `linux/slab.h`, `linux/workqueue.h`.
- Detected declarations: `struct cs35l36_private`, `struct cs35l36_pll_config`, `struct cs35l36_global_fs_config`, `function cs35l36_readable_reg`, `function cs35l36_precious_reg`, `function cs35l36_volatile_reg`, `function cs35l36_ldm_sel_get`, `function cs35l36_ldm_sel_put`, `function cs35l36_main_amp_event`, `function cs35l36_boost_event`.
- Atlas domain: Driver Families / sound/soc.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.