drivers/i3c/master/mipi-i3c-hci/hci.h
Source file repositories/reference/linux-study-clean/drivers/i3c/master/mipi-i3c-hci/hci.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/i3c/master/mipi-i3c-hci/hci.h- Extension
.h- Size
- 5755 bytes
- Lines
- 195
- Domain
- Driver Families
- Bucket
- drivers/i3c
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/io.hlinux/jiffies.h
Detected Declarations
struct hci_cmd_opsstruct dat_wordsstruct i3c_hcistruct hci_xferstruct hci_io_opsstruct i3c_hci_dev_datafunction hci_free_xferfunction hci_start_xfer
Annotated Snippet
struct dat_words {
u32 w0;
u32 w1;
};
/* Our main structure */
struct i3c_hci {
struct i3c_master_controller master;
void __iomem *base_regs;
void __iomem *DAT_regs;
void __iomem *DCT_regs;
void __iomem *RHS_regs;
void __iomem *PIO_regs;
void __iomem *EXTCAPS_regs;
void __iomem *AUTOCMD_regs;
void __iomem *DEBUG_regs;
const struct hci_io_ops *io;
void *io_data;
const struct hci_cmd_ops *cmd;
spinlock_t lock;
struct mutex control_mutex;
atomic_t next_cmd_tid;
bool irq_inactive;
bool enqueue_blocked;
bool recovery_needed;
bool hj_init_done;
wait_queue_head_t enqueue_wait_queue;
u32 caps;
unsigned int quirks;
unsigned int DAT_entries;
unsigned int DAT_entry_size;
void *DAT_data;
struct dat_words *DAT;
struct i3c_dev_desc **ibi_devs;
unsigned int DCT_entries;
unsigned int DCT_entry_size;
u8 version_major;
u8 version_minor;
u8 revision;
u8 dyn_addr;
u32 vendor_mipi_id;
u32 vendor_version_id;
u32 vendor_product_id;
void *vendor_data;
};
/*
* Structure to represent a master initiated transfer.
* The rnw, data and data_len fields must be initialized before calling any
* hci->cmd->*() method. The cmd method will initialize cmd_desc[] and
* possibly modify (clear) the data field. Then xfer->cmd_desc[0] can
* be augmented with CMD_0_ROC and/or CMD_0_TOC.
* The completion field needs to be initialized before queueing with
* hci->io->queue_xfer(), and requires CMD_0_ROC to be set.
*/
struct hci_xfer {
u32 cmd_desc[4];
u32 response;
bool rnw;
bool started;
void *data;
unsigned int data_len;
unsigned int cmd_tid;
struct completion *completion;
unsigned long timeout;
unsigned long start_jiffies;
union {
struct {
/* PIO specific */
struct hci_xfer *next_xfer;
struct hci_xfer *next_data;
struct hci_xfer *next_resp;
unsigned int data_left;
u32 data_word_before_partial;
};
struct {
/* DMA specific */
struct i3c_dma *dma;
struct hci_xfer *final_xfer;
int ring_number;
int ring_entry;
int xfer_list_pos;
};
};
};
static inline struct hci_xfer *hci_alloc_xfer(unsigned int n)
{
return kzalloc_objs(struct hci_xfer, n);
}
Annotation
- Immediate include surface: `linux/io.h`, `linux/jiffies.h`.
- Detected declarations: `struct hci_cmd_ops`, `struct dat_words`, `struct i3c_hci`, `struct hci_xfer`, `struct hci_io_ops`, `struct i3c_hci_dev_data`, `function hci_free_xfer`, `function hci_start_xfer`.
- Atlas domain: Driver Families / drivers/i3c.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.