• O
    Bluetooth: Add USB autosuspend support to btusb driver · 7bee549e
    Oliver Neukum 提交于
    This patch adds support of USB autosuspend to the btusb driver.
    
    If the device doesn't support remote wakeup, simple support based on
    up/down is provided. If the device supports remote wakeup, additional
    support for autosuspend while the interface is up is provided. This is
    done by queueing URBs in an anchor structure and waking the device up
    from a work queue on sending. Reception triggers remote wakeup.
    
    The last busy facility of the USB autosuspend code is used. To close
    a race between autosuspend and transmission, a counter of ongoing
    transmissions is maintained.
    
    Add #ifdefs for CONFIG_PM as necessary.
    Signed-off-by: NOliver Neukum <oliver@neukum.org>
    Tested-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
    Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
    7bee549e
btusb.c 27.2 KB