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
57 * @actual_len: actual length in bytes are transferred by the controller
59 * @data.in: input buffer. Must point to a DMA-able buffer
60 * @data.out: output buffer. Must point to a DMA-able buffer
75 * enum i3c_dcr - I3C DCR values
82 #define I3C_PID_MANUF_ID(pid) (((pid) & GENMASK_ULL(47, 33)) >> 33)
83 #define I3C_PID_RND_LOWER_32BITS(pid) (!!((pid) & BIT_ULL(32)))
84 #define I3C_PID_RND_VAL(pid) ((pid) & GENMASK_ULL(31, 0))
85 #define I3C_PID_PART_ID(pid) (((pid) & GENMASK_ULL(31, 16)) >> 16)
86 #define I3C_PID_INSTANCE_ID(pid) (((pid) & GENMASK_ULL(15, 12)) >> 12)
87 #define I3C_PID_EXTRA_INFO(pid) ((pid) & GENMASK_ULL(11, 0))
89 #define I3C_BCR_DEVICE_ROLE(bcr) ((bcr) & GENMASK(7, 6))
90 #define I3C_BCR_I3C_SLAVE (0 << 6)
91 #define I3C_BCR_I3C_MASTER (1 << 6)
92 #define I3C_BCR_HDR_CAP BIT(5)
93 #define I3C_BCR_BRIDGE BIT(4)
94 #define I3C_BCR_OFFLINE_CAP BIT(3)
95 #define I3C_BCR_IBI_PAYLOAD BIT(2)
96 #define I3C_BCR_IBI_REQ_CAP BIT(1)
97 #define I3C_BCR_MAX_DATA_SPEED_LIM BIT(0)
100 * struct i3c_device_info - I3C device information
107 * @max_read_ds: max read speed information
108 * @max_write_ds: max write speed information
109 * @max_ibi_len: max IBI payload length
110 * @max_read_turnaround: max read turn-around time in micro-seconds
111 * @max_read_len: max private SDR read length in bytes
112 * @max_write_len: max private SDR write length in bytes
114 * These are all basic information that should be advertised by an I3C device.
145 #define I3C_MATCH_MANUF_AND_PART (I3C_MATCH_MANUF | I3C_MATCH_PART)
147 #define I3C_DEVICE(_manufid, _partid, _drvdata) \
155 #define I3C_DEVICE_EXTRA_INFO(_manufid, _partid, _info, _drvdata) \
165 #define I3C_CLASS(_dcr, _drvdata) \
172 * struct i3c_driver - I3C device driver
176 * @id_table: I3C device match table. Will be used by the framework to decide
186 #define drv_to_i3cdrv(__drv) container_of_const(__drv, struct i3c_driver, driver)
191 * dev_to_i3cdev() - Returns the I3C device containing @dev
196 #define dev_to_i3cdev(__dev) container_of_const(__dev, struct i3c_device, dev)
221 #define i3c_driver_register(__drv) \
225 * module_i3c_driver() - Register a module providing an I3C driver
230 * Should be used by any driver that does not require extra init/cleanup steps.
232 #define module_i3c_driver(__drv) \
236 * i3c_i2c_driver_register() - Register an i2c and an i3c driver
265 * i3c_i2c_driver_unregister() - Unregister an i2c and an i3c driver
283 * module_i3c_i2c_driver() - Register a module providing an I3C and an I2C
292 * Should be used by any driver that does not require extra init/cleanup steps.
294 #define module_i3c_i2c_driver(__i3cdrv, __i2cdrv) \
314 * struct i3c_ibi_setup - IBI setup object
318 * @num_slots: number of pre-allocated IBI slots. This should be chosen so that