From: Roger Quadros <rogerq@ti.com>
To: Thinh Nguyen <thinh.nguyen@synopsys.com>,
Felipe Balbi <balbi@kernel.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Cc: John Youn <john.youn@synopsys.com>
Subject: [3/3] usb: dwc3: Support option to disable USB2 LPM
Date: Mon, 12 Nov 2018 12:45:30 +0200 [thread overview]
Message-ID: <5BE959CA.8090307@ti.com> (raw)
Thinh,
On 12/11/18 07:29, Thinh Nguyen wrote:
> Hi Roger,
>
> On 11/9/2018 3:58 AM, Roger Quadros wrote:
>> Hi,
>>
>> On 08/11/18 04:10, Thinh Nguyen wrote:
>>> Support the option to disable USB2 LPM. Set xhci "usb2-lpm-disable"
>>> property via "snps,usb2-lpm-disable" property.
>>>
>>> Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
>>> ---
>>> drivers/usb/dwc3/core.c | 2 ++
>>> drivers/usb/dwc3/core.h | 2 ++
>>> drivers/usb/dwc3/host.c | 5 ++++-
>>> 3 files changed, 8 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
>>> index a4068a7b95dd..f6b80a545a78 100644
>>> --- a/drivers/usb/dwc3/core.c
>>> +++ b/drivers/usb/dwc3/core.c
>>> @@ -1248,6 +1248,8 @@ static void dwc3_get_properties(struct dwc3 *dwc)
>>> &hird_threshold);
>>> dwc->usb3_lpm_capable = device_property_read_bool(dev,
>>> "snps,usb3_lpm_capable");
>>> + dwc->usb2_lpm_disable = device_property_read_bool(dev,
>>> + "snps,usb2-lpm-disable");
>> Can we use the same logic as usb3_lpm instead?
>> i.e. enable USB2 LPM only if "snps,usb2_lpm_capable" is present in DT.
>> This is because older platforms that are not tested for usb2 lpm
>> might break if you enable it by default.
>
> I follow the same logic as usb-xhci property. The usb2-lpm-disable
> property from xHCI has been around for awhile. Do you suggest to change
> the property for xHCI then?
No.
I see it now that you are just setting the XHCI property and not
doing any change in the dwc3 functionality itself.
I think your patch is correct.
>> Also can we have some consistency in usage of '-' vs '_'?
> Right.. I agree. I've been using '-' as it is the preferred syntax as
> most of the properties, but some old properties use '_'. Do you have any
> suggestion?
I'd keep it consistent to "snps,usb3_lpm_capable" so we avoid mistakes
when writing the DT.
Felipe?
cheers,
-roger
next reply other threads:[~2018-11-12 10:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-12 10:45 Roger Quadros [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-11-12 11:06 [3/3] usb: dwc3: Support option to disable USB2 LPM Roger Quadros
2018-11-12 11:03 Felipe Balbi
2018-11-12 5:29 Thinh Nguyen
2018-11-09 11:58 Roger Quadros
2018-11-08 12:22 Felipe Balbi
2018-11-08 10:58 Oliver Neukum
2018-11-08 10:48 Felipe Balbi
2018-11-08 10:47 Felipe Balbi
2018-11-08 8:25 Oliver Neukum
2018-11-08 2:10 Thinh Nguyen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5BE959CA.8090307@ti.com \
--to=rogerq@ti.com \
--cc=balbi@kernel.org \
--cc=john.youn@synopsys.com \
--cc=linux-usb@vger.kernel.org \
--cc=thinh.nguyen@synopsys.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).