Lines Matching +full:bus +full:- +full:specific
1 /* SPDX-License-Identifier: GPL-2.0 */
39 * struct i3c_i2c_dev_desc - Common part of the I3C/I2C device descriptor
45 * add master specific information
62 * struct i2c_dev_boardinfo - I2C device board information
68 * This structure is used to attach board-level information to an I2C device.
69 * Each I2C device connected on the I3C bus should have one.
78 * struct i2c_dev_desc - I2C device descriptor
85 * Each I2C device connected on the bus will have an i2c_dev_desc.
87 * using &struct_i3c_master_controller->ops->attach_i2c_dev().
90 * connected on an I3C bus. This object is also passed to all
101 * struct i3c_ibi_slot - I3C IBI (In-Band Interrupt) slot
108 * An IBI slot is an object pre-allocated by the controller and used when an
115 * simple kmalloc-based allocation, the generic IBI slot pool can be used.
125 * struct i3c_device_ibi_info - IBI information attached to a specific device
147 * i3c_device_request_ibi() is called and attached to a specific device. This
148 * object is here to manage IBIs coming from a specific I3C device.
153 * controller-private data.
167 * struct i3c_dev_boardinfo - I3C device board information
171 * but try our best to assign this specific address to the
175 * bus initialization to assign it a specific dynamic address
182 * This structure is used to attach board-level information to an I3C device.
183 * Not all I3C devices connected on the bus will have a boardinfo. It's only
185 * specific dynamic address.
196 * struct i3c_dev_desc - I3C device descriptor
200 * @ibi_lock: lock used to protect the &struct_i3c_device->ibi
205 * code should manipulate it in when updating the dev <-> desc link or
225 * struct i3c_device - I3C device object
230 * @bus: I3C bus this device is attached to
234 * All I3C devs on the I3C bus are represented, including I3C masters. For each
240 struct i3c_bus *bus; member
245 * bus is 11, but this number depends on external parameters like trace length,
246 * capacitive load per Device, and the types of Devices present on the Bus.
248 * reference and should be adjusted on a per-controller/per-board basis.
259 * enum i3c_bus_mode - I3C bus mode
260 * @I3C_BUS_MODE_PURE: only I3C devices are connected to the bus. No limitation
263 * the bus. The only impact in this mode is that the
267 * present on the bus. However they allow
271 * on the bus
281 * enum i3c_open_drain_speed - I3C open-drain speed
282 * @I3C_OPEN_DRAIN_SLOW_SPEED: Slow open-drain speed for sending the first
284 * will be visible to all devices on the I3C bus. I3C devices
287 * @I3C_OPEN_DRAIN_NORMAL_SPEED: Normal open-drain speed in I3C bus mode.
295 * enum i3c_addr_slot_status - I3C address slot status
302 * On an I3C bus, addresses are assigned dynamically, and we need to know which
317 * struct i3c_bus - I3C bus object
318 * @cur_master: I3C master currently driving the bus. Since I3C is multi-master
320 * know whether it needs to request bus ownership before sending
322 * @id: bus ID. Assigned by the framework when register the bus
323 * @addrslots: a bitmap with 2-bits per-slot to encode the address status and
326 * @mode: bus mode (see &enum i3c_bus_mode)
332 * devices connected on the bus and successfully attached to the
335 * devices connected on the bus and successfully attached to the
337 * @devs: 2 lists containing all I3C/I2C devices connected to the bus
338 * @lock: read/write lock on the bus. This is needed to protect against
339 * operations that have an impact on the whole bus and the devices
349 * The I3C bus is represented with its own object and not implicitly described
350 * by the I3C master to cope with the multi-master functionality, where one bus
351 * can be shared amongst several masters, each of them requesting bus ownership
371 * struct i3c_master_controller_ops - I3C master methods
372 * @bus_init: hook responsible for the I3C bus initialization. You should at
373 * least call master_set_info() from there and set the bus mode.
374 * You can also put controller specific initialization in there.
377 * &i3c_master_controller_ops->bus_init().
379 * @attach_i3c_dev: called every time an I3C device is attached to the bus. It
385 * This is a good place to attach master controller specific
394 * @detach_i3c_dev: called when an I3C device is detached from the bus. Usually
401 * attached or re-attached to the controller.
411 * @attach_i2c_dev: called every time an I2C device is attached to the bus.
412 * This is a good place to attach master controller specific
415 * @detach_i2c_dev: called when an I2C device is detached from the bus. Usually
420 * the transfers are DMA-safe. If drivers want to have DMA-safe
427 * length and number of pre-allocated slots).
428 * Some controllers support less IBI-capable devices than regular
429 * devices, so this method might return -%EBUSY if there's no
432 * @free_ibi: free an IBI previously requested with ->request_ibi(). The IBI
433 * should have been disabled with ->disable_irq() prior to that
434 * This method is mandatory only if ->request_ibi is not NULL.
435 * @enable_ibi: enable the IBI. Only valid if ->request_ibi() has been called
436 * prior to ->enable_ibi(). The controller should first enable
440 * This method is mandatory only if ->request_ibi is not NULL.
444 * This method is mandatory only if ->request_ibi is not NULL.
447 * in the IBI slot pool so that the controller can re-use it
449 * This method is mandatory only if ->request_ibi is not
486 * struct i3c_master_controller - I3C master controller object
487 * @dev: device to be registered to the device-model
489 * added to the list of I3C devs available on the bus
495 * @init_done: true when the bus initialization is done
499 * @boardinfo: board-level information attached to devices connected on the bus
500 * @bus: I3C bus exposed by this master
504 * requires taking the bus lock in maintenance, which in turn, can only
505 * be done from a sleep-able context
524 struct i3c_bus bus; member
529 * i3c_bus_for_each_i2cdev() - iterate over all I2C devices present on the bus
530 * @bus: the I3C bus
534 * Iterate over all I2C devs present on the bus.
536 #define i3c_bus_for_each_i2cdev(bus, dev) \ argument
537 list_for_each_entry(dev, &(bus)->devs.i2c, common.node)
540 * i3c_bus_for_each_i3cdev() - iterate over all I3C devices present on the bus
541 * @bus: the I3C bus
545 * Iterate over all I3C devs present on the bus.
547 #define i3c_bus_for_each_i3cdev(bus, dev) \ argument
548 list_for_each_entry(dev, &(bus)->devs.i3c, common.node)
580 * i3c_dev_get_master_data() - get master private data attached to an I3C
589 return dev->common.master_priv; in i3c_dev_get_master_data()
593 * i3c_dev_set_master_data() - attach master private data to an I3C device
598 * This functions allows a master controller to attach per-device private data
604 dev->common.master_priv = data; in i3c_dev_set_master_data()
608 * i2c_dev_get_master_data() - get master private data attached to an I2C
617 return dev->common.master_priv; in i2c_dev_get_master_data()
621 * i2c_dev_set_master_data() - attach master private data to an I2C device
626 * This functions allows a master controller to attach per-device private data
632 dev->common.master_priv = data; in i2c_dev_set_master_data()
636 * i3c_dev_get_master() - get master used to communicate with a device
644 return dev->common.master; in i3c_dev_get_master()
648 * i2c_dev_get_master() - get master used to communicate with a device
656 return dev->common.master; in i2c_dev_get_master()
660 * i3c_master_get_bus() - get the bus attached to a master
663 * Return: the I3C bus @master is connected to
668 return &master->bus; in i3c_master_get_bus()
687 void i3c_for_each_bus_locked(int (*fn)(struct i3c_bus *bus, void *data),