Lines Matching +full:max +full:- +full:by +full:- +full:define
1 /* SPDX-License-Identifier: GPL-2.0 */
9 #define I3C_DEV_H
19 * enum i3c_error_code - I3C error codes
27 * These are the standard error codes as defined by the I3C specification.
28 * When -EIO is returned by the i3c_device_do_priv_xfers() or
42 * enum i3c_hdr_mode - HDR mode ids
54 * struct i3c_priv_xfer - I3C SDR private transfer
58 * @data.in: input buffer. Must point to a DMA-able buffer
59 * @data.out: output buffer. Must point to a DMA-able buffer
73 * enum i3c_dcr - I3C DCR values
80 #define I3C_PID_MANUF_ID(pid) (((pid) & GENMASK_ULL(47, 33)) >> 33)
81 #define I3C_PID_RND_LOWER_32BITS(pid) (!!((pid) & BIT_ULL(32)))
82 #define I3C_PID_RND_VAL(pid) ((pid) & GENMASK_ULL(31, 0))
83 #define I3C_PID_PART_ID(pid) (((pid) & GENMASK_ULL(31, 16)) >> 16)
84 #define I3C_PID_INSTANCE_ID(pid) (((pid) & GENMASK_ULL(15, 12)) >> 12)
85 #define I3C_PID_EXTRA_INFO(pid) ((pid) & GENMASK_ULL(11, 0))
87 #define I3C_BCR_DEVICE_ROLE(bcr) ((bcr) & GENMASK(7, 6))
88 #define I3C_BCR_I3C_SLAVE (0 << 6)
89 #define I3C_BCR_I3C_MASTER (1 << 6)
90 #define I3C_BCR_HDR_CAP BIT(5)
91 #define I3C_BCR_BRIDGE BIT(4)
92 #define I3C_BCR_OFFLINE_CAP BIT(3)
93 #define I3C_BCR_IBI_PAYLOAD BIT(2)
94 #define I3C_BCR_IBI_REQ_CAP BIT(1)
95 #define I3C_BCR_MAX_DATA_SPEED_LIM BIT(0)
98 * struct i3c_device_info - I3C device information
105 * @max_read_ds: max read speed information
106 * @max_write_ds: max write speed information
107 * @max_ibi_len: max IBI payload length
108 * @max_read_turnaround: max read turn-around time in micro-seconds
109 * @max_read_len: max private SDR read length in bytes
110 * @max_write_len: max private SDR write length in bytes
112 * These are all basic information that should be advertised by an I3C device.
143 #define I3C_MATCH_MANUF_AND_PART (I3C_MATCH_MANUF | I3C_MATCH_PART)
145 #define I3C_DEVICE(_manufid, _partid, _drvdata) \
153 #define I3C_DEVICE_EXTRA_INFO(_manufid, _partid, _info, _drvdata) \
163 #define I3C_CLASS(_dcr, _drvdata) \
170 * struct i3c_driver - I3C device driver
174 * @id_table: I3C device match table. Will be used by the framework to decide
192 * dev_to_i3cdev() - Returns the I3C device containing @dev
197 #define dev_to_i3cdev(__dev) container_of_const(__dev, struct i3c_device, dev)
222 #define i3c_driver_register(__drv) \
226 * module_i3c_driver() - Register a module providing an I3C driver
231 * Should be used by any driver that does not require extra init/cleanup steps.
233 #define module_i3c_driver(__drv) \
237 * i3c_i2c_driver_register() - Register an i2c and an i3c driver
266 * i3c_i2c_driver_unregister() - Unregister an i2c and an i3c driver
284 * module_i3c_i2c_driver() - Register a module providing an I3C and an I2C
293 * Should be used by any driver that does not require extra init/cleanup steps.
295 #define module_i3c_i2c_driver(__i3cdrv, __i2cdrv) \
315 * struct i3c_ibi_setup - IBI setup object
319 * @num_slots: number of pre-allocated IBI slots. This should be chosen so that