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.
55 * @suspend: Called when a device on this bus wants to go to sleep mode.
56 * @resume: Called to bring a device on this bus out of sleep mode.
58 * bus supports.
60 * this bus.
62 * this bus.
63 * @pm: Power management operations of this bus, callback the specific
65 * @need_parent_lock: When probing or removing a device on this bus, the
68 * A bus is a channel between the processor and one or more devices. For the
69 * purposes of the device model, all devices are connected via a bus, even if
70 * it is an internal, virtual, "platform" bus. Buses can plug into each other.
73 * A bus is represented by the bus_type structure. It contains the name, the
74 * default attributes, the bus' methods, PM operations, and the driver core's
107 int __must_check bus_register(const struct bus_type *bus);
109 void bus_unregister(const struct bus_type *bus);
111 int __must_check bus_rescan_devices(const struct bus_type *bus);
115 ssize_t (*show)(const struct bus_type *bus, char *buf);
116 ssize_t (*store)(const struct bus_type *bus, const char *buf, size_t count);
126 int __must_check bus_create_file(const struct bus_type *bus, struct bus_attribute *attr);
127 void bus_remove_file(const struct bus_type *bus, struct bus_attribute *attr);
142 int bus_for_each_dev(const struct bus_type *bus, struct device *start, void *data,
144 struct device *bus_find_device(const struct bus_type *bus, struct device *start,
149 * @bus: bus type
153 static inline struct device *bus_find_device_by_name(const struct bus_type *bus, in bus_find_device_by_name() argument
157 return bus_find_device(bus, start, name, device_match_name); in bus_find_device_by_name()
163 * @bus: bus type
167 bus_find_device_by_of_node(const struct bus_type *bus, const struct device_node *np) in bus_find_device_by_of_node() argument
169 return bus_find_device(bus, NULL, np, device_match_of_node); in bus_find_device_by_of_node()
175 * @bus: bus type
179 bus_find_device_by_fwnode(const struct bus_type *bus, const struct fwnode_handle *fwnode) in bus_find_device_by_fwnode() argument
181 return bus_find_device(bus, NULL, fwnode, device_match_fwnode); in bus_find_device_by_fwnode()
187 * @bus: bus type
190 static inline struct device *bus_find_device_by_devt(const struct bus_type *bus, in bus_find_device_by_devt() argument
193 return bus_find_device(bus, NULL, &devt, device_match_devt); in bus_find_device_by_devt()
198 * given bus.
199 * @bus: bus type
203 bus_find_next_device(const struct bus_type *bus,struct device *cur) in bus_find_next_device() argument
205 return bus_find_device(bus, cur, NULL, device_match_any); in bus_find_next_device()
214 * @bus: bus type
218 bus_find_device_by_acpi_dev(const struct bus_type *bus, const struct acpi_device *adev) in bus_find_device_by_acpi_dev() argument
220 return bus_find_device(bus, NULL, adev, device_match_acpi_dev); in bus_find_device_by_acpi_dev()
224 bus_find_device_by_acpi_dev(const struct bus_type *bus, const void *adev) in bus_find_device_by_acpi_dev() argument
230 int bus_for_each_drv(const struct bus_type *bus, struct device_driver *start,
232 void bus_sort_breadthfirst(const struct bus_type *bus,
236 * Bus notifiers: Get notified of addition/removal of devices
243 int bus_register_notifier(const struct bus_type *bus, struct notifier_block *nb);
244 int bus_unregister_notifier(const struct bus_type *bus, struct notifier_block *nb);
247 * enum bus_notifier_event - Bus Notifier events that have happened
248 * @BUS_NOTIFY_ADD_DEVICE: device is added to this bus
249 * @BUS_NOTIFY_DEL_DEVICE: device is about to be removed from this bus
250 * @BUS_NOTIFY_REMOVED_DEVICE: device is successfully removed from this bus
251 * @BUS_NOTIFY_BIND_DRIVER: a driver is about to be bound to this device on this bus
252 * @BUS_NOTIFY_BOUND_DRIVER: a driver is successfully bound to this device on this bus
253 * @BUS_NOTIFY_UNBIND_DRIVER: a driver is about to be unbound from this device on this bus
254 * @BUS_NOTIFY_UNBOUND_DRIVER: a driver is successfully unbound from this device on this bus
255 * @BUS_NOTIFY_DRIVER_NOT_BOUND: a driver failed to be bound to this device on this bus
257 * These are the value passed to a bus notifier when a specific event happens.
259 * Note that bus notifiers are likely to be called with the device lock already
263 * All bus notifiers are called with the target struct device * as an argument.
276 struct kset *bus_get_kset(const struct bus_type *bus);
277 struct device *bus_get_dev_root(const struct bus_type *bus);