Merge tag 'usb-for-v5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next
Felipe writes: USB: changes for v5.2 merge window With a total of 50 non-merge commits, this is not a large pull request. Most of the changes are, again, in dwc2 (37%) and dwc3 (32%) with the rest of it scattered among other UDCs, function drivers and device-tree bindings. No really big feature this time around apart from support to Amlogic being added to both dwc3 and dwc2 drivers. * tag 'usb-for-v5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb: (50 commits) usb: dwc3: Rename DWC3_DCTL_LPM_ERRATA usb: dwc3: Fix default lpm_nyet_threshold value usb: dwc3: debug: Print GET_STATUS(device) tracepoint usb: dwc3: Do core validation early on probe usb: dwc3: gadget: Set lpm_capable usb: gadget: atmel: tie wake lock to running clock usb: gadget: atmel: support USB suspend usb: gadget: atmel_usba_udc: simplify setting of interrupt-enabled mask dwc2: gadget: Fix completed transfer size calculation in DDMA usb: dwc2: Set lpm mode parameters depend on HW configuration usb: dwc2: Fix channel disable flow usb: dwc2: Set actual frame number for completed ISOC transfer usb: gadget: do not use __constant_cpu_to_le16 usb: dwc2: gadget: Increase descriptors count for ISOC's usb: introduce usb_ep_type_string() function usb: dwc3: move synchronize_irq() out of the spinlock protected block usb: dwc3: Free resource immediately after use usb: dwc3: of-simple: Convert to bulk clk API usb: dwc2: Delayed status support usb: gadget: udc: lpc32xx: rework interrupt handling ...
This commit is contained in:
@@ -3174,13 +3174,14 @@ static int usb_disable_remote_wakeup(struct usb_device *udev)
|
||||
}
|
||||
|
||||
/* Count of wakeup-enabled devices at or below udev */
|
||||
static unsigned wakeup_enabled_descendants(struct usb_device *udev)
|
||||
unsigned usb_wakeup_enabled_descendants(struct usb_device *udev)
|
||||
{
|
||||
struct usb_hub *hub = usb_hub_to_struct_hub(udev);
|
||||
|
||||
return udev->do_remote_wakeup +
|
||||
(hub ? hub->wakeup_enabled_descendants : 0);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(usb_wakeup_enabled_descendants);
|
||||
|
||||
/*
|
||||
* usb_port_suspend - suspend a usb device's upstream port
|
||||
@@ -3282,7 +3283,7 @@ int usb_port_suspend(struct usb_device *udev, pm_message_t msg)
|
||||
* Therefore we will turn on the suspend feature if udev or any of its
|
||||
* descendants is enabled for remote wakeup.
|
||||
*/
|
||||
else if (PMSG_IS_AUTO(msg) || wakeup_enabled_descendants(udev) > 0)
|
||||
else if (PMSG_IS_AUTO(msg) || usb_wakeup_enabled_descendants(udev) > 0)
|
||||
status = set_port_feature(hub->hdev, port1,
|
||||
USB_PORT_FEAT_SUSPEND);
|
||||
else {
|
||||
@@ -3686,7 +3687,7 @@ static int hub_suspend(struct usb_interface *intf, pm_message_t msg)
|
||||
}
|
||||
if (udev)
|
||||
hub->wakeup_enabled_descendants +=
|
||||
wakeup_enabled_descendants(udev);
|
||||
usb_wakeup_enabled_descendants(udev);
|
||||
}
|
||||
|
||||
if (hdev->do_remote_wakeup && hub->quirk_check_port_auto_suspend) {
|
||||
|
Reference in New Issue
Block a user