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.

Dependency Surface

Detected Declarations

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

Implementation Notes