drivers/soundwire/intel.h
Source file repositories/reference/linux-study-clean/drivers/soundwire/intel.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/soundwire/intel.h- Extension
.h- Size
- 7511 bytes
- Lines
- 271
- Domain
- Driver Families
- Bucket
- drivers/soundwire
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
struct hdac_busstruct sdw_intel_link_resstruct sdw_intel_bptstruct sdw_intelstruct sdw_intel_propenum intel_pdi_typefunction intel_readlfunction intel_writelfunction intel_readwfunction intel_writewfunction intel_ace2x_debugfs_initfunction sdw_intel_debugfs_exitfunction sdw_intel_register_daifunction sdw_intel_check_clock_stopfunction sdw_intel_start_busfunction sdw_intel_start_bus_after_resetfunction sdw_intel_start_bus_after_clock_stopfunction sdw_intel_stop_busfunction sdw_intel_link_power_upfunction sdw_intel_link_power_downfunction sdw_intel_shim_check_wakefunction sdw_intel_shim_wakefunction sdw_intel_sync_armfunction sdw_intel_sync_go_unlockedfunction sdw_intel_sync_gofunction sdw_intel_sync_check_cmdsync_unlockedfunction sdw_intel_get_link_count
Annotated Snippet
struct sdw_intel_link_res {
const struct sdw_intel_hw_ops *hw_ops;
void __iomem *mmio_base; /* not strictly needed, useful for debug */
void __iomem *registers;
u32 ip_offset;
void __iomem *shim;
void __iomem *shim_vs;
void __iomem *alh;
int irq;
const struct sdw_intel_ops *ops;
struct device *dev;
struct mutex *shim_lock; /* protect shared registers */
u32 *shim_mask;
u32 clock_stop_quirks;
bool mic_privacy;
u32 link_mask;
struct sdw_cdns *cdns;
struct list_head list;
struct hdac_bus *hbus;
};
/**
* struct sdw_intel_bpt - SoundWire Intel BPT context
* @bpt_tx_stream: BPT TX stream
* @dmab_tx_bdl: BPT TX buffer descriptor list
* @bpt_rx_stream: BPT RX stream
* @dmab_rx_bdl: BPT RX buffer descriptor list
* @pdi0_buffer_size: PDI0 buffer size
* @pdi1_buffer_size: PDI1 buffer size
* @num_frames: number of frames
* @data_per_frame: data per frame
*/
struct sdw_intel_bpt {
struct hdac_ext_stream *bpt_tx_stream;
struct snd_dma_buffer dmab_tx_bdl;
struct hdac_ext_stream *bpt_rx_stream;
struct snd_dma_buffer dmab_rx_bdl;
unsigned int pdi0_buffer_size;
unsigned int pdi1_buffer_size;
unsigned int num_frames;
unsigned int data_per_frame;
};
struct sdw_intel {
struct sdw_cdns cdns;
int instance;
struct sdw_intel_link_res *link_res;
bool startup_done;
struct sdw_intel_bpt bpt_ctx;
#ifdef CONFIG_DEBUG_FS
struct dentry *debugfs;
#endif
};
struct sdw_intel_prop {
u16 clde;
u16 doaise2;
u16 dodse2;
u16 clds;
u16 clss;
u16 doaise;
u16 doais;
u16 dodse;
u16 dods;
};
enum intel_pdi_type {
INTEL_PDI_IN = 0,
INTEL_PDI_OUT = 1,
INTEL_PDI_BD = 2,
};
/*
* Read, write helpers for HW registers
*/
static inline int intel_readl(void __iomem *base, int offset)
{
return readl(base + offset);
}
static inline void intel_writel(void __iomem *base, int offset, int value)
{
writel(value, base + offset);
}
static inline u16 intel_readw(void __iomem *base, int offset)
{
return readw(base + offset);
}
Annotation
- Detected declarations: `struct hdac_bus`, `struct sdw_intel_link_res`, `struct sdw_intel_bpt`, `struct sdw_intel`, `struct sdw_intel_prop`, `enum intel_pdi_type`, `function intel_readl`, `function intel_writel`, `function intel_readw`, `function intel_writew`.
- Atlas domain: Driver Families / drivers/soundwire.
- 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.