From: Wolfram Sang <wsa@the-dreams.de>
To: Douglas Anderson <dianders@chromium.org>
Cc: heiko@sntech.de, linux-rockchip@lists.infradead.org,
david.wu@rock-chips.com, wxt@rock-chips.com,
linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] i2c: rk3x: Restore clock settings at resume time
Date: Thu, 8 Sep 2016 22:50:19 +0200 [thread overview]
Message-ID: <20160908205018.GG3166@katana> (raw)
In-Reply-To: <1472505756-8302-1-git-send-email-dianders@chromium.org>
[-- Attachment #1: Type: text/plain, Size: 1702 bytes --]
On Mon, Aug 29, 2016 at 02:22:36PM -0700, Douglas Anderson wrote:
> Depending on a number of factors including:
> - Which exact Rockchip SoC we're working with
> - How deep we suspend
> - Which i2c port we're on
>
> We might lose the state of the i2c registers at suspend time.
> Specifically we've found that on rk3399 the i2c ports that are not in
> the PMU power domain lose their state with the current suspend depth
> configured by ARM Tursted Firmware.
>
> Note that there are very few actual i2c registers that aren't configured
> per transfer anyway so all we actually need to re-configure are the
> clock config registers. We'll just add a call to rk3x_i2c_adapt_div()
> at resume time and be done with it.
>
> NOTE: On rk3399 on ports whose power was lost, I put printouts in at
> resume time. I saw things like:
> before: con=0x00010300, div=0x00060006
> after: con=0x00010200, div=0x00180025
>
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
Fixed the code checker warnings:
SPARSE
drivers/i2c/busses/i2c-rk3x.c:1346:14: warning: duplicate const
SMATCH
drivers/i2c/busses/i2c-rk3x.c:1346:14: warning: duplicate const
and applied to for-current, thanks!
Note my code checkers also say this (unrelated to your patch):
SPARSE
drivers/i2c/busses/i2c-rk3x.c:888:17: warning: cast truncates bits from constant value (ffffffffff00 becomes ffffff00)
CC drivers/i2c/busses/i2c-rk3x.o
drivers/i2c/busses/i2c-rk3x.c: In function 'rk3x_i2c_v1_calc_timings':
drivers/i2c/busses/i2c-rk3x.c:745:41: warning: variable 'min_total_ns' set but not used [-Wunused-but-set-variable]
I haven't checked those, though...
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2016-09-08 20:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-29 21:22 [PATCH] i2c: rk3x: Restore clock settings at resume time Douglas Anderson
2016-09-01 2:10 ` David.Wu
2016-09-08 20:50 ` Wolfram Sang [this message]
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=20160908205018.GG3166@katana \
--to=wsa@the-dreams.de \
--cc=david.wu@rock-chips.com \
--cc=dianders@chromium.org \
--cc=heiko@sntech.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=wxt@rock-chips.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).