From: Nicolas Ferre <nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
To: Alexandre Belloni
<alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
"Yang,
Wenyou" <Wenyou.Yang-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>,
Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Alan Stern
<stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org>,
Greg Kroah-Hartman
<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Ian Campbell
<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
"linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH v3 1/2] usb: ohci-at91: Forcibly suspend ports while USB suspend
Date: Mon, 20 Jun 2016 11:21:37 +0200 [thread overview]
Message-ID: <5767B5A1.4040307@atmel.com> (raw)
In-Reply-To: <20160620085205.GN5809-m++hUPXGwpdeoWH0uzbU5w@public.gmane.org>
Le 20/06/2016 10:52, Alexandre Belloni a écrit :
> On 20/06/2016 at 08:46:02 +0000, Yang, Wenyou wrote :
>> Hi Alexandre & Nicolas,
>>
>>> -----Original Message-----
>>> From: Alexandre Belloni [mailto:alexandre.belloni-wi1+55ScJUtKEb57/3fJTGGXanvQGlWp@public.gmane.orgm]
>>> Sent: 2016年6月20日 16:04
>>> To: Yang, Wenyou <Wenyou.Yang-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
>>> Cc: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>; Alan Stern <stern-nwvwT67g6+6OqQnuSApjIw@public.gmane.orgd.edu>;
>>> Greg Kroah-Hartman <gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>; Ferre, Nicolas
>>> <Nicolas.FERRE-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>; Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>; Mark Brown
>>> <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>; Ian Campbell <ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>; Kumar
>>> Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>; linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org;
>>> devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org; linux-
>>> usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 :
>>>>> Sure, what I mean is that you can try to get the regmap for the SFR in every
>>> case.
>>>>> 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.
>>>>
>>>
>>> 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.
>
>> 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,
>>> Alexandre Belloni, Free Electrons
>>> Embedded Linux, Kernel and Android engineering http://free-electrons.com
>>
>>
>> Best Regards,
>> Wenyou Yang
>
--
Nicolas Ferre
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-06-20 9:21 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-08 4:15 [PATCH v3 0/2] ARM: ohci-at91: Add support to forcibly suspend ports while sleep Wenyou Yang
[not found] ` <1465359311-14544-1-git-send-email-wenyou.yang-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2016-06-08 4:15 ` [PATCH v3 1/2] usb: ohci-at91: Forcibly suspend ports while USB suspend Wenyou Yang
2016-06-08 10:04 ` Nicolas Ferre
[not found] ` <5757EDB4.3020806-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2016-06-08 10:45 ` Nicolas Ferre
[not found] ` <5757F753.8010408-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2016-06-20 7:49 ` Yang, Wenyou
[not found] ` <1465359311-14544-2-git-send-email-wenyou.yang-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2016-06-08 19:13 ` Alan Stern
2016-06-10 8:58 ` Yang, Wenyou
2016-06-08 20:26 ` Rob Herring
2016-06-08 20:38 ` Alexandre Belloni
2016-06-17 13:44 ` Yang, Wenyou
2016-06-17 13:54 ` Alexandre Belloni
[not found] ` <20160617135448.GI5809-m++hUPXGwpdeoWH0uzbU5w@public.gmane.org>
2016-06-20 3:16 ` Yang, Wenyou
2016-06-20 8:03 ` Alexandre Belloni
2016-06-20 8:46 ` Yang, Wenyou
2016-06-20 8:52 ` Alexandre Belloni
[not found] ` <20160620085205.GN5809-m++hUPXGwpdeoWH0uzbU5w@public.gmane.org>
2016-06-20 9:21 ` Nicolas Ferre [this message]
2016-06-20 7:42 ` Yang, Wenyou
2016-06-08 4:15 ` [PATCH v3 2/2] ARM: at91/dt: sama5d2: Use new compatible for ohci node Wenyou Yang
[not found] ` <1465359311-14544-3-git-send-email-wenyou.yang-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2016-06-08 10:06 ` Nicolas Ferre
[not found] ` <5757EE13.1080107-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2016-06-08 10:33 ` Alexandre Belloni
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=5767B5A1.4040307@atmel.com \
--to=nicolas.ferre-aife0yeh4naavxtiumwx3w@public.gmane.org \
--cc=Wenyou.Yang-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org \
--cc=alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
--cc=robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org \
/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).