include/sound/cs35l41.h
Source file repositories/reference/linux-study-clean/include/sound/cs35l41.h
File Facts
- System
- Linux kernel
- Corpus path
include/sound/cs35l41.h- Extension
.h- Size
- 35635 bytes
- Lines
- 929
- Domain
- Driver Families
- Bucket
- include/sound
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/regmap.hlinux/firmware/cirrus/cs_dsp.h
Detected Declarations
struct cs35l41_gpio_cfgstruct cs35l41_hw_cfgstruct cs35l41_otp_packed_element_tstruct cs35l41_otp_map_element_tstruct cs35l41_irqenum cs35l41_boost_typeenum cs35l41_clk_idsenum cs35l41_gpio1_funcenum cs35l41_gpio2_funcenum cs35l41_cspl_mbox_statusenum cs35l41_cspl_mbox_cmdenum cs35l41_irq_list
Annotated Snippet
struct cs35l41_gpio_cfg {
bool valid;
bool pol_inv;
bool out_en;
unsigned int func;
};
struct cs35l41_hw_cfg {
bool valid;
int bst_ind;
int bst_ipk;
int bst_cap;
int dout_hiz;
struct cs35l41_gpio_cfg gpio1;
struct cs35l41_gpio_cfg gpio2;
unsigned int spk_pos;
enum cs35l41_boost_type bst_type;
};
struct cs35l41_otp_packed_element_t {
u32 reg;
u8 shift;
u8 size;
};
struct cs35l41_otp_map_element_t {
u32 id;
u32 num_elements;
const struct cs35l41_otp_packed_element_t *map;
u32 bit_offset;
u32 word_offset;
};
enum cs35l41_cspl_mbox_status {
CSPL_MBOX_STS_ERROR = U32_MAX,
CSPL_MBOX_STS_ERROR2 = 0x00ffffff, // firmware not always sign-extending 24-bit value
CSPL_MBOX_STS_RUNNING = 0,
CSPL_MBOX_STS_PAUSED = 1,
CSPL_MBOX_STS_RDY_FOR_REINIT = 2,
};
enum cs35l41_cspl_mbox_cmd {
CSPL_MBOX_CMD_NONE = 0,
CSPL_MBOX_CMD_PAUSE = 1,
CSPL_MBOX_CMD_RESUME = 2,
CSPL_MBOX_CMD_REINIT = 3,
CSPL_MBOX_CMD_STOP_PRE_REINIT = 4,
CSPL_MBOX_CMD_HIBERNATE = 5,
CSPL_MBOX_CMD_OUT_OF_HIBERNATE = 6,
CSPL_MBOX_CMD_SPK_OUT_ENABLE = 7,
CSPL_MBOX_CMD_UNKNOWN_CMD = -1,
CSPL_MBOX_CMD_INVALID_SEQUENCE = -2,
};
/*
* IRQs
*/
#define CS35L41_IRQ(_irq, _name, _hand) \
{ \
.irq = CS35L41_ ## _irq ## _IRQ,\
.name = _name, \
.handler = _hand, \
}
struct cs35l41_irq {
int irq;
const char *name;
irqreturn_t (*handler)(int irq, void *data);
};
#define CS35L41_REG_IRQ(_reg, _irq) \
[CS35L41_ ## _irq ## _IRQ] = { \
.reg_offset = (CS35L41_ ## _reg) - CS35L41_IRQ1_STATUS1,\
.mask = CS35L41_ ## _irq ## _MASK \
}
/* (0x0000E010) CS35L41_IRQ1_STATUS1 */
#define CS35L41_BST_OVP_ERR_SHIFT 6
#define CS35L41_BST_OVP_ERR_MASK BIT(CS35L41_BST_OVP_ERR_SHIFT)
#define CS35L41_BST_DCM_UVP_ERR_SHIFT 7
#define CS35L41_BST_DCM_UVP_ERR_MASK BIT(CS35L41_BST_DCM_UVP_ERR_SHIFT)
#define CS35L41_BST_SHORT_ERR_SHIFT 8
#define CS35L41_BST_SHORT_ERR_MASK BIT(CS35L41_BST_SHORT_ERR_SHIFT)
#define CS35L41_TEMP_WARN_SHIFT 15
#define CS35L41_TEMP_WARN_MASK BIT(CS35L41_TEMP_WARN_SHIFT)
#define CS35L41_TEMP_ERR_SHIFT 17
#define CS35L41_TEMP_ERR_MASK BIT(CS35L41_TEMP_ERR_SHIFT)
#define CS35L41_AMP_SHORT_ERR_SHIFT 31
#define CS35L41_AMP_SHORT_ERR_MASK BIT(CS35L41_AMP_SHORT_ERR_SHIFT)
Annotation
- Immediate include surface: `linux/regmap.h`, `linux/firmware/cirrus/cs_dsp.h`.
- Detected declarations: `struct cs35l41_gpio_cfg`, `struct cs35l41_hw_cfg`, `struct cs35l41_otp_packed_element_t`, `struct cs35l41_otp_map_element_t`, `struct cs35l41_irq`, `enum cs35l41_boost_type`, `enum cs35l41_clk_ids`, `enum cs35l41_gpio1_func`, `enum cs35l41_gpio2_func`, `enum cs35l41_cspl_mbox_status`.
- Atlas domain: Driver Families / include/sound.
- 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.