From mboxrd@z Thu Jan 1 00:00:00 1970 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 161FFC83F2B for ; Thu, 31 Aug 2023 06:30:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229666AbjHaGaG (ORCPT ); Thu, 31 Aug 2023 02:30:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343732AbjHaGaF (ORCPT ); Thu, 31 Aug 2023 02:30:05 -0400 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C8D2BE for ; Wed, 30 Aug 2023 23:30:01 -0700 (PDT) Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-52bcd4db4cbso488967a12.1 for ; Wed, 30 Aug 2023 23:30:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693463400; x=1694068200; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=WUwBGHC5VsjZQFl8xxzGqyyCgwF3lKTjHm0TdmJHFiA=; b=haFc70tGz3VgZ/nhUm0F9/wqvr9YwKYVE0PC7hJK8YXRxAcfCKLRtx+AzGfRgStgpp uSuxjo0NICpUAQXzeZxY/6cvqNxDngM+yPCMERv6RZBCfNqGTzrwhBiXokjN4O6XUe09 xdQYBLZi5ZwaWnrzKO7rgFi/GN9hdqJ+wCaKodt8xcVJyGbO614xxJI2XHkLXJuud+/4 gJT733sABLNzldLyINzRgRngdDREBVQnPO0yayVN4uZfvqSkqVfRzaPrBFziEZidG9wd c7SYk5UJKY3L4HQ6wa0CkxfvEYup88HVxMQQS3U4xPE9jssDY7i0bqnZrRocB29ofpm4 AplQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693463400; x=1694068200; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=WUwBGHC5VsjZQFl8xxzGqyyCgwF3lKTjHm0TdmJHFiA=; b=B1/xbfDNWedteBKP+i6a4/5G+t1SIlX12bLcS1lWJR3dHRwBZBo/8SGFSVnqiWjTPP f/oJRHOqo4tjWmu8b/CC/+xy5dNcZU4r2wWdrAYbyTtVtg1foOzW4ZoAH7JyjZXWWHtp Z4bSbJVqoQ41SDjT5RogmRbklVcvAsbFfd/XzTKkR96EkhRe0Sdi2A+eILn/gXro6QAN zE6Ag3NGd9PDNml1EO6d2ru8juKJKCw+lwcsbJ8QL9jMwyG8kN0ldNtCWu9aa0web2BM xVvhvq/NTUtdojFngiCAFbTfaOVH7fbcjI3b1FD/L1LxCH2lnqrwKrhqISJIXuMpZ/3N yuRQ== X-Gm-Message-State: AOJu0YwjIVwCZk/wtB93dgsrGdee6pgLyY3sAzqBH8j2OYM0BBQ/atNg aDbLHKDy+b6+2gpOmnHltt3IHQ== X-Google-Smtp-Source: AGHT+IHp2w3tyUGuLVWtNA64xNLW9YemH8IoPOq4F/4imyApmLAKS8Dl+HuDQigZxMGX0xl+6mldEA== X-Received: by 2002:aa7:d7cf:0:b0:523:2df6:396a with SMTP id e15-20020aa7d7cf000000b005232df6396amr3637022eds.37.1693463399750; Wed, 30 Aug 2023 23:29:59 -0700 (PDT) Received: from [192.168.0.22] (77-252-46-238.static.ip.netia.com.pl. [77.252.46.238]) by smtp.gmail.com with ESMTPSA id l26-20020a056402125a00b00525c01f91b0sm405241edw.42.2023.08.30.23.29.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 30 Aug 2023 23:29:59 -0700 (PDT) Message-ID: Date: Thu, 31 Aug 2023 08:29:57 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 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 , Elson Serrao Cc: 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" References: <31fa930a-51fb-6a7f-300d-e71f6b399eb1@linaro.org> <5dfae814-7233-eb1f-cae7-f335e54ce1b6@linaro.org> <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> From: Krzysztof Kozlowski In-Reply-To: <20230831030134.z46fjwyr6edl3t7x@synopsys.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org On 31/08/2023 05:01, Thinh Nguyen wrote: > On Wed, Aug 30, 2023, Krzysztof Kozlowski wrote: >> On 30/08/2023 06:31, Elson Serrao wrote: >>> >>> >>> On 8/29/2023 6:37 PM, Thinh Nguyen wrote: >>>> Just want to clarify, there are dwc3 properties and there are dt binding >>>> properties. Often the case that dt binding matches 1-to-1 with dwc3 >>>> driver property. Now, we need to enhance the checkers so that the dwc3 >>>> driver property to match cases where it is platform specific and through >>>> compatible string. >>>> >>> >>> Thank you for the clarification Thinh. >>> To confirm, we would need to modify the driver to parse a new compatible >>> string (say "snps,dwc3-ext-wakeup") and add .data field so that the >>> driver is aware that this particular platform supports external wakeup >>> detection.Right ? >> >> No, it's not then platform specific. You said it depends on each >> platform. Platform is Qualcomm SM8450 for example. >> > > Hi Elson, > > Use the compatible string of your platform. > > e.g. > if (dev->of_node) { > struct device_node *parent = of_get_parent(dev->of_node); > > dwc->no_disconnect_on_usb_suspend = > of_device_is_compatible(parent, "qcom,your-compatible-string") || > of_device_is_compatible(parent, "some-other-platform"); > } > > You need to enhance dwc3_get_properties(). This may get big as dwc3 adds > more properties. Perhaps you can help come up with ideas to keep this > clean. Perhaps we can separate this out of dwc3 core.c? This should be a flag or quirk in device ID table match data. Best regards, Krzysztof