Lines Matching full:bus

3  * bus.h - the bus-specific portions of the driver model
25 * struct bus_type - The bus type of the device
27 * @name: The name of the bus.
29 * @bus_groups: Default attributes of the bus.
30 * @dev_groups: Default attributes of the devices on the bus.
31 * @drv_groups: Default attributes of the device drivers on the bus.
33 * is added for this bus. It should return a positive value if the
40 * @probe: Called when a new device or driver add to this bus, and callback
49 * @remove: Called when a device removed from this bus.
51 * @irq_get_affinity: Get IRQ affinity mask for the device on this bus.
56 * @suspend: Called when a device on this bus wants to go to sleep mode.
57 * @resume: Called to bring a device on this bus out of sleep mode.
59 * bus supports.
61 * this bus.
63 * this bus.
64 * @pm: Power management operations of this bus, callback the specific
66 * @need_parent_lock: When probing or removing a device on this bus, the
69 * A bus is a channel between the processor and one or more devices. For the
70 * purposes of the device model, all devices are connected via a bus, even if
71 * it is an internal, virtual, "platform" bus. Buses can plug into each other.
74 * A bus is represented by the bus_type structure. It contains the name, the
75 * default attributes, the bus' methods, PM operations, and the driver core's
110 int __must_check bus_register(const struct bus_type *bus);
112 void bus_unregister(const struct bus_type *bus);
114 int __must_check bus_rescan_devices(const struct bus_type *bus);
118 ssize_t (*show)(const struct bus_type *bus, char *buf);
119 ssize_t (*store)(const struct bus_type *bus, const char *buf, size_t count);
129 int __must_check bus_create_file(const struct bus_type *bus, struct bus_attribute *attr);
130 void bus_remove_file(const struct bus_type *bus, struct bus_attribute *attr);
149 int bus_for_each_dev(const struct bus_type *bus, struct device *start,
151 struct device *bus_find_device(const struct bus_type *bus, struct device *start,
156 * @bus: bus type
160 static inline struct device *bus_find_device_by_name(const struct bus_type *bus, in bus_find_device_by_name() argument
164 return bus_find_device(bus, start, name, device_match_name); in bus_find_device_by_name()
170 * @bus: bus type
174 bus_find_device_by_of_node(const struct bus_type *bus, const struct device_node *np) in bus_find_device_by_of_node() argument
176 return bus_find_device(bus, NULL, np, device_match_of_node); in bus_find_device_by_of_node()
182 * @bus: bus type
186 bus_find_device_by_fwnode(const struct bus_type *bus, const struct fwnode_handle *fwnode) in bus_find_device_by_fwnode() argument
188 return bus_find_device(bus, NULL, fwnode, device_match_fwnode); in bus_find_device_by_fwnode()
194 * @bus: bus type
197 static inline struct device *bus_find_device_by_devt(const struct bus_type *bus, in bus_find_device_by_devt() argument
200 return bus_find_device(bus, NULL, &devt, device_match_devt); in bus_find_device_by_devt()
205 * given bus.
206 * @bus: bus type
210 bus_find_next_device(const struct bus_type *bus,struct device *cur) in bus_find_next_device() argument
212 return bus_find_device(bus, cur, NULL, device_match_any); in bus_find_next_device()
221 * @bus: bus type
225 bus_find_device_by_acpi_dev(const struct bus_type *bus, const struct acpi_device *adev) in bus_find_device_by_acpi_dev() argument
227 return bus_find_device(bus, NULL, adev, device_match_acpi_dev); in bus_find_device_by_acpi_dev()
231 bus_find_device_by_acpi_dev(const struct bus_type *bus, const void *adev) in bus_find_device_by_acpi_dev() argument
237 int bus_for_each_drv(const struct bus_type *bus, struct device_driver *start,
239 void bus_sort_breadthfirst(const struct bus_type *bus,
243 * Bus notifiers: Get notified of addition/removal of devices
250 int bus_register_notifier(const struct bus_type *bus, struct notifier_block *nb);
251 int bus_unregister_notifier(const struct bus_type *bus, struct notifier_block *nb);
254 * enum bus_notifier_event - Bus Notifier events that have happened
255 * @BUS_NOTIFY_ADD_DEVICE: device is added to this bus
256 * @BUS_NOTIFY_DEL_DEVICE: device is about to be removed from this bus
257 * @BUS_NOTIFY_REMOVED_DEVICE: device is successfully removed from this bus
258 * @BUS_NOTIFY_BIND_DRIVER: a driver is about to be bound to this device on this bus
259 * @BUS_NOTIFY_BOUND_DRIVER: a driver is successfully bound to this device on this bus
260 * @BUS_NOTIFY_UNBIND_DRIVER: a driver is about to be unbound from this device on this bus
261 * @BUS_NOTIFY_UNBOUND_DRIVER: a driver is successfully unbound from this device on this bus
262 * @BUS_NOTIFY_DRIVER_NOT_BOUND: a driver failed to be bound to this device on this bus
264 * These are the value passed to a bus notifier when a specific event happens.
266 * Note that bus notifiers are likely to be called with the device lock already
270 * All bus notifiers are called with the target struct device * as an argument.
283 struct kset *bus_get_kset(const struct bus_type *bus);
284 struct device *bus_get_dev_root(const struct bus_type *bus);