From patchwork Fri Dec 16 10:46:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Bailon X-Patchwork-Id: 88283 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp1329481qgi; Fri, 16 Dec 2016 02:47:10 -0800 (PST) X-Received: by 10.99.43.8 with SMTP id r8mr4442884pgr.83.1481885230434; Fri, 16 Dec 2016 02:47:10 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g1si7225079pgc.92.2016.12.16.02.47.10; Fri, 16 Dec 2016 02:47:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@baylibre-com.20150623.gappssmtp.com; spf=pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-usb-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760478AbcLPKrB (ORCPT + 4 others); Fri, 16 Dec 2016 05:47:01 -0500 Received: from mail-wm0-f53.google.com ([74.125.82.53]:36767 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760361AbcLPKqz (ORCPT ); Fri, 16 Dec 2016 05:46:55 -0500 Received: by mail-wm0-f53.google.com with SMTP id g23so27064610wme.1 for ; Fri, 16 Dec 2016 02:46:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jfnookBUefxkCkJJcxlXIZ0SpizUcNdmMz3LHx6pXW8=; b=yS0ILT0p87xBrmLEhHNccjxloZ/2sADeDYDBESNVVEpxX25XuNwGyR/yITH1AYvIj+ ADJr1m+PkSqzKl2WwXI9AN3HOvWU2OuJIemPL2qbeXNkRf7vpZNGJS6olhw0opUxmTjp 7ttTGjrxRKyNwlLRjJAEi1rxRcILwN9sfwKikjeRLdl5N36T22z6wbwswQ/hhbUaoGRa Mn3wEe8s1v0GsQ3ll+P2XSgfrprmTmGWGUNu8U7s8bnui1eo8TCPnk/eyfoG2sMmig1O ieXgHH2Pc8KGcx+9Wl6GmOABdQjXzSZR/lm2NrDdP3wub4Ij5WiZAHkgC+j8qIIbPx17 tCnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=jfnookBUefxkCkJJcxlXIZ0SpizUcNdmMz3LHx6pXW8=; b=Ne+Tp/Y4VyO5sbfKVy1f+ykxYIeB0wwTgzQmM6N3htXtkeeh/HuvnR4YN3JYaaCaP1 ABywJatwYAn4ScZMIiGtBE3MBVEagzikzp4LIWLlohy6iebttj+CAAmWbNQQGdSRvVCA dfulRlTnDTatSNjg5q2ueYk4sTreVa1lspyhMCH/oq1k5uLniKpwi2PSZjTExrvuQSEk LL6FMTZ9FvBauxz4wVP4fFQMRYqh1yMki8OcsqJpIgJ/NwQw/0UGabrqkgbU/Mnnid1P 0QjymiQtS5OKkfUHgd77kjlMDx4AxdiG2//zyQ1hXfbpRoBBr081rk64XREFCw/WX+PR j7cg== X-Gm-Message-State: AIkVDXKPcd1+yj6w1ZaV3thg6OFWd7kc6Ol1jBIBe4vXWpIgFIixf7rCl7E3KhmikDa/9qrj X-Received: by 10.28.164.196 with SMTP id n187mr2485761wme.44.1481885197744; Fri, 16 Dec 2016 02:46:37 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id z6sm6215001wjt.24.2016.12.16.02.46.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 16 Dec 2016 02:46:37 -0800 (PST) From: Alexandre Bailon To: b-liu@ti.com Cc: linux-usb@vger.kernel.org, nsekhar@ti.com, khilman@baylibre.com, ptitiano@baylibre.com, Alexandre Bailon Subject: [PATCH v2 3/3] usb: musb: da8xx: Fix host mode suspend Date: Fri, 16 Dec 2016 11:46:16 +0100 Message-Id: <1481885176-16984-4-git-send-email-abailon@baylibre.com> X-Mailer: git-send-email 2.7.3 In-Reply-To: <1481885176-16984-1-git-send-email-abailon@baylibre.com> References: <1481885176-16984-1-git-send-email-abailon@baylibre.com> Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org On da8xx, VBUS is not maintained during suspend when musb is in host mode. On resume, all the connected devices will be disconnected and then will be enumerated again. This happens because MUSB_DEVCTL is cleared during suspend. Use the quirk MUSB_PRESERVE_SESSION to preseve MUSB_DEVCTL during suspend. Signed-off-by: Alexandre Bailon --- drivers/usb/musb/da8xx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.7.3 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/usb/musb/da8xx.c b/drivers/usb/musb/da8xx.c index 7384179..69e3b40 100644 --- a/drivers/usb/musb/da8xx.c +++ b/drivers/usb/musb/da8xx.c @@ -457,7 +457,8 @@ static inline u8 get_vbus_power(struct device *dev) } static const struct musb_platform_ops da8xx_ops = { - .quirks = MUSB_DMA_CPPI | MUSB_INDEXED_EP, + .quirks = MUSB_DMA_CPPI | MUSB_INDEXED_EP | + MUSB_PRESERVE_SESSION, .init = da8xx_musb_init, .exit = da8xx_musb_exit,