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
94 * struct i3c_ibi_slot - I3C IBI (In-Band Interrupt) slot
101 * An IBI slot is an object pre-allocated by the controller and used when an
108 * simple kmalloc-based allocation, the generic IBI slot pool can be used.
118 * struct i3c_device_ibi_info - IBI information attached to a specific device
139 * i3c_device_request_ibi() is called and attached to a specific device. This
140 * object is here to manage IBIs coming from a specific I3C device.
145 * controller-private data.
158 * struct i3c_dev_boardinfo - I3C device board information
162 * but try our best to assign this specific address to the
166 * bus initialization to assign it a specific dynamic address
173 * This structure is used to attach board-level information to an I3C device.
174 * Not all I3C devices connected on the bus will have a boardinfo. It's only
176 * specific dynamic address.
187 * struct i3c_dev_desc - I3C device descriptor
191 * @ibi_lock: lock used to protect the &struct_i3c_device->ibi
196 * code should manipulate it in when updating the dev <-> desc link or
216 * struct i3c_device - I3C device object
221 * @bus: I3C bus this device is attached to
225 * All I3C devs on the I3C bus are represented, including I3C masters. For each
231 struct i3c_bus *bus; member
236 * bus is 11, but this number depends on external parameters like trace length,
237 * capacitive load per Device, and the types of Devices present on the Bus.
239 * reference and should be adjusted on a per-controller/per-board basis.
250 * enum i3c_bus_mode - I3C bus mode
251 * @I3C_BUS_MODE_PURE: only I3C devices are connected to the bus. No limitation
254 * the bus. The only impact in this mode is that the
258 * present on the bus. However they allow
262 * on the bus
272 * enum i3c_addr_slot_status - I3C address slot status
279 * On an I3C bus, addresses are assigned dynamically, and we need to know which
294 * struct i3c_bus - I3C bus object
295 * @cur_master: I3C master currently driving the bus. Since I3C is multi-master
297 * know whether it needs to request bus ownership before sending
299 * @id: bus ID. Assigned by the framework when register the bus
300 * @addrslots: a bitmap with 2-bits per-slot to encode the address status and
303 * @mode: bus mode (see &enum i3c_bus_mode)
309 * devices connected on the bus and successfully attached to the
312 * devices connected on the bus and successfully attached to the
314 * @devs: 2 lists containing all I3C/I2C devices connected to the bus
315 * @lock: read/write lock on the bus. This is needed to protect against
316 * operations that have an impact on the whole bus and the devices
326 * The I3C bus is represented with its own object and not implicitly described
327 * by the I3C master to cope with the multi-master functionality, where one bus
328 * can be shared amongst several masters, each of them requesting bus ownership
348 * struct i3c_master_controller_ops - I3C master methods
349 * @bus_init: hook responsible for the I3C bus initialization. You should at
350 * least call master_set_info() from there and set the bus mode.
351 * You can also put controller specific initialization in there.
354 * &i3c_master_controller_ops->bus_init().
356 * @attach_i3c_dev: called every time an I3C device is attached to the bus. It
362 * This is a good place to attach master controller specific
371 * @detach_i3c_dev: called when an I3C device is detached from the bus. Usually
378 * attached or re-attached to the controller.
388 * @attach_i2c_dev: called every time an I2C device is attached to the bus.
389 * This is a good place to attach master controller specific
392 * @detach_i2c_dev: called when an I2C device is detached from the bus. Usually
397 * the transfers are DMA-safe. If drivers want to have DMA-safe
404 * length and number of pre-allocated slots).
405 * Some controllers support less IBI-capable devices than regular
406 * devices, so this method might return -%EBUSY if there's no
409 * @free_ibi: free an IBI previously requested with ->request_ibi(). The IBI
410 * should have been disabled with ->disable_irq() prior to that
411 * This method is mandatory only if ->request_ibi is not NULL.
412 * @enable_ibi: enable the IBI. Only valid if ->request_ibi() has been called
413 * prior to ->enable_ibi(). The controller should first enable
417 * This method is mandatory only if ->request_ibi is not NULL.
421 * This method is mandatory only if ->request_ibi is not NULL.
424 * in the IBI slot pool so that the controller can re-use it
426 * This method is mandatory only if ->request_ibi is not
457 * struct i3c_master_controller - I3C master controller object
458 * @dev: device to be registered to the device-model
460 * added to the list of I3C devs available on the bus
466 * @init_done: true when the bus initialization is done
469 * @boardinfo: board-level information attached to devices connected on the bus
470 * @bus: I3C bus exposed by this master
474 * requires taking the bus lock in maintenance, which in turn, can only
475 * be done from a sleep-able context
493 struct i3c_bus bus; member
498 * i3c_bus_for_each_i2cdev() - iterate over all I2C devices present on the bus
499 * @bus: the I3C bus
503 * Iterate over all I2C devs present on the bus.
505 #define i3c_bus_for_each_i2cdev(bus, dev) \ argument
506 list_for_each_entry(dev, &(bus)->devs.i2c, common.node)
509 * i3c_bus_for_each_i3cdev() - iterate over all I3C devices present on the bus
510 * @bus: the I3C bus
514 * Iterate over all I3C devs present on the bus.
516 #define i3c_bus_for_each_i3cdev(bus, dev) \ argument
517 list_for_each_entry(dev, &(bus)->devs.i3c, common.node)
547 * i3c_dev_get_master_data() - get master private data attached to an I3C
556 return dev->common.master_priv; in i3c_dev_get_master_data()
560 * i3c_dev_set_master_data() - attach master private data to an I3C device
565 * This functions allows a master controller to attach per-device private data
571 dev->common.master_priv = data; in i3c_dev_set_master_data()
575 * i2c_dev_get_master_data() - get master private data attached to an I2C
584 return dev->common.master_priv; in i2c_dev_get_master_data()
588 * i2c_dev_set_master_data() - attach master private data to an I2C device
593 * This functions allows a master controller to attach per-device private data
599 dev->common.master_priv = data; in i2c_dev_set_master_data()
603 * i3c_dev_get_master() - get master used to communicate with a device
611 return dev->common.master; in i3c_dev_get_master()
615 * i2c_dev_get_master() - get master used to communicate with a device
623 return dev->common.master; in i2c_dev_get_master()
627 * i3c_master_get_bus() - get the bus attached to a master
630 * Return: the I3C bus @master is connected to
635 return &master->bus; in i3c_master_get_bus()