From patchwork Mon Mar 20 09:34:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 6881 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp1117239wrt; Mon, 20 Mar 2023 02:47:40 -0700 (PDT) X-Google-Smtp-Source: AK7set+SV7hLitsbOpcaX+ujlRu5cms8QKHsK0qrf91Mbv2HyZ9niam+/fiSkiUVQ9YvRT5C5wTX X-Received: by 2002:a05:6a20:7aa1:b0:d9:dfc:4cb6 with SMTP id u33-20020a056a207aa100b000d90dfc4cb6mr4108087pzh.35.1679305660104; Mon, 20 Mar 2023 02:47:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679305660; cv=none; d=google.com; s=arc-20160816; b=a389tgIqJhOlSJk9Hpl7VlWJ6IDwHeQHSj0TPX8h6jdUe2QF2bynPBWKtuBWUkYK1L zn5XYIdemaLpPb/Sp3af+6OgJWMWppAD1d8BNnuF5UoXyRuZtaCaI8LNqPCOM8MhM3qx dM4R4qv/8FxqVMgQhuLalfGhuwnUC8QEnwEtLEAZDo/4YwJwF9I0ChB+5D5yEp/7fQFV hl6iUpRLt1Bwv1bT1L5KXUzIemZpxRIOWD2tBaMdg4m0ZKip/KJtKzt1qTI4PbYHmhH/ ubKCwxsPb1QzBATYCTysXTrZneNUyxjBjHCcPwvKqjoTX4C0A8PC7lSFNnTl/W61slJJ MmvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=GwY8Bz564IRgB5lAQHKrNHVXBl4ABoWm1ML/55EzSPI=; b=ycBKExT8ZeP2MxBzqRKle1lS5iHjNLvFhJoC3UZ/BoqI2UXHT3E9z1jMjzeY8pAj+h oeBoYByI6pxx/Ll9le/EzjxK7RwORbAxn6B2T3KVUT3C2bR4S7zN3rS9A0J143zo0sBx 8CtT1YBiTPKPiewX4Yav3+yVF8IGI3oKAok833oODorxCHcQlBR9wba8sRqI5gyfgsPv SjVd6IHNbCHABUkoCOc3hni3H37yR6Okm1EUWnvD450nr1K2V+R+7ZhPs7D85bGIjy9S unEhXGU2EfOGWbqmPMmWPZpwDcCCnf8/HdHNtouyn7HczfbGcB8FLMVcaxs7LU/uDuER uBIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rnET9Zz5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v71-20020a63894a000000b0050b51e62c19si10394281pgd.825.2023.03.20.02.47.25; Mon, 20 Mar 2023 02:47:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rnET9Zz5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230479AbjCTJfM (ORCPT + 99 others); Mon, 20 Mar 2023 05:35:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230510AbjCTJe5 (ORCPT ); Mon, 20 Mar 2023 05:34:57 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E280D1C590; Mon, 20 Mar 2023 02:34:56 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 5F1F9B80DB3; Mon, 20 Mar 2023 09:34:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C3784C433EF; Mon, 20 Mar 2023 09:34:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679304894; bh=ag2c2dcaduyuiuxSCK0A5eBY3Oxo/0SPlIjrrZ08ayU=; h=From:To:Cc:Subject:Date:From; b=rnET9Zz5m3Pgm87+POpjApopr1BleYlIHihy5entbvC7LhqG1ZXCZbpZjVa0unVUx sRRBKns0FaTFG+Qb3mdfA1/gFTazZpiIfsCo/phQCtAVVkIWn/r8ArjToreFtvQVvG 7YriPF8jORuAnb5sdUm2GP3x74plLmWyOhRRhcC1iS4u7AWBod6QANvmgb66QXyQo9 Dkq+0NzxHqj8dgA9cQoGhk7j+UMnhotk6FbXXyklE5QJcpOjm67CUdgRMES9Mun9oG JxxCIe000s5UgGsgMj+XwhZdL/L8PRoyLAox/H1CSEBr4xa7f95Vv/A6f0UZGNFYxl PTZJr5bXgkSXA== From: Roger Quadros To: Thinh.Nguyen@synopsys.com, stern@rowland.harvard.edu Cc: gregkh@linuxfoundation.org, vigneshr@ti.com, srk@ti.com, r-gunasekaran@ti.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Roger Quadros Subject: [RFC PATCH 0/2] usb: dwc3: Support wake-up from USB suspend. Date: Mon, 20 Mar 2023 11:34:45 +0200 Message-Id: <20230320093447.32105-1-rogerq@kernel.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760879612063340942?= X-GMAIL-MSGID: =?utf-8?q?1760879612063340942?= Hi, The current USB gadget driver behaviour is to stop the controller and disconnect from the bus during System sleep. This series introduces a new DT property that will change this behaviour and keep the controller active and connected to the bus during System sleep. This is useful for applications that want to enter a low power state when USB is suspended but remain connected so they can resume activity on USB resume. This feature introduces a new constraint if Gadget driver is connected to USB host: i.e. the gadget must be in USB suspend state to allow a System sleep as we cannot process any USB transactions when in System sleep. The system hardware is responsible to detect the end of USB suspend and wake up the system so we can begin processing the USB transactions as soon as possible. Some prior discussion about System suspend vs USB suspend can be found at [1] [1] - https://marc.info/?l=linux-usb&m=167645398109860&w=2 cheers, -roger Roger Quadros (2): dt-bindings: usb: snps,dwc3: Add 'snps,gadget-keep-connect-sys-sleep' usb: dwc3: Support 'snps,gadget-keep-connect-sys-sleep' feature .../devicetree/bindings/usb/snps,dwc3.yaml | 5 ++++ drivers/usb/dwc3/core.c | 25 ++++++++++++++----- drivers/usb/dwc3/core.h | 2 ++ drivers/usb/dwc3/gadget.c | 25 +++++++++++++++++-- 4 files changed, 49 insertions(+), 8 deletions(-)