include/linux/soundwire/sdw.h
Source file repositories/reference/linux-study-clean/include/linux/soundwire/sdw.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/soundwire/sdw.h- Extension
.h- Size
- 38413 bytes
- Lines
- 1211
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: operation-table or driver-model contract
- Status
- pattern implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bitfield.hlinux/bug.hlinux/completion.hlinux/device.hlinux/idr.hlinux/irq.hlinux/irqdomain.hlinux/lockdep_types.hlinux/mod_devicetable.hlinux/mutex.hlinux/types.hsound/sdca.h
Detected Declarations
struct dentrystruct fwnode_handlestruct device_nodestruct sdw_busstruct sdw_slavestruct sdw_dp0_propstruct sdw_dpn_propstruct sdw_slave_propstruct sdw_master_propstruct sdw_slave_idstruct sdw_peripheralsstruct sdw_slave_intr_statusstruct sdw_prepare_chstruct sdw_bus_paramsstruct sdw_slave_opsstruct sdw_slavestruct sdw_master_devicestruct sdw_driverstruct sdw_port_paramsstruct sdw_transport_paramsstruct sdw_enable_chstruct sdw_master_port_opsstruct sdw_msgstruct sdw_deferstruct sdw_bpt_msgstruct sdw_master_opsstruct sdw_port_configstruct sdw_stream_configstruct sdw_stream_paramsstruct sdw_stream_runtimestruct sdw_busenum sdw_slave_statusenum sdw_clk_stop_typeenum sdw_command_responseenum sdw_dpn_groupingenum sdw_dpn_pkg_modeenum sdw_stream_typeenum sdw_data_directionenum sdw_port_data_modeenum sdw_clk_stop_reset_behaveenum sdw_p15_behaveenum sdw_dpn_typeenum sdw_clk_stop_modeenum sdw_reg_bankenum sdw_port_prep_opsenum sdw_stream_statefunction sdw_stream_add_slavefunction sdw_stream_remove_slave
Annotated Snippet
struct device_driver driver;
};
#define SDW_SLAVE_ENTRY_EXT(_mfg_id, _part_id, _version, _c_id, _drv_data) \
{ .mfg_id = (_mfg_id), .part_id = (_part_id), \
.sdw_version = (_version), .class_id = (_c_id), \
.driver_data = (unsigned long)(_drv_data) }
#define SDW_SLAVE_ENTRY(_mfg_id, _part_id, _drv_data) \
SDW_SLAVE_ENTRY_EXT((_mfg_id), (_part_id), 0, 0, (_drv_data))
int sdw_handle_slave_status(struct sdw_bus *bus,
enum sdw_slave_status status[]);
/*
* SDW master structures and APIs
*/
/**
* struct sdw_port_params: Data Port parameters
*
* @num: Port number
* @bps: Word length of the Port
* @flow_mode: Port Data flow mode
* @data_mode: Test modes or normal mode
*
* This is used to program the Data Port based on Data Port stream
* parameters.
*/
struct sdw_port_params {
unsigned int num;
unsigned int bps;
unsigned int flow_mode;
unsigned int data_mode;
};
/**
* struct sdw_transport_params: Data Port Transport Parameters
*
* @blk_grp_ctrl_valid: Port implements block group control
* @port_num: Port number
* @blk_grp_ctrl: Block group control value
* @sample_interval: Sample interval
* @offset1: Blockoffset of the payload data
* @offset2: Blockoffset of the payload data
* @hstart: Horizontal start of the payload data
* @hstop: Horizontal stop of the payload data
* @blk_pkg_mode: Block per channel or block per port
* @lane_ctrl: Data lane Port uses for Data transfer. Currently only single
* data lane is supported in bus
*
* This is used to program the Data Port based on Data Port transport
* parameters. All these parameters are banked and can be modified
* during a bank switch without any artifacts in audio stream.
*/
struct sdw_transport_params {
bool blk_grp_ctrl_valid;
unsigned int port_num;
unsigned int blk_grp_ctrl;
unsigned int sample_interval;
unsigned int offset1;
unsigned int offset2;
unsigned int hstart;
unsigned int hstop;
unsigned int blk_pkg_mode;
unsigned int lane_ctrl;
};
/**
* struct sdw_enable_ch: Enable/disable Data Port channel
*
* @port_num: Port number
* @ch_mask: Active channel mask
* @enable: Enable (true) /disable (false) channel
*/
struct sdw_enable_ch {
unsigned int port_num;
unsigned int ch_mask;
bool enable;
};
/**
* struct sdw_master_port_ops: Callback functions from bus to Master
* driver to set Master Data ports.
*
* @dpn_set_port_params: Set the Port parameters for the Master Port.
* Mandatory callback
* @dpn_set_port_transport_params: Set transport parameters for the Master
* Port. Mandatory callback
* @dpn_port_prep: Port prepare operations for the Master Data Port.
Annotation
- Immediate include surface: `linux/bitfield.h`, `linux/bug.h`, `linux/completion.h`, `linux/device.h`, `linux/idr.h`, `linux/irq.h`, `linux/irqdomain.h`, `linux/lockdep_types.h`.
- Detected declarations: `struct dentry`, `struct fwnode_handle`, `struct device_node`, `struct sdw_bus`, `struct sdw_slave`, `struct sdw_dp0_prop`, `struct sdw_dpn_prop`, `struct sdw_slave_prop`, `struct sdw_master_prop`, `struct sdw_slave_id`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: pattern 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.