Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3734017yba; Tue, 7 May 2019 06:19:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqy4TmtuluPK+bGRR0OyduNZUTUdISGu0G0mV+wSdaO1jF8iBzqOSoROsmWOPXiJUkdQzdDJ X-Received: by 2002:a62:1a0d:: with SMTP id a13mr23653761pfa.198.1557235148368; Tue, 07 May 2019 06:19:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557235148; cv=none; d=google.com; s=arc-20160816; b=TtEc62Dy8JyzFj4JuGUl8ed5OjmBh/tf8YyfGSqWPj62Ehxy3FPCq5WpJWPYfoYnw0 Efd16cItKW9PWGNOvrZM6v/ZojOJPZGJ/a1VcBH8MroFAMiIqTNpej05gHrJNjOrsVV/ DOZnt8UIajn+cH7H5LsRJBFDrfd9LMSx7bDAheQ4z29wu6qvtHZdicNkoM4OwC04rYJg Ozuamb76luuk4H2fTikdKGLS/dhMSZko1Vt6uIhgRu+c8o4bTQJkmLHOzUQ2kJQzp4oZ aAexFTNXjhmT8JI9gPt0EtwkVwgF8MQuePChgzyj4xZab3orn6UdVeSDlFlswRENLEgU Fa2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=5VJaohoqIyMjY2oQrMceNpinfJ2ENl1pQOQu2/AKl4c=; b=yVKpWzuKSUIpwcz0G+tvBjRK6CcVF20j6eYVZ9i9G04cN7kEpwRd7K9L21nqW0v3iu n3V/VXImvuLZuHkhLcVfGVBj/LF4hDOSgHLdI7VRKYNNqv+HLYWE1eFI1LL2FLxOVMod RbyiaqeodIMz74zTZtHEvAOTwWZpQTbGMw5ExY5rRehk7na+qYEZ2Yqd7s98YRvk5Owv JSkgpPmGL7ARiNQQ4N8ZlIMU0+csoE+WdKwReF88UMWgfTSAEgJgQJDvwXh6GkAIfMNL LJXPAycBLgpxpafMsp8PhxNlCbE5z1QXalu8TyJTaltHt1RZ5aEWeORR0Wgef+6VDKgn 3sPg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=phaseone.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a13si18447395pfn.70.2019.05.07.06.18.52; Tue, 07 May 2019 06:19:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=phaseone.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726764AbfEGNRd (ORCPT + 99 others); Tue, 7 May 2019 09:17:33 -0400 Received: from mail1.bemta25.messagelabs.com ([195.245.230.3]:52882 "EHLO mail1.bemta25.messagelabs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726420AbfEGNRd (ORCPT ); Tue, 7 May 2019 09:17:33 -0400 Received: from [46.226.52.101] (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits)) by server-3.bemta.az-a.eu-west-1.aws.symcld.net id AB/1F-23123-96581DC5; Tue, 07 May 2019 13:17:29 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprDKsWRWlGSWpSXmKPExsUyo1hfUjez9WK MwfpFahZvHv9jtzjW9oTdYv6Rc6wWzYvXs1lc3jWHzWLRslZmi6XXLzJZtO49wm6xasEBdosr T6cyOnB5rJm3htFj56y77B6bVnWyeeyfu4bdY8v+z4wenzfJeez9/JslgD2KNTMvKb8igTXj5 /0Z7AU7BCreH+pga2DcwtvFyMkhJLCGUeLLXXsQm1fAVGLfj81MILawQITE1gvfgWwODjYBXY muO6ZdjFwcIgLfGCWmHVvFDuIwC7xllPj2qIcRpIFFQEWi7dkdNhCbUyBW4v+fwywgRUIC95k kZlyfCVbELKAp0br9NzuILSGgIbHh5jEmiM2CEidnPmGBqJGXaN46mxlks5CArMTRS7EQ5QoS Z7dMZISwkyTO9V1hm8AoMAvJ1FlIJs1CMmkBI/MqRoukosz0jJLcxMwcXUMDA11DQyNdQ0tjX SNjE73EKt1EvdRS3fLU4hJdQ73E8mK94src5JwUvbzUkk2MwJhKKTj4agfjrhXphxglOZiURH lF7C/GCPEl5adUZiQWZ8QXleakFh9ilOHgUJLg7W0GygkWpaanVqRl5gCjGyYtwcGjJMKbDpL mLS5IzC3OTIdInWLU5Vhw89c8ZiGWvPy8VClx3p0gRQIgRRmleXAjYInmEqOslDAvIwMDgxBP QWpRbmYJqvwrRnEORiVh3n6QKTyZeSVwm14BHcEEdMS8jnMgR5QkIqSkGhirPZNmcegmWswQj ty3Jn/i6uiTTR/aWq/E75t2xuVH1ZWGDQZKCl9nGClP8lBZ0ce2TJn9x4qtjtuf740QSefiVP 8YN5VdjFE0unX6KaV55zrnnFo4b2+mMjtnuHR51vxNmf+sgm++/ppvZWKv+2p68xfzSPP/c7Z ULpvQarZwNoPzv9ieIDYlluKMREMt5qLiRAABRNN8LwMAAA== X-Env-Sender: cst@phaseone.com X-Msg-Ref: server-8.tower-265.messagelabs.com!1557235049!8196729!1 X-Originating-IP: [152.115.47.25] X-SYMC-ESS-Client-Auth: outbound-route-from=pass X-StarScan-Received: X-StarScan-Version: 9.31.5; banners=-,-,- X-VirusChecked: Checked Received: (qmail 19072 invoked from network); 7 May 2019 13:17:29 -0000 Received: from unknown (HELO Exchange2.phaseone.com) (152.115.47.25) by server-8.tower-265.messagelabs.com with AES256-SHA encrypted SMTP; 7 May 2019 13:17:29 -0000 Received: from cstu16.phaseone.com (172.16.2.207) by Exchange2.phaseone.com (172.16.1.180) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 7 May 2019 15:17:28 +0200 Message-ID: <1557235048.114189.22.camel@phaseone.com> Subject: Re: [PATCH 3/3] usb: dwc3: gadget: Add support for disabling U1 and U2 entries From: "Claus H. Stovgaard" To: Anurag Kumar Vulisha , Thinh Nguyen , Greg Kroah-Hartman , Rob Herring , "Mark Rutland" , Felipe Balbi CC: "linux-usb@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "v.anuragkumar@gmail.com" Date: Tue, 7 May 2019 15:17:28 +0200 In-Reply-To: References: <1556792423-4833-1-git-send-email-anurag.kumar.vulisha@xilinx.com> <1556792423-4833-4-git-send-email-anurag.kumar.vulisha@xilinx.com> <30102591E157244384E984126FC3CB4F639E7BA8@us01wembx1.internal.synopsys.com> <1557176302.18203.20.camel@phaseone.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.5.2-0ubuntu3.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Originating-IP: [172.16.2.207] X-ClientProxiedBy: Exchange3.phaseone.com (172.16.1.184) To Exchange2.phaseone.com (172.16.1.180) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Anurag > > > Please use "-" rather than "_" in the property names. > > I have thought about this feature over the weekend, and think the > > naming should be > > changed to something like "snps,bos-u1-exit-lat-in-us" > > and named the same in the code. And then be the value used by the > > get_config_params. E.g. the device-tree is used to set the values > > directly used for > > bUxdevExitLat instead of named something not related to exit > > latency. > > > > With this the name and function is a 1 to 1 match, and you can > > among others set it to > > 0 for optaining what Anurag wants. > > > Your suggestion looks good but the problem is the U1 and U2 exit > latencies are > fixed values in dwc3 controller(can be found in HCSPARAMS3). Adding > different > exit latencies may modify the U1SEL/U2SEL values sent from the host > but the real > dwc3 controller exit latencies are not getting changed. Because of > this reason I > had opted "snps,dis_u1_entry_quirk", so that the U1/U2 exit latency > values > reported in BOS descriptor can be either be zero (when U1/U2 entries > needs to be > disabled) or non-zero value (reported in HCSPARAMS3) when U1/U2 > states allowed. > Based on this I think it is better if we can continue with "snps,dis- > u1-entry-quirk" > instead of the "snps,bos-u1-exit-lat-in-us". Please  provide your > opinion on this. With this in mind I can see why having direct control over the exit latency value might not be optimum in many situations. Regarding the name, I think the snps,dis_u1_entry_quirk will be a good name, if it is combined with the DCTL control. E.g. remove the configfs part of my patch, and merge the DCTL control with your patches. If the dt-binding still only control the bos descriptor I think a better name is something with u1_force_exist_lat_0 or similar. I don't think setting bos to 0 or controlling DCTL will be used individual, so to keep things simple I will vote for snps,dis_u1_entry_quirk, and then just control all elements regarding disabling U1/U2 from this dt-binding. Please cut what your need from my patch. BR Claus