Lines Matching +full:bus +full:- +full:specific

1 /* SPDX-License-Identifier: GPL-2.0 */
31 * struct i3c_i2c_dev_desc - Common part of the I3C/I2C device descriptor
37 * add master specific information
54 * struct i2c_dev_boardinfo - I2C device board information
60 * This structure is used to attach board-level information to an I2C device.
61 * Each I2C device connected on the I3C bus should have one.
70 * struct i2c_dev_desc - I2C device descriptor
78 * Each I2C device connected on the bus will have an i2c_dev_desc.
80 * using &struct_i3c_master_controller->ops->attach_i2c_dev().
83 * connected on an I3C bus. This object is also passed to all
95 * struct i3c_ibi_slot - I3C IBI (In-Band Interrupt) slot
102 * An IBI slot is an object pre-allocated by the controller and used when an
109 * simple kmalloc-based allocation, the generic IBI slot pool can be used.
119 * struct i3c_device_ibi_info - IBI information attached to a specific device
140 * i3c_device_request_ibi() is called and attached to a specific device. This
141 * object is here to manage IBIs coming from a specific I3C device.
146 * controller-private data.
159 * struct i3c_dev_boardinfo - I3C device board information
163 * but try our best to assign this specific address to the
167 * bus initialization to assign it a specific dynamic address
174 * This structure is used to attach board-level information to an I3C device.
175 * Not all I3C devices connected on the bus will have a boardinfo. It's only
177 * specific dynamic address.
188 * struct i3c_dev_desc - I3C device descriptor
192 * @ibi_lock: lock used to protect the &struct_i3c_device->ibi
197 * code should manipulate it in when updating the dev <-> desc link or
217 * struct i3c_device - I3C device object
222 * @bus: I3C bus this device is attached to
226 * All I3C devs on the I3C bus are represented, including I3C masters. For each
232 struct i3c_bus *bus; member
237 * bus is 11, but this number depends on external parameters like trace length,
238 * capacitive load per Device, and the types of Devices present on the Bus.
240 * reference and should be adjusted on a per-controller/per-board basis.
251 * enum i3c_bus_mode - I3C bus mode
252 * @I3C_BUS_MODE_PURE: only I3C devices are connected to the bus. No limitation
255 * the bus. The only impact in this mode is that the
259 * present on the bus. However they allow
263 * on the bus
273 * enum i3c_addr_slot_status - I3C address slot status
280 * On an I3C bus, addresses are assigned dynamically, and we need to know which
295 * struct i3c_bus - I3C bus object
296 * @cur_master: I3C master currently driving the bus. Since I3C is multi-master
298 * know whether it needs to request bus ownership before sending
300 * @id: bus ID. Assigned by the framework when register the bus
301 * @addrslots: a bitmap with 2-bits per-slot to encode the address status and
304 * @mode: bus mode (see &enum i3c_bus_mode)
310 * devices connected on the bus and successfully attached to the
313 * devices connected on the bus and successfully attached to the
315 * @devs: 2 lists containing all I3C/I2C devices connected to the bus
316 * @lock: read/write lock on the bus. This is needed to protect against
317 * operations that have an impact on the whole bus and the devices
327 * The I3C bus is represented with its own object and not implicitly described
328 * by the I3C master to cope with the multi-master functionality, where one bus
329 * can be shared amongst several masters, each of them requesting bus ownership
349 * struct i3c_master_controller_ops - I3C master methods
350 * @bus_init: hook responsible for the I3C bus initialization. You should at
351 * least call master_set_info() from there and set the bus mode.
352 * You can also put controller specific initialization in there.
355 * &i3c_master_controller_ops->bus_init().
357 * @attach_i3c_dev: called every time an I3C device is attached to the bus. It
363 * This is a good place to attach master controller specific
372 * @detach_i3c_dev: called when an I3C device is detached from the bus. Usually
379 * attached or re-attached to the controller.
389 * @attach_i2c_dev: called every time an I2C device is attached to the bus.
390 * This is a good place to attach master controller specific
393 * @detach_i2c_dev: called when an I2C device is detached from the bus. Usually
398 * the transfers are DMA-safe. If drivers want to have DMA-safe
405 * length and number of pre-allocated slots).
406 * Some controllers support less IBI-capable devices than regular
407 * devices, so this method might return -%EBUSY if there's no
410 * @free_ibi: free an IBI previously requested with ->request_ibi(). The IBI
411 * should have been disabled with ->disable_irq() prior to that
412 * This method is mandatory only if ->request_ibi is not NULL.
413 * @enable_ibi: enable the IBI. Only valid if ->request_ibi() has been called
414 * prior to ->enable_ibi(). The controller should first enable
418 * This method is mandatory only if ->request_ibi is not NULL.
422 * This method is mandatory only if ->request_ibi is not NULL.
425 * in the IBI slot pool so that the controller can re-use it
427 * This method is mandatory only if ->request_ibi is not
458 * struct i3c_master_controller - I3C master controller object
459 * @dev: device to be registered to the device-model
461 * added to the list of I3C devs available on the bus
467 * @init_done: true when the bus initialization is done
470 * @boardinfo: board-level information attached to devices connected on the bus
471 * @bus: I3C bus exposed by this master
475 * requires taking the bus lock in maintenance, which in turn, can only
476 * be done from a sleep-able context
494 struct i3c_bus bus; member
499 * i3c_bus_for_each_i2cdev() - iterate over all I2C devices present on the bus
500 * @bus: the I3C bus
504 * Iterate over all I2C devs present on the bus.
506 #define i3c_bus_for_each_i2cdev(bus, dev) \ argument
507 list_for_each_entry(dev, &(bus)->devs.i2c, common.node)
510 * i3c_bus_for_each_i3cdev() - iterate over all I3C devices present on the bus
511 * @bus: the I3C bus
515 * Iterate over all I3C devs present on the bus.
517 #define i3c_bus_for_each_i3cdev(bus, dev) \ argument
518 list_for_each_entry(dev, &(bus)->devs.i3c, common.node)
548 * i3c_dev_get_master_data() - get master private data attached to an I3C
557 return dev->common.master_priv; in i3c_dev_get_master_data()
561 * i3c_dev_set_master_data() - attach master private data to an I3C device
566 * This functions allows a master controller to attach per-device private data
572 dev->common.master_priv = data; in i3c_dev_set_master_data()
576 * i2c_dev_get_master_data() - get master private data attached to an I2C
585 return dev->common.master_priv; in i2c_dev_get_master_data()
589 * i2c_dev_set_master_data() - attach master private data to an I2C device
594 * This functions allows a master controller to attach per-device private data
600 dev->common.master_priv = data; in i2c_dev_set_master_data()
604 * i3c_dev_get_master() - get master used to communicate with a device
612 return dev->common.master; in i3c_dev_get_master()
616 * i2c_dev_get_master() - get master used to communicate with a device
624 return dev->common.master; in i2c_dev_get_master()
628 * i3c_master_get_bus() - get the bus attached to a master
631 * Return: the I3C bus @master is connected to
636 return &master->bus; in i3c_master_get_bus()