I3C Subsystem
-
struct dm_i3c_ops
Driver operations for the I3C uclass
Definition
struct dm_i3c_ops {
int (*i3c_xfers)(struct i3c_dev_desc *dev,struct i3c_priv_xfer *xfers, u32 nxfers);
int (*read)(struct udevice *dev, u32 dev_number, u8 *buf, u32 num_bytes);
int (*write)(struct udevice *dev, u32 dev_number, u8 *buf, u32 num_bytes);
};
Members
i3c_xfersTransfer messages in I3C
dev: I3C controller device instance. xfers: List of I3C private SDR transfer messages. nxfers: The number of messages to transfer.
Return: 0 on success, negative error code on failure.
readPerform I3C read transaction.
dev: Chip to read from dev_number: The target device number from the driver model. buf: Place to put data num_bytes: Number of bytes to read.
Return: 0 on success, negative error code on failure.
writePerform I3C write transaction.
dev: Chip to write to dev_number: The target device number from the driver model. buf: Buffer containing data to write num_bytes: Number of bytes to write.
Return: 0 on success, negative error code on failure.
Description
This structure defines the set of operations that a driver must implement for interacting with an I3C controller in U-Boot.
-
i3c_get_ops
i3c_get_ops (dev)
Retrieve the I3C operation functions for a device
Parameters
devThe I3C controller device.
Description
This macro returns the set of operation functions (dm_i3c_ops) implemented by the driver associated with the specified device. These operations define how the driver performs I3C communication tasks such as reading, writing, and message transfers.
Return
The I3C operation structure for the device.
-
int dm_i3c_write(struct udevice *dev, u32 dev_number, u8 *buf, u32 num_bytes)
Perform I3C write transaction
Parameters
struct udevice *devChip to write to
u32 dev_numberThe target device number from the driver model.
u8 *bufBuffer containing data to write
u32 num_bytesNumber of bytes to write.
Return
0 on success, negative error code on failure.
-
int dm_i3c_read(struct udevice *dev, u32 dev_number, u8 *buf, u32 num_bytes)
Perform I3C read transaction
Parameters
struct udevice *devChip to read from
u32 dev_numberThe target device number from the driver model.
u8 *bufPlace to put data
u32 num_bytesNumber of bytes to read.
Return
0 on success, negative error code on failure.