sound/soc/codecs/tlv320adc3xxx.c
Source file repositories/reference/linux-study-clean/sound/soc/codecs/tlv320adc3xxx.c
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/codecs/tlv320adc3xxx.c- Extension
.c- Size
- 52691 bytes
- Lines
- 1523
- 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.
- 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
dt-bindings/sound/tlv320adc3xxx.hlinux/clk.hlinux/gpio/consumer.hlinux/module.hlinux/moduleparam.hlinux/io.hlinux/init.hlinux/delay.hlinux/gpio/driver.hlinux/pm.hlinux/i2c.hlinux/platform_device.hlinux/cdev.hlinux/slab.hsound/core.hsound/pcm.hsound/pcm_params.hsound/soc.hsound/soc-dapm.hsound/tlv.hsound/initval.h
Detected Declarations
struct adc3xxxstruct adc3xxx_rate_divsenum adc3xxx_typefunction adc3xxx_volatile_regfunction adc3xxx_get_divsfunction adc3xxx_pll_delayfunction adc3xxx_coefficient_infofunction adc3xxx_coefficient_getfunction adc3xxx_coefficient_putfunction adc3xxx_gpio_requestfunction adc3xxx_gpio_direction_outfunction adc3xxx_gpio_setfunction adc3xxx_gpio_getfunction adc3xxx_free_gpiofunction adc3xxx_init_gpiofunction adc3xxx_parse_dt_gpiofunction adc3xxx_parse_dt_micbias_gpofunction adc3xxx_parse_dt_micbias_vgfunction adc3xxx_parse_pll_modefunction adc3xxx_setup_pllfunction adc3xxx_hw_paramsfunction adc3xxx_set_dai_sysclkfunction adc3xxx_set_dai_fmtfunction adc3xxx_i2c_probefunction adc3xxx_i2c_remove
Annotated Snippet
struct adc3xxx {
struct device *dev;
enum adc3xxx_type type;
struct clk *mclk;
struct regmap *regmap;
struct gpio_desc *rst_pin;
unsigned int pll_mode;
unsigned int sysclk;
unsigned int gpio_cfg[ADC3XXX_GPIO_PINS]; /* value+1 (0 => not set) */
unsigned int micbias_gpo[ADC3XXX_MICBIAS_PINS]; /* 1 => pin is GPO */
unsigned int micbias_vg[ADC3XXX_MICBIAS_PINS];
int master;
u8 page_no;
int use_pll;
struct gpio_chip gpio_chip;
};
static const unsigned int adc3xxx_gpio_ctrl_reg[ADC3XXX_GPIO_PINS] = {
ADC3XXX_GPIO1_CTRL,
ADC3XXX_GPIO2_CTRL
};
static const unsigned int adc3xxx_micbias_shift[ADC3XXX_MICBIAS_PINS] = {
ADC3XXX_MICBIAS1_SHIFT,
ADC3XXX_MICBIAS2_SHIFT
};
static const struct reg_default adc3xxx_defaults[] = {
/* Page 0 */
{ 0, 0x00 }, { 1, 0x00 }, { 2, 0x00 }, { 3, 0x00 },
{ 4, 0x00 }, { 5, 0x11 }, { 6, 0x04 }, { 7, 0x00 },
{ 8, 0x00 }, { 9, 0x00 }, { 10, 0x00 }, { 11, 0x00 },
{ 12, 0x00 }, { 13, 0x00 }, { 14, 0x00 }, { 15, 0x00 },
{ 16, 0x00 }, { 17, 0x00 }, { 18, 0x01 }, { 19, 0x01 },
{ 20, 0x80 }, { 21, 0x80 }, { 22, 0x04 }, { 23, 0x00 },
{ 24, 0x00 }, { 25, 0x00 }, { 26, 0x01 }, { 27, 0x00 },
{ 28, 0x00 }, { 29, 0x02 }, { 30, 0x01 }, { 31, 0x00 },
{ 32, 0x00 }, { 33, 0x10 }, { 34, 0x00 }, { 35, 0x00 },
{ 36, 0x00 }, { 37, 0x00 }, { 38, 0x02 }, { 39, 0x00 },
{ 40, 0x00 }, { 41, 0x00 }, { 42, 0x00 }, { 43, 0x00 },
{ 44, 0x00 }, { 45, 0x00 }, { 46, 0x00 }, { 47, 0x00 },
{ 48, 0x00 }, { 49, 0x00 }, { 50, 0x00 }, { 51, 0x00 },
{ 52, 0x00 }, { 53, 0x12 }, { 54, 0x00 }, { 55, 0x00 },
{ 56, 0x00 }, { 57, 0x00 }, { 58, 0x00 }, { 59, 0x44 },
{ 60, 0x00 }, { 61, 0x01 }, { 62, 0x00 }, { 63, 0x00 },
{ 64, 0x00 }, { 65, 0x00 }, { 66, 0x00 }, { 67, 0x00 },
{ 68, 0x00 }, { 69, 0x00 }, { 70, 0x00 }, { 71, 0x00 },
{ 72, 0x00 }, { 73, 0x00 }, { 74, 0x00 }, { 75, 0x00 },
{ 76, 0x00 }, { 77, 0x00 }, { 78, 0x00 }, { 79, 0x00 },
{ 80, 0x00 }, { 81, 0x00 }, { 82, 0x88 }, { 83, 0x00 },
{ 84, 0x00 }, { 85, 0x00 }, { 86, 0x00 }, { 87, 0x00 },
{ 88, 0x7f }, { 89, 0x00 }, { 90, 0x00 }, { 91, 0x00 },
{ 92, 0x00 }, { 93, 0x00 }, { 94, 0x00 }, { 95, 0x00 },
{ 96, 0x7f }, { 97, 0x00 }, { 98, 0x00 }, { 99, 0x00 },
{ 100, 0x00 }, { 101, 0x00 }, { 102, 0x00 }, { 103, 0x00 },
{ 104, 0x00 }, { 105, 0x00 }, { 106, 0x00 }, { 107, 0x00 },
{ 108, 0x00 }, { 109, 0x00 }, { 110, 0x00 }, { 111, 0x00 },
{ 112, 0x00 }, { 113, 0x00 }, { 114, 0x00 }, { 115, 0x00 },
{ 116, 0x00 }, { 117, 0x00 }, { 118, 0x00 }, { 119, 0x00 },
{ 120, 0x00 }, { 121, 0x00 }, { 122, 0x00 }, { 123, 0x00 },
{ 124, 0x00 }, { 125, 0x00 }, { 126, 0x00 }, { 127, 0x00 },
/* Page 1 */
{ 128, 0x00 }, { 129, 0x00 }, { 130, 0x00 }, { 131, 0x00 },
{ 132, 0x00 }, { 133, 0x00 }, { 134, 0x00 }, { 135, 0x00 },
{ 136, 0x00 }, { 137, 0x00 }, { 138, 0x00 }, { 139, 0x00 },
{ 140, 0x00 }, { 141, 0x00 }, { 142, 0x00 }, { 143, 0x00 },
{ 144, 0x00 }, { 145, 0x00 }, { 146, 0x00 }, { 147, 0x00 },
{ 148, 0x00 }, { 149, 0x00 }, { 150, 0x00 }, { 151, 0x00 },
{ 152, 0x00 }, { 153, 0x00 }, { 154, 0x00 }, { 155, 0x00 },
{ 156, 0x00 }, { 157, 0x00 }, { 158, 0x00 }, { 159, 0x00 },
{ 160, 0x00 }, { 161, 0x00 }, { 162, 0x00 }, { 163, 0x00 },
{ 164, 0x00 }, { 165, 0x00 }, { 166, 0x00 }, { 167, 0x00 },
{ 168, 0x00 }, { 169, 0x00 }, { 170, 0x00 }, { 171, 0x00 },
{ 172, 0x00 }, { 173, 0x00 }, { 174, 0x00 }, { 175, 0x00 },
{ 176, 0x00 }, { 177, 0x00 }, { 178, 0x00 }, { 179, 0x00 },
{ 180, 0xff }, { 181, 0x00 }, { 182, 0x3f }, { 183, 0xff },
{ 184, 0x00 }, { 185, 0x3f }, { 186, 0x00 }, { 187, 0x80 },
{ 188, 0x80 }, { 189, 0x00 }, { 190, 0x00 }, { 191, 0x00 },
/* Page 4 */
{ 1024, 0x00 }, { 1026, 0x01 }, { 1027, 0x17 },
{ 1028, 0x01 }, { 1029, 0x17 }, { 1030, 0x7d }, { 1031, 0xd3 },
{ 1032, 0x7f }, { 1033, 0xff }, { 1034, 0x00 }, { 1035, 0x00 },
{ 1036, 0x00 }, { 1037, 0x00 }, { 1038, 0x7f }, { 1039, 0xff },
{ 1040, 0x00 }, { 1041, 0x00 }, { 1042, 0x00 }, { 1043, 0x00 },
{ 1044, 0x00 }, { 1045, 0x00 }, { 1046, 0x00 }, { 1047, 0x00 },
{ 1048, 0x7f }, { 1049, 0xff }, { 1050, 0x00 }, { 1051, 0x00 },
{ 1052, 0x00 }, { 1053, 0x00 }, { 1054, 0x00 }, { 1055, 0x00 },
{ 1056, 0x00 }, { 1057, 0x00 }, { 1058, 0x7f }, { 1059, 0xff },
Annotation
- Immediate include surface: `dt-bindings/sound/tlv320adc3xxx.h`, `linux/clk.h`, `linux/gpio/consumer.h`, `linux/module.h`, `linux/moduleparam.h`, `linux/io.h`, `linux/init.h`, `linux/delay.h`.
- Detected declarations: `struct adc3xxx`, `struct adc3xxx_rate_divs`, `enum adc3xxx_type`, `function adc3xxx_volatile_reg`, `function adc3xxx_get_divs`, `function adc3xxx_pll_delay`, `function adc3xxx_coefficient_info`, `function adc3xxx_coefficient_get`, `function adc3xxx_coefficient_put`, `function adc3xxx_gpio_request`.
- Atlas domain: Driver Families / sound/soc.
- Implementation status: source 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.