drivers/slimbus/slimbus.h
Source file repositories/reference/linux-study-clean/drivers/slimbus/slimbus.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/slimbus/slimbus.h- Extension
.h- Size
- 16731 bytes
- Lines
- 454
- Domain
- Driver Families
- Bucket
- drivers/slimbus
- 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
linux/module.hlinux/device.hlinux/mutex.hlinux/completion.hlinux/slimbus.h
Detected Declarations
struct slim_framerstruct slim_msg_txnstruct slim_schedstruct slim_channelstruct slim_portstruct slim_stream_runtimestruct slim_controllerenum slim_clk_stateenum slim_port_directionenum slim_port_stateenum slim_channel_stateenum slim_ch_data_fmtenum slim_ch_aux_bit_fmtenum slim_transport_protocolfunction slim_tid_txnfunction slim_ec_txn
Annotated Snippet
struct slim_framer {
struct device dev;
struct slim_eaddr e_addr;
int rootfreq;
int superfreq;
};
#define to_slim_framer(d) container_of(d, struct slim_framer, dev)
/**
* struct slim_msg_txn - Message to be sent by the controller.
* This structure has packet header,
* payload and buffer to be filled (if any)
* @rl: Header field. remaining length.
* @mt: Header field. Message type.
* @mc: Header field. LSB is message code for type mt.
* @dt: Header field. Destination type.
* @ec: Element code. Used for elemental access APIs.
* @tid: Transaction ID. Used for messages expecting response.
* (relevant for message-codes involving read operation)
* @la: Logical address of the device this message is going to.
* (Not used when destination type is broadcast.)
* @msg: Elemental access message to be read/written
* @comp: completion if read/write is synchronous, used internally
* for tid based transactions.
*/
struct slim_msg_txn {
u8 rl;
u8 mt;
u8 mc;
u8 dt;
u16 ec;
u8 tid;
u8 la;
struct slim_val_inf *msg;
struct completion *comp;
};
/* Frequently used message transaction structures */
#define DEFINE_SLIM_LDEST_TXN(name, mc, rl, la, msg) \
struct slim_msg_txn name = { rl, 0, mc, SLIM_MSG_DEST_LOGICALADDR, 0,\
0, la, msg, }
#define DEFINE_SLIM_BCAST_TXN(name, mc, rl, la, msg) \
struct slim_msg_txn name = { rl, 0, mc, SLIM_MSG_DEST_BROADCAST, 0,\
0, la, msg, }
#define DEFINE_SLIM_EDEST_TXN(name, mc, rl, la, msg) \
struct slim_msg_txn name = { rl, 0, mc, SLIM_MSG_DEST_ENUMADDR, 0,\
0, la, msg, }
/**
* enum slim_clk_state: SLIMbus controller's clock state used internally for
* maintaining current clock state.
* @SLIM_CLK_ACTIVE: SLIMbus clock is active
* @SLIM_CLK_ENTERING_PAUSE: SLIMbus clock pause sequence is being sent on the
* bus. If this succeeds, state changes to SLIM_CLK_PAUSED. If the
* transition fails, state changes back to SLIM_CLK_ACTIVE
* @SLIM_CLK_PAUSED: SLIMbus controller clock has paused.
*/
enum slim_clk_state {
SLIM_CLK_ACTIVE,
SLIM_CLK_ENTERING_PAUSE,
SLIM_CLK_PAUSED,
};
/**
* struct slim_sched: Framework uses this structure internally for scheduling.
* @clk_state: Controller's clock state from enum slim_clk_state
* @pause_comp: Signals completion of clock pause sequence. This is useful when
* client tries to call SLIMbus transaction when controller is entering
* clock pause.
* @m_reconf: This mutex is held until current reconfiguration (data channel
* scheduling, message bandwidth reservation) is done. Message APIs can
* use the bus concurrently when this mutex is held since elemental access
* messages can be sent on the bus when reconfiguration is in progress.
*/
struct slim_sched {
enum slim_clk_state clk_state;
struct completion pause_comp;
struct mutex m_reconf;
};
/**
* enum slim_port_direction: SLIMbus port direction
*
* @SLIM_PORT_SINK: SLIMbus port is a sink
* @SLIM_PORT_SOURCE: SLIMbus port is a source
*/
enum slim_port_direction {
SLIM_PORT_SINK = 0,
Annotation
- Immediate include surface: `linux/module.h`, `linux/device.h`, `linux/mutex.h`, `linux/completion.h`, `linux/slimbus.h`.
- Detected declarations: `struct slim_framer`, `struct slim_msg_txn`, `struct slim_sched`, `struct slim_channel`, `struct slim_port`, `struct slim_stream_runtime`, `struct slim_controller`, `enum slim_clk_state`, `enum slim_port_direction`, `enum slim_port_state`.
- Atlas domain: Driver Families / drivers/slimbus.
- 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.