From: heiko@sntech.de (Heiko Stübner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/2] ARM: rockchip: add support holding 24Mhz osc during suspend
Date: Mon, 22 Jun 2015 23:01:24 +0200 [thread overview]
Message-ID: <3011002.V7itPuvDk4@diego> (raw)
In-Reply-To: <CAD=FV=Ux+gKJQtr1Qq+ubTNBKNGKTuCGx-3hTAj0j6fAEEJq2A@mail.gmail.com>
Am Montag, 22. Juni 2015, 13:04:02 schrieb Doug Anderson:
> Chris,
>
> On Sun, Jun 21, 2015 at 3:00 AM, Chris Zhong <zyw@rock-chips.com> wrote:
> > If we want to wake up system via usb, the 24Mhz osc could not be
> > disabled during suspend, read the usb phy SIDDQ bit to decide whether
> > to switch to 32khz clock-in.
> >
> > Signed-off-by: Chris Zhong <zyw@rock-chips.com>
> > ---
> >
> > arch/arm/mach-rockchip/pm.c | 38 ++++++++++++++++++++++++++++++++++++--
> > 1 file changed, 36 insertions(+), 2 deletions(-)
>
> As talked about privately, this patch is ugly. ...but I don't see a
> solution that is less ugly. This method has the advantages that it is
> "automatic"--the system figures out whether it needs the 24MHz clock
> automatically based on whether the PHYs were left on. No other
> communication / device tree stuff is needed.
Yep, fully agreed :-) .
As I said before, another possible solution would probably involve checking
the phy clocks themselfs, but getting these out of the devicetree would make
this even more ugly.
So I'll let this sit for some more days in case somebody wants to complain
(middle of the merge window anyway) and apply these two after.
>
> > + /* if any usb phy is still on(GRF_SIDDQ==0), that means we need
> > the
> > + * function of usb wakeup, so do not switch to 32khz, since the
> > usb phy + * clk does not connect to 32khz osc*/
>
> This is not _quite_ the block commenting style used in this file. It
> would be a bit nicer if it matched.
>
> Other than that:
>
> Reviewed-by: Douglas Anderson <dianders@chromium.org>
>
> On the chromeos-3.14 kernel (with the WIP dwc2 patches):
> Tested-by: Douglas Anderson <dianders@chromium.org>
next prev parent reply other threads:[~2015-06-22 21:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-21 10:00 [PATCH v2 0/2] add support holding 24Mhz osc during suspend Chris Zhong
2015-06-21 10:00 ` [PATCH v2 1/2] ARM: rockchip: " Chris Zhong
2015-06-22 20:04 ` Doug Anderson
2015-06-22 21:01 ` Heiko Stübner [this message]
2015-06-21 10:00 ` [PATCH v2 2/2] ARM: rockchip: remove some useless macro in pm.h Chris Zhong
2015-06-22 19:59 ` Doug Anderson
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=3011002.V7itPuvDk4@diego \
--to=heiko@sntech.de \
--cc=linux-arm-kernel@lists.infradead.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).