drivers/i3c/master/mipi-i3c-hci/cmd_v1.c
Source file repositories/reference/linux-study-clean/drivers/i3c/master/mipi-i3c-hci/cmd_v1.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/i3c/master/mipi-i3c-hci/cmd_v1.c- Extension
.c- Size
- 10232 bytes
- Lines
- 376
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bitfield.hlinux/i3c/master.hhci.hcmd.hdat.hdct.h
Detected Declarations
enum hci_cmd_modefunction get_i3c_modefunction get_i2c_modefunction fill_data_bytesfunction hci_cmd_v1_prep_cccfunction hci_cmd_v1_prep_i3c_xferfunction hci_cmd_v1_prep_i2c_xferfunction hci_cmd_v1_daa
Annotated Snippet
RESP_DATA_LENGTH(xfer->response) == 1) {
ret = 0; /* no more devices to be assigned */
break;
}
if (RESP_STATUS(xfer->response) != RESP_SUCCESS) {
ret = -EIO;
break;
}
i3c_hci_dct_get_val(hci, 0, &pid, &dcr, &bcr);
dev_dbg(&hci->master.dev,
"assigned address %#x to device PID=0x%llx DCR=%#x BCR=%#x",
next_addr, pid, dcr, bcr);
mipi_i3c_hci_dat_v1.free_entry(hci, dat_idx);
dat_idx = -1;
/*
* TODO: Extend the subsystem layer to allow for registering
* new device and provide BCR/DCR/PID at the same time.
*/
i3c_master_add_i3c_dev_locked(&hci->master, next_addr);
}
if (dat_idx >= 0)
mipi_i3c_hci_dat_v1.free_entry(hci, dat_idx);
hci_free_xfer(xfer, 1);
return ret;
}
const struct hci_cmd_ops mipi_i3c_hci_cmd_v1 = {
.prep_ccc = hci_cmd_v1_prep_ccc,
.prep_i3c_xfer = hci_cmd_v1_prep_i3c_xfer,
.prep_i2c_xfer = hci_cmd_v1_prep_i2c_xfer,
.perform_daa = hci_cmd_v1_daa,
};
Annotation
- Immediate include surface: `linux/bitfield.h`, `linux/i3c/master.h`, `hci.h`, `cmd.h`, `dat.h`, `dct.h`.
- Detected declarations: `enum hci_cmd_mode`, `function get_i3c_mode`, `function get_i2c_mode`, `function fill_data_bytes`, `function hci_cmd_v1_prep_ccc`, `function hci_cmd_v1_prep_i3c_xfer`, `function hci_cmd_v1_prep_i2c_xfer`, `function hci_cmd_v1_daa`.
- Atlas domain: Driver Families / drivers/i3c.
- 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.