Thread (20 messages) flat view 20 messages, 5 authors, 2016-06-20

[PATCH v3 1/2] usb: ohci-at91: Forcibly suspend ports while USB suspend

From: Nicolas Ferre <hidden>
Date: 2016-06-20 09:21:54
Also in: linux-devicetree, lkml

Le 20/06/2016 10:52, Alexandre Belloni a ?crit :
On 20/06/2016 at 08:46:02 +0000, Yang, Wenyou wrote :
quoted
Hi Alexandre & Nicolas,
quoted
-----Original Message-----
From: Alexandre Belloni [mailto:alexandre.belloni at free-electrons.com]
Sent: 2016?6?20? 16:04
To: Yang, Wenyou <redacted>
Cc: Rob Herring <robh@kernel.org>; Alan Stern <stern@rowland.harvard.edu>;
Greg Kroah-Hartman [off-list ref]; Ferre, Nicolas
[off-list ref]; Pawel Moll [off-list ref]; Mark Brown
[off-list ref]; Ian Campbell [off-list ref]; Kumar
Gala [off-list ref]; linux-kernel at vger.kernel.org;
devicetree at vger.kernel.org; linux-arm-kernel at lists.infradead.org; linux-
usb at vger.kernel.org
Subject: Re: [PATCH v3 1/2] usb: ohci-at91: Forcibly suspend ports while USB
suspend

On 20/06/2016 at 03:16:35 +0000, Yang, Wenyou wrote :
quoted
quoted
Sure, what I mean is that you can try to get the regmap for the SFR in every
case.
quoted
quoted
Depending on whether you were able to get it, you can decide to call
ohci_at91_port_suspend/resume or not (just test for sfr_regmap != NULL).
I don't think so. The SFR includes a lot of miscellaneous functions, more than
this one.
quoted
I know but this is irrelevant to this discussion. If you need to use the SFR from
another driver you will simply get it from that other driver.

I that case, you will try to get "atmel,sama5d2-sfr". It is only present on sama5d2
so you have enough information to know whether or not you can use it to
suspend/resume.
I understand what your meaning :).
Use "atmel,sama5d2-sfr" compatible to distinguish whether forcibly suspend USB port via SFR or not.

I am not sure if it is a better solution.
It is definitively superior. There is only one lookup in the device tree
instead of two because whatever happens, you will have to get the SFR
regmap and you don't need to add a compatible string for an IP that
didn't change.
quoted
Nicolas, could you give your opinion?
I'll paraphrase Alexandre but this is what I understood:

Having the information in one place and not having to managed the
synchronization with 2 potential sources of information is clearly an
advantage of Alexandre's solution.

If the next SoC has the same workaround/feature, we will anyway have a
different SFR string to cling to...
So it won't change much and we won't have the confusion of having the
same sama5d2 compatible string on the OHCI side (same behavior) and
different compatible string on the SFR side (probably a new SFR for a
new SoC...).

If the next SoC doesn't have this workaround/feature... well, it's
simple, we don't look for the SFR, we don't use the bits, and we come
back to the situation that we've always experienced ; with the same
compatibility sting for OHCI as the IP never actually changed...

In conclusion: try Alexandre's solution and we'll certainly find that
it's actually simpler.

Bonus point: it voids the discussion on the OHCI compatible string
descriptions!

Bye,
quoted
quoted
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering http://free-electrons.com

Best Regards,
Wenyou Yang

-- 
Nicolas Ferre
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help