drivers/soundwire/bus.h
Source file repositories/reference/linux-study-clean/drivers/soundwire/bus.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/soundwire/bus.h- Extension
.h- Size
- 7119 bytes
- Lines
- 246
- 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 sdw_msgstruct sdw_bpt_sectionstruct sdw_bpt_msgstruct sdw_port_runtimestruct sdw_slave_runtimestruct sdw_master_runtimestruct sdw_transport_datafunction sdw_acpi_find_slavesfunction sdw_bus_debugfs_initfunction sdw_fill_xport_paramsfunction sdw_fill_port_params
Annotated Snippet
struct sdw_msg {
u16 addr;
u16 len;
u8 dev_num;
u8 addr_page1;
u8 addr_page2;
u8 flags;
u8 *buf;
bool ssp_sync;
bool page;
};
/**
* struct sdw_btp_section - Message section structure
* @addr: Start Register address accessed in the Slave
* @len: number of bytes to transfer. More than 64Kb can be transferred
* but a practical limit of SDW_BPT_MSG_MAX_BYTES is enforced.
* @buf: section data buffer (filled by host for write, filled
* by Peripheral hardware for reads)
*/
struct sdw_bpt_section {
u32 addr;
u32 len;
u8 *buf;
};
/**
* struct sdw_btp_msg - Message structure
* @sec: Pointer to array of sections
* @sections: Number of sections in the array
* @dev_num: Slave device number
* @flags: transfer flags, indicate if xfer is read or write
*/
struct sdw_bpt_msg {
struct sdw_bpt_section *sec;
int sections;
u8 dev_num;
u8 flags;
};
#define SDW_DOUBLE_RATE_FACTOR 2
#define SDW_STRM_RATE_GROUPING 1
extern int sdw_rows[SDW_FRAME_ROWS];
extern int sdw_cols[SDW_FRAME_COLS];
int sdw_find_row_index(int row);
int sdw_find_col_index(int col);
/**
* sdw_port_runtime: Runtime port parameters for Master or Slave
*
* @num: Port number. For audio streams, valid port number ranges from
* [1,14]
* @ch_mask: Channel mask
* @transport_params: Transport parameters
* @port_params: Port parameters
* @port_node: List node for Master or Slave port_list
* @lane: Which lane is used
*
* SoundWire spec has no mention of ports for Master interface but the
* concept is logically extended.
*/
struct sdw_port_runtime {
int num;
int ch_mask;
struct sdw_transport_params transport_params;
struct sdw_port_params port_params;
struct list_head port_node;
unsigned int lane;
};
/**
* sdw_slave_runtime: Runtime Stream parameters for Slave
*
* @slave: Slave handle
* @direction: Data direction for Slave
* @ch_count: Number of channels handled by the Slave for
* this stream
* @m_rt_node: sdw_master_runtime list node
* @port_list: List of Slave Ports configured for this stream
*/
struct sdw_slave_runtime {
struct sdw_slave *slave;
enum sdw_data_direction direction;
unsigned int ch_count;
struct list_head m_rt_node;
struct list_head port_list;
};
Annotation
- Detected declarations: `struct sdw_msg`, `struct sdw_bpt_section`, `struct sdw_bpt_msg`, `struct sdw_port_runtime`, `struct sdw_slave_runtime`, `struct sdw_master_runtime`, `struct sdw_transport_data`, `function sdw_acpi_find_slaves`, `function sdw_bus_debugfs_init`, `function sdw_fill_xport_params`.
- 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.