1USB_AUTOPM_PUT_INTER(9)          USB Core APIs         USB_AUTOPM_PUT_INTER(9)
2
3
4

NAME

6       usb_autopm_put_interface - decrement a USB interface´s PM-usage counter
7

SYNOPSIS

9       void usb_autopm_put_interface(struct usb_interface * intf);
10

ARGUMENTS

12       intf
13           the usb_interface whose counter should be decremented
14

DESCRIPTION

16       This routine should be called by an interface driver when it is
17       finished using intf and wants to allow it to autosuspend. A typical
18       example would be a character-device driver when its device file is
19       closed.
20
21       The routine decrements intf´s usage counter. When the counter reaches
22       0, a delayed autosuspend request for intf´s device is queued. When the
23       delay expires, if intf->pm_usage_cnt is still <= 0 along with all the
24       other usage counters for the sibling interfaces and intf´s usb_device,
25       the device and all its interfaces will be autosuspended.
26
27       Note that intf->pm_usage_cnt is owned by the interface driver. The core
28       will not change its value other than the increment and decrement in
29       usb_autopm_get_interface and usb_autopm_put_interface. The driver may
30       use this simple counter-oriented discipline or may set the value any
31       way it likes.
32
33       If the driver has set intf->needs_remote_wakeup then autosuspend will
34       take place only if the device´s remote-wakeup facility is enabled.
35
36       Suspend method calls queued by this routine can arrive at any time
37       while intf is resumed and its usage counter is equal to 0. They are not
38       protected by the usb_device´s lock but only by its pm_mutex. Drivers
39       must provide their own synchronization.
40
41       This routine can run only in process context.
42
44Kernel Hackers Manual 2.6.         June 2019           USB_AUTOPM_PUT_INTER(9)
Impressum