Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3456542rdg; Tue, 17 Oct 2023 15:59:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFlSDfs7fNIU4eud24YAxY/CqkosRdBhD6ViT0HYZLbHete3nRCo0z4gvj7h81sUM5lr2Xy X-Received: by 2002:a92:ca85:0:b0:34f:f5a4:3e68 with SMTP id t5-20020a92ca85000000b0034ff5a43e68mr3789535ilo.30.1697583580137; Tue, 17 Oct 2023 15:59:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697583580; cv=none; d=google.com; s=arc-20160816; b=OlknR5vjiCYdStuwLCzXSOFQe3ozzpFMGUq5KjasO6LZD/BevIXvV82wCYpVrXF5IU etU6FSePVaPQwnEoVve9LyH3EAHz9NWvm1v5Zq/oAE7ma/glc84b5WNGZPJLfkvnU/Tc y3FlkDPYKbJFWSPhLswDZzHHGUXYyHaSbxhW/mdlHl6yDi0rUZQBqpww+s1CjluvvseJ 2ayL65rGfoCehf5i2dC1rTCrx7RTB464yaJh0SK237ZRsHg+UH/9pekuexoxVI7XsQVn +N8bbx5JFi62ZsEGMC6lNGl3kZ7/NBEUjvpQzO3pUgXzdOWoakkduVUIBAwbf4uYiStP sl+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=iz0L8alZ+dPfV19ATH3djg35IWvxdhzam4YmjqjCkjo=; fh=4rRFWsgePE8Vuyfy2HpNtp5DJEWmu6QXDLRxqvaHMsc=; b=x6tl1k7mnvlOQDANsvNJAryED7yh+WOvgxQaCZ4nLOtLnGtvisf7E34QyGgyvfEWOc utlUmCwCHznKS0F+aFjYgTLkbSwAc7if6W9UekAV84u31rf0APYFesG9EPmAAblneF++ JRrXF4U2CWGrPNVu1rjtXytrVDmXI8FX5HsRnC8qn/VV0M+I+8XbwPyw1DZbirff7d3J 6LzaekVYGtTGuidaQS1TpGNQuSCLPRMiB4xQDddbf8H3Sa1l0fN/Cu8jnmuRq4EQqS8X 9ZdcaLB2D/TZ89U6Z8PFM1S8RTLypWArQ78UTKNXyl3wv8zfjq4YXpgIuxKmxJdT4tLC os0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=jSoDuA7e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id ca24-20020a056a02069800b0055793097dbesi951795pgb.469.2023.10.17.15.59.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 15:59:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=jSoDuA7e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id A5F4780DD69A; Tue, 17 Oct 2023 15:59:37 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231944AbjJQW7b (ORCPT + 99 others); Tue, 17 Oct 2023 18:59:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229459AbjJQW73 (ORCPT ); Tue, 17 Oct 2023 18:59:29 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84E72A4; Tue, 17 Oct 2023 15:59:28 -0700 (PDT) Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39HMH8TN014215; Tue, 17 Oct 2023 22:59:23 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=iz0L8alZ+dPfV19ATH3djg35IWvxdhzam4YmjqjCkjo=; b=jSoDuA7ev1ETkG3XAxlgNryICVimHkObpzvNxVmdmVJTO9JEfUEcVMClGgucImwmRsUo K1KLndqHvxqRsb4kyZhIAe1hso4YPXYFhvdyjULou5I1R5GoOcCqf8FPHlAdzpTLzeIG n/lFEJktp97sfjdA0q+R8YJOWMraekcPo890IUAc0U94Bd1YEte0/wnCjW0NzwK7sel6 uebKONjziO+f/5ZkJbsjqFtwrtWTNlGCApUnHfRxAajsEtQxHRh8yhejeHzL1txQyXP+ coBvW1eSSB6jPydVmEnrVJFSUbMq058BsqgFvO1AJkgFYLF6qbP8qoiHZT78N1fDQIeB 3A== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3tstv9sb4p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 Oct 2023 22:59:23 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 39HMxMjZ020335 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 Oct 2023 22:59:22 GMT Received: from [10.110.113.170] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.39; Tue, 17 Oct 2023 15:59:21 -0700 Message-ID: Date: Tue, 17 Oct 2023 15:59:12 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH v4 2/3] dt-bindings: usb: snps,dwc3: Add runtime-suspend-on-usb-suspend property Content-Language: en-US To: Thinh Nguyen CC: Krzysztof Kozlowski , Roger Quadros , "gregkh@linuxfoundation.org" , "robh+dt@kernel.org" , "krzysztof.kozlowski+dt@linaro.org" , "conor+dt@kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-usb@vger.kernel.org" , "quic_kriskura@quicinc.com" References: <20230826015257.mbogiefsbz5474ft@synopsys.com> <969988f6-f01f-0e31-6a98-7d02c5a3a4ad@quicinc.com> <20230830013739.srnh2uyhly66yvu2@synopsys.com> <6f70a710-c409-23c0-890b-370ccd23e088@linaro.org> <20230831030134.z46fjwyr6edl3t7x@synopsys.com> <63c9ced1-6204-88e9-1dae-2979388bbc67@quicinc.com> <20231002185606.eumc37ezthov7uge@synopsys.com> From: Elson Serrao In-Reply-To: <20231002185606.eumc37ezthov7uge@synopsys.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: Gbb8RL7rkAk20j4csSo-X87zomLET5Xa X-Proofpoint-ORIG-GUID: Gbb8RL7rkAk20j4csSo-X87zomLET5Xa X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-17_06,2023-10-17_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 phishscore=0 priorityscore=1501 mlxlogscore=777 impostorscore=0 suspectscore=0 adultscore=0 lowpriorityscore=0 bulkscore=0 malwarescore=0 clxscore=1011 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2310170194 X-Spam-Status: No, score=-4.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Tue, 17 Oct 2023 15:59:37 -0700 (PDT) >> HI Thinh >> >> Apologies for the delayed response. >> Series https://urldefense.com/v3/__https://patchwork.kernel.org/project/linux-usb/cover/1655094654-24052-1-git-send-email-quic_kriskura@quicinc.com/__;!!A4F2R9G_pg!YGlVy7No98zfEM-X5iWRhIUJ-gJEJn_gbTR4k12avzENV1TXf7cwJLZUezYzAU-rnHIbbqA1UWM0IE0R-t5SMMTJLwLZ$ >> from Krishna K, introduced a dt property 'wakeup-source' which indicates a >> platforms capability to handle wakeup interrupts. Based on this property, >> glue drivers can inform dwc3 core that the device is wakeup capable through >> device_init_wakeup(). For example dwc3-qcom driver informs it like below as >> per the implementation done in the above series >> >> wakeup_source = of_property_read_bool(dev->of_node, "wakeup-source"); >> device_init_wakeup(&pdev->dev, wakeup_source); >> device_init_wakeup(&qcom->dwc3->dev, wakeup_source); >> >> The dwc3 core now can access this info through device_may_wakeup(dwc->dev) >> while checking for bus suspend scenario to know whether the platform is >> capable of detecting wakeup. >> >> Please let me know your thoughts on this approach. >> > > Hi Elson, > > I think that it may not work for everyone. Some platforms may indicate > wakeup-source but should only be applicable in selected scenarios. > (e.g. Roger's platform was only intended to keep connect on suspend) > > Also, how will you disable it for certain platforms? Probably will need > to use compatible string then too. > Hi Thinh Thank you for your feedback. As an alternative approach, how about exposing an API from dwc3 core that glue drivers can call to enable runtime suspend during bus suspend feature ( i.e this API sets dwc->runtime_suspend_on_usb_suspend field). Only the platforms that need this feature to be enabled, can call this API after the child (dwc3 core) probe. Thanks Elson