devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: "Yang, Wenyou" <Wenyou.Yang@atmel.com>
Cc: Rob Herring <robh@kernel.org>,
	Alan Stern <stern@rowland.harvard.edu>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Ferre, Nicolas" <Nicolas.FERRE@atmel.com>,
	Pawel Moll <pawel.moll@arm.com>, Mark Brown <broonie@kernel.org>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: Re: [PATCH v3 1/2] usb: ohci-at91: Forcibly suspend ports while USB suspend
Date: Fri, 17 Jun 2016 15:54:48 +0200	[thread overview]
Message-ID: <20160617135448.GI5809@piout.net> (raw)
In-Reply-To: <B256D81BAE5131468A838E5D7A24364101650C3632@penmbx01>

On 17/06/2016 at 13:44:22 +0000, Yang, Wenyou wrote :
> Hi Alexandre,
> 
> > -----Original Message-----
> > From: Alexandre Belloni [mailto:alexandre.belloni@free-electrons.com]
> > Sent: 2016年6月9日 4:38
> > To: Rob Herring <robh@kernel.org>
> > Cc: Yang, Wenyou <Wenyou.Yang@atmel.com>; Alan Stern
> > <stern@rowland.harvard.edu>; Greg Kroah-Hartman
> > <gregkh@linuxfoundation.org>; Ferre, Nicolas <Nicolas.FERRE@atmel.com>;
> > Pawel Moll <pawel.moll@arm.com>; Mark Brown <broonie@kernel.org>; Ian
> > Campbell <ijc+devicetree@hellion.org.uk>; Kumar Gala <galak@codeaurora.org>;
> > linux-kernel@vger.kernel.org; devicetree@vger.kernel.org; linux-arm-
> > kernel@lists.infradead.org; linux-usb@vger.kernel.org
> > Subject: Re: [PATCH v3 1/2] usb: ohci-at91: Forcibly suspend ports while USB
> > suspend
> > 
> > On 08/06/2016 at 15:26:51 -0500, Rob Herring wrote :
> > > On Wed, Jun 08, 2016 at 12:15:10PM +0800, Wenyou Yang wrote:
> > > > In order to the save power consumption, as a workaround, suspend
> > > > forcibly the USB PORTA/B/C via set the SUSPEND_A/B/C bits of OHCI
> > > > Interrupt Configuration Register in the SFRs while OHCI USB suspend.
> > > >
> > > > This suspend operation must be done before the USB clock is
> > > > disabled, resume after the USB clock is enabled.
> > > >
> > > > Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
> > > > ---
> > > >
> > > > Changes in v3:
> > > >  - Change the compatible description for more precise.
> > > >
> > > > Changes in v2:
> > > >  - Add compatible to support forcibly suspend the ports.
> > > >  - Add soc/at91/at91_sfr.h to accommodate the defines.
> > > >  - Add error checking for .sfr_regmap.
> > > >  - Remove unnecessary regmap_read() statement.
> > > >
> > > >  .../devicetree/bindings/usb/atmel-usb.txt          |  6 +-
> > > >  drivers/usb/host/ohci-at91.c                       | 80 +++++++++++++++++++++-
> > > >  include/soc/at91/at91_sfr.h                        | 29 ++++++++
> > > >  3 files changed, 112 insertions(+), 3 deletions(-)  create mode
> > > > 100644 include/soc/at91/at91_sfr.h
> > > >
> > > > diff --git a/Documentation/devicetree/bindings/usb/atmel-usb.txt
> > > > b/Documentation/devicetree/bindings/usb/atmel-usb.txt
> > > > index 5883b73..888deaa 100644
> > > > --- a/Documentation/devicetree/bindings/usb/atmel-usb.txt
> > > > +++ b/Documentation/devicetree/bindings/usb/atmel-usb.txt
> > > > @@ -3,8 +3,10 @@ Atmel SOC USB controllers  OHCI
> > > >
> > > >  Required properties:
> > > > - - compatible: Should be "atmel,at91rm9200-ohci" for USB controllers
> > > > -   used in host mode.
> > > > + - compatible: Should be one of the following
> > > > +	       "atmel,at91rm9200-ohci" for USB controllers used in host mode.
> > > > +	       "atmel,sama5d2-ohci" for USB controllers used in host mode
> > > > +	       on SAMA5D2 which can force to suspend.
> > >
> > > Guess I wasn't clear enough before. Drop "which can force to suspend".
> > >
> > 
> > Well, my point is that we don't need a new compatible anyway.
> 
> Could you give some advice?.
> 

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).

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

  reply	other threads:[~2016-06-17 13:54 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 [this message]
     [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
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=20160617135448.GI5809@piout.net \
    --to=alexandre.belloni@free-electrons.com \
    --cc=Nicolas.FERRE@atmel.com \
    --cc=Wenyou.Yang@atmel.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=pawel.moll@arm.com \
    --cc=robh@kernel.org \
    --cc=stern@rowland.harvard.edu \
    /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).