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);
139 int bus_for_each_dev(const struct bus_type *bus, struct device *start, void *data,
141 struct device *bus_find_device(const struct bus_type *bus, struct device *start,
147 * @bus: bus type
151 static inline struct device *bus_find_device_by_name(const struct bus_type *bus, in bus_find_device_by_name() argument
155 return bus_find_device(bus, start, name, device_match_name); in bus_find_device_by_name()
161 * @bus: bus type
165 bus_find_device_by_of_node(const struct bus_type *bus, const struct device_node *np) in bus_find_device_by_of_node() argument
167 return bus_find_device(bus, NULL, np, device_match_of_node); in bus_find_device_by_of_node()
173 * @bus: bus type
177 bus_find_device_by_fwnode(const struct bus_type *bus, const struct fwnode_handle *fwnode) in bus_find_device_by_fwnode() argument
179 return bus_find_device(bus, NULL, fwnode, device_match_fwnode); in bus_find_device_by_fwnode()
185 * @bus: bus type
188 static inline struct device *bus_find_device_by_devt(const struct bus_type *bus, in bus_find_device_by_devt() argument
191 return bus_find_device(bus, NULL, &devt, device_match_devt); in bus_find_device_by_devt()
196 * given bus.
197 * @bus: bus type
201 bus_find_next_device(const struct bus_type *bus,struct device *cur) in bus_find_next_device() argument
203 return bus_find_device(bus, cur, NULL, device_match_any); in bus_find_next_device()
212 * @bus: bus type
216 bus_find_device_by_acpi_dev(const struct bus_type *bus, const struct acpi_device *adev) in bus_find_device_by_acpi_dev() argument
218 return bus_find_device(bus, NULL, adev, device_match_acpi_dev); in bus_find_device_by_acpi_dev()
222 bus_find_device_by_acpi_dev(const struct bus_type *bus, const void *adev) in bus_find_device_by_acpi_dev() argument
228 int bus_for_each_drv(const struct bus_type *bus, struct device_driver *start,
230 void bus_sort_breadthfirst(const struct bus_type *bus,
234 * Bus notifiers: Get notified of addition/removal of devices
241 int bus_register_notifier(const struct bus_type *bus, struct notifier_block *nb);
242 int bus_unregister_notifier(const struct bus_type *bus, struct notifier_block *nb);
245 * enum bus_notifier_event - Bus Notifier events that have happened
246 * @BUS_NOTIFY_ADD_DEVICE: device is added to this bus
247 * @BUS_NOTIFY_DEL_DEVICE: device is about to be removed from this bus
248 * @BUS_NOTIFY_REMOVED_DEVICE: device is successfully removed from this bus
249 * @BUS_NOTIFY_BIND_DRIVER: a driver is about to be bound to this device on this bus
250 * @BUS_NOTIFY_BOUND_DRIVER: a driver is successfully bound to this device on this bus
251 * @BUS_NOTIFY_UNBIND_DRIVER: a driver is about to be unbound from this device on this bus
252 * @BUS_NOTIFY_UNBOUND_DRIVER: a driver is successfully unbound from this device on this bus
253 * @BUS_NOTIFY_DRIVER_NOT_BOUND: a driver failed to be bound to this device on this bus
255 * These are the value passed to a bus notifier when a specific event happens.
257 * Note that bus notifiers are likely to be called with the device lock already
261 * All bus notifiers are called with the target struct device * as an argument.
274 struct kset *bus_get_kset(const struct bus_type *bus);
275 struct device *bus_get_dev_root(const struct bus_type *bus);