From: Wolfram Sang <wsa@the-dreams.de>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: linux-i2c@vger.kernel.org, linux-sh@vger.kernel.org,
Magnus Damm <magnus.damm@gmail.com>,
Simon Horman <horms@verge.net.au>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Geert Uytterhoeven <geert@linux-m68k.org>
Subject: Re: [PATCH] i2c: rcar: make sure clocks are on when doing hw init
Date: Wed, 11 Nov 2015 09:26:06 +0100 [thread overview]
Message-ID: <20151111082606.GA24344@katana> (raw)
In-Reply-To: <87io5pgrcr.wl%kuninori.morimoto.gx@renesas.com>
[-- Attachment #1: Type: text/plain, Size: 1145 bytes --]
Morimoto-san,
> > + pm_runtime_enable(dev);
> > + pm_runtime_get_sync(dev);
> > rcar_i2c_init(priv);
> > + pm_runtime_put(dev);
>
> Please correct me if I'm misunderstanding, but in my experience,
> above rcar_i2c_init() result can be removed if SoC has power-off feature,
> and if IP doesn't keep register value power-off case ?
> This case register doesn't keep myfunc_A's setting,
> because it calls pm_runtime_put()
>
> pm_runtime_get_sync()
> myfunc_A()
> pm_runtime_put()
> ...
> pm_runtime_get_sync()
> myfunc_B()
> pm_runtime_put()
>
> It should be this ?
>
> pm_runtime_get_sync()
> myfunc_A()
> myfunc_B()
> pm_runtime_put()
This is for power-off case, right? Wouldn't it be clearer then to add a
resume function to pm_ops of the I2C driver which reinit the registers?
Doing it before every transfer might be simpler but is also a bit
implicit or subtle, I'd think.
And for completeness: The above is only for the power-off case. In
module-standby (MSTP bits), register values are always retained.
Correct?
Regards,
Wolfram
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-11-11 8:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-29 19:19 [PATCH] i2c: rcar: make sure clocks are on when doing hw init Wolfram Sang
2015-10-29 19:38 ` Geert Uytterhoeven
2015-10-30 0:03 ` Kuninori Morimoto
2015-11-11 8:26 ` Wolfram Sang [this message]
2015-11-11 9:03 ` Kuninori Morimoto
2015-11-11 16:34 ` Wolfram Sang
2015-11-11 23:54 ` Kuninori Morimoto
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=20151111082606.GA24344@katana \
--to=wsa@the-dreams.de \
--cc=geert@linux-m68k.org \
--cc=horms@verge.net.au \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=magnus.damm@gmail.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