From patchwork Tue Nov 30 10:42:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neal Liu X-Patchwork-Id: 12646781 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9F3EC433F5 for ; Tue, 30 Nov 2021 10:43:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235539AbhK3Kqi (ORCPT ); Tue, 30 Nov 2021 05:46:38 -0500 Received: from twspam01.aspeedtech.com ([211.20.114.71]:11308 "EHLO twspam01.aspeedtech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235396AbhK3Kq0 (ORCPT ); Tue, 30 Nov 2021 05:46:26 -0500 Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 1AUAIVHG077386; Tue, 30 Nov 2021 18:18:31 +0800 (GMT-8) (envelope-from neal_liu@aspeedtech.com) Received: from localhost.localdomain (192.168.10.10) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 30 Nov 2021 18:43:03 +0800 From: Neal Liu To: Felipe Balbi , Greg Kroah-Hartman , Joel Stanley , Andrew Jeffery , Cai Huoqing , Tao Ren , Julia Lawall , "kernel test robot" , Sasha Levin , , , , CC: Neal Liu , Subject: [PATCH v2 2/4] usb: aspeed-vhub: support auto remote wakeup feature Date: Tue, 30 Nov 2021 18:42:54 +0800 Message-ID: <20211130104256.3106797-3-neal_liu@aspeedtech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211130104256.3106797-1-neal_liu@aspeedtech.com> References: <20211130104256.3106797-1-neal_liu@aspeedtech.com> MIME-Version: 1.0 X-Originating-IP: [192.168.10.10] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 1AUAIVHG077386 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Remote wakeup signaling will be automatically issued whenever any write commands has been received in suspend state. Signed-off-by: Neal Liu --- drivers/usb/gadget/udc/aspeed-vhub/core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/gadget/udc/aspeed-vhub/core.c b/drivers/usb/gadget/udc/aspeed-vhub/core.c index 7a635c499777..122ee7ef0b03 100644 --- a/drivers/usb/gadget/udc/aspeed-vhub/core.c +++ b/drivers/usb/gadget/udc/aspeed-vhub/core.c @@ -240,6 +240,9 @@ void ast_vhub_init_hw(struct ast_vhub *vhub) if (vhub->force_usb1) ctrl |= VHUB_CTRL_FULL_SPEED_ONLY; + /* Enable auto remote wakeup */ + ctrl |= VHUB_CTRL_AUTO_REMOTE_WAKEUP; + ctrl |= VHUB_CTRL_UPSTREAM_CONNECT; writel(ctrl, vhub->regs + AST_VHUB_CTRL);