From patchwork Thu Mar 16 13:12:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 70786 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp481157wrt; Thu, 16 Mar 2023 06:26:24 -0700 (PDT) X-Google-Smtp-Source: AK7set+DzjA2dEdT/ndS5SlHCU9b9sqlIewTDwDitI44qD8PVEnsmHCBZRD9sL5eZfoVMvAxVwH+ X-Received: by 2002:aa7:97a2:0:b0:625:d5b5:1e9d with SMTP id d2-20020aa797a2000000b00625d5b51e9dmr3144548pfq.1.1678973184412; Thu, 16 Mar 2023 06:26:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678973184; cv=none; d=google.com; s=arc-20160816; b=xZPbRGpPo8yS6jOBbaOmkKmpdxNTgRPoeh/cNWt6cOlRxCJXw/vaYQc4mUNhHiTtRE mFIOl9/jLrM8W8p+olFqtcZ84O+Xnq8l+Oy5+HPxn0LTnp9t8OTCYueXhxz759SU9jbO K0nxvCF7JOaSMT0/s3XXRIls1MgD8B9bekSyUT5p8a/mN9849DRKH/vfvEHDn9yn4Nha KuSVg7dkN825AgvN/icZm6uhNpyZjDXtqKFkkM3asD3NY0YJWtt/QdxZmW1RvXNbBhRh o70qS8Q7pt46FCCy2MJ//XZIkVjNvwuJdYwwt9O0hxqnpTrxMU+KoVRywrC3hILpdArL eddA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=aSCNFPlD5vlrPxktzQKL9ovmSod+XcXImGuOTtOoIs8=; b=RP7txOyGGEGkiQrnBFIumfrIBNfIcgg3w3xML+Awyo9PfJpPqNAEgXU7aETrrPQEgg iNQpOWuj5QSZ6m3LV0QaVJ4dTDDWdxYFNt9YDYi9y8lcZt8vidclZ2hQpp/kEvxpcsr8 zc1WDOZam0wHVslFCoZN27ecnEq9a3aexvJ590CTAHaBm9u/7Y0vzJEcc+cZBJmnyJPh vKVIOnRCqnPdkC0+U8lgFgfubwsjfaCpKbtJbj+g5JnRDZ9hhdS+WiCar7ctIK2XNFNs zii8GnV3/i7ogP6eWiKVnfkmBmiygAtvkf3BwTmsALo5GsZj+YVwkApE6d7u4bg39ajF cHqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WTXdqjQo; 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 x24-20020a63db58000000b005034a5a0a58si7915066pgi.434.2023.03.16.06.26.09; Thu, 16 Mar 2023 06:26:24 -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=WTXdqjQo; 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 S229974AbjCPNMo (ORCPT + 99 others); Thu, 16 Mar 2023 09:12:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229961AbjCPNMn (ORCPT ); Thu, 16 Mar 2023 09:12:43 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34891C8892; Thu, 16 Mar 2023 06:12:41 -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 B75A9B82165; Thu, 16 Mar 2023 13:12:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 566E5C4339B; Thu, 16 Mar 2023 13:12:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678972358; bh=HL5dP7MWYjnhj6/1lI+kn8CzDcAzNvbbqdPcXur2MCM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WTXdqjQoiuRzU9sGCrP5pIDwZbI36MUvIl2syt78U8Q1x2dITlM6k6lIpq//C1r7L 8Ax+afySJ4xU4jESkys0RreCRvk0hrRP2u7x7r6Y+znMTughoGvEAnElXfaTieSg8d mtX8OTTQJUHN7L3oskDeXqp9zMbW4R7AaTwAc6BUDeqTYQLi6782iUp92Z3ESQlqWC 1xDhXj+bafQcZqfJAkwLEZ3dq42rtDOcQPWoMXDfx+AbR/kGE+zMujU9Ud7jm4N4lp O2Tcx6SLe9aTEWwPWt3RtcvJQgPPOUEhrd8QGjhzI50beb/I9Qd+F5ocTLTRpVsn/w JXyVJ5bneti/g== From: Roger Quadros To: Thinh.Nguyen@synopsys.com Cc: gregkh@linuxfoundation.org, stern@rowland.harvard.edu, vigneshr@ti.com, srk@ti.com, r-gunasekaran@ti.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Roger Quadros Subject: [PATCH 2/3] usb: dwc3-am62: Enable as a wakeup source by default Date: Thu, 16 Mar 2023 15:12:25 +0200 Message-Id: <20230316131226.89540-3-rogerq@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230316131226.89540-1-rogerq@kernel.org> References: <20230316131226.89540-1-rogerq@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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?1760530985663641530?= X-GMAIL-MSGID: =?utf-8?q?1760530985663641530?= USB module can wakeup system. Enable it as a wakeup source by default. Finer grain wakeup enable/disable can be done from the power/wakeup system control file of the respective USB device. Signed-off-by: Roger Quadros --- drivers/usb/dwc3/dwc3-am62.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/dwc3/dwc3-am62.c b/drivers/usb/dwc3/dwc3-am62.c index 867bfa1252b8..859b48279658 100644 --- a/drivers/usb/dwc3/dwc3-am62.c +++ b/drivers/usb/dwc3/dwc3-am62.c @@ -241,6 +241,9 @@ static int dwc3_ti_probe(struct platform_device *pdev) /* Device has capability to wakeup system from sleep */ device_set_wakeup_capable(dev, true); + ret = device_wakeup_enable(dev); + if (ret) + dev_err(dev, "couldn't enable device as a wakeup source: %d\n", ret); /* Setting up autosuspend */ pm_runtime_set_autosuspend_delay(dev, DWC3_AM62_AUTOSUSPEND_DELAY);