usb.h (92d1e87e627a6e5c9c5111adb95b6eae8df124c7) usb.h (659ab7a49cbebe0deffcbe1f9560e82006b21817)
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef __LINUX_USB_H
3#define __LINUX_USB_H
4
5#include <linux/mod_devicetable.h>
6#include <linux/usb/ch9.h>
7
8#define USB_MAJOR 180

--- 732 unchanged lines hidden (view full) ---

741#define usb_trylock_device(udev) device_trylock(&(udev)->dev)
742extern int usb_lock_device_for_reset(struct usb_device *udev,
743 const struct usb_interface *iface);
744
745/* USB port reset for device reinitialization */
746extern int usb_reset_device(struct usb_device *dev);
747extern void usb_queue_reset_device(struct usb_interface *dev);
748
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef __LINUX_USB_H
3#define __LINUX_USB_H
4
5#include <linux/mod_devicetable.h>
6#include <linux/usb/ch9.h>
7
8#define USB_MAJOR 180

--- 732 unchanged lines hidden (view full) ---

741#define usb_trylock_device(udev) device_trylock(&(udev)->dev)
742extern int usb_lock_device_for_reset(struct usb_device *udev,
743 const struct usb_interface *iface);
744
745/* USB port reset for device reinitialization */
746extern int usb_reset_device(struct usb_device *dev);
747extern void usb_queue_reset_device(struct usb_interface *dev);
748
749extern struct device *usb_intf_get_dma_device(struct usb_interface *intf);
750
749#ifdef CONFIG_ACPI
750extern int usb_acpi_set_power_state(struct usb_device *hdev, int index,
751 bool enable);
752extern bool usb_acpi_power_manageable(struct usb_device *hdev, int index);
753#else
754static inline int usb_acpi_set_power_state(struct usb_device *hdev, int index,
755 bool enable) { return 0; }
756static inline bool usb_acpi_power_manageable(struct usb_device *hdev, int index)

--- 495 unchanged lines hidden (view full) ---

1252 struct usbdrv_wrap drvwrap;
1253 const struct usb_device_id *id_table;
1254 unsigned int supports_autosuspend:1;
1255 unsigned int generic_subclass:1;
1256};
1257#define to_usb_device_driver(d) container_of(d, struct usb_device_driver, \
1258 drvwrap.driver)
1259
751#ifdef CONFIG_ACPI
752extern int usb_acpi_set_power_state(struct usb_device *hdev, int index,
753 bool enable);
754extern bool usb_acpi_power_manageable(struct usb_device *hdev, int index);
755#else
756static inline int usb_acpi_set_power_state(struct usb_device *hdev, int index,
757 bool enable) { return 0; }
758static inline bool usb_acpi_power_manageable(struct usb_device *hdev, int index)

--- 495 unchanged lines hidden (view full) ---

1254 struct usbdrv_wrap drvwrap;
1255 const struct usb_device_id *id_table;
1256 unsigned int supports_autosuspend:1;
1257 unsigned int generic_subclass:1;
1258};
1259#define to_usb_device_driver(d) container_of(d, struct usb_device_driver, \
1260 drvwrap.driver)
1261
1262extern struct bus_type usb_bus_type;
1263
1260/**
1261 * struct usb_class_driver - identifies a USB driver that wants to use the USB major number
1262 * @name: the usb class device name for this driver. Will show up in sysfs.
1263 * @devnode: Callback to provide a naming hint for a possible
1264 * device node to create.
1265 * @fops: pointer to the struct file_operations of this driver.
1266 * @minor_base: the start of the minor range for this driver.
1267 *

--- 771 unchanged lines hidden ---
1264/**
1265 * struct usb_class_driver - identifies a USB driver that wants to use the USB major number
1266 * @name: the usb class device name for this driver. Will show up in sysfs.
1267 * @devnode: Callback to provide a naming hint for a possible
1268 * device node to create.
1269 * @fops: pointer to the struct file_operations of this driver.
1270 * @minor_base: the start of the minor range for this driver.
1271 *

--- 771 unchanged lines hidden ---