From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932289AbcGOJOn (ORCPT ); Fri, 15 Jul 2016 05:14:43 -0400 Received: from mail-pf0-f171.google.com ([209.85.192.171]:32886 "EHLO mail-pf0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932420AbcGOJOj (ORCPT ); Fri, 15 Jul 2016 05:14:39 -0400 From: Baolin Wang To: balbi@kernel.org, gregkh@linuxfoundation.org Cc: mathias.nyman@intel.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, broonie@kernel.org, baolin.wang@linaro.org Subject: [PATCH 2/4] usb: host: xhci: Introduce one new 'usb3_slow_suspend' member for xhci private data Date: Fri, 15 Jul 2016 17:13:26 +0800 Message-Id: X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now some usb controllers (such as dwc3 controller) need 'XHCI_SLOW_SUSPEND' quirk when suspending the xhci, thus we need to add 'usb3_slow_suspend' member in xhci platform data to support this. Signed-off-by: Baolin Wang --- drivers/usb/host/xhci-plat.c | 3 +++ include/linux/usb/xhci_pdriver.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index e2e2487..162f17c 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -250,6 +250,9 @@ static int xhci_plat_probe(struct platform_device *pdev) (pdata && pdata->usb3_lpm_capable)) xhci->quirks |= XHCI_LPM_SUPPORT; + if (pdata && pdata->usb3_slow_suspend) + xhci->quirks |= XHCI_SLOW_SUSPEND; + return 0; diff --git a/include/linux/usb/xhci_pdriver.h b/include/linux/usb/xhci_pdriver.h index 376654b..1276de1 100644 --- a/include/linux/usb/xhci_pdriver.h +++ b/include/linux/usb/xhci_pdriver.h @@ -18,10 +18,13 @@ * * @usb3_lpm_capable: determines if this xhci platform supports USB3 * LPM capability + * @usb3_slow_suspend: determines if it need an extraordinary delay when + * suspending xhci. * */ struct usb_xhci_pdata { unsigned usb3_lpm_capable:1; + unsigned usb3_slow_suspend:1; }; #endif /* __USB_CORE_XHCI_PDRIVER_H */ -- 1.7.9.5