From: Stephen Warren <swarren@wwwdotorg.org>
To: Bibek Basu <bbasu@nvidia.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Pritesh Raithatha <praithatha@nvidia.com>
Subject: Re: [PATCH] pinctrl: tegra: add suspend-resume support
Date: Mon, 01 Apr 2013 10:23:05 -0600 [thread overview]
Message-ID: <5159B469.1000303@wwwdotorg.org> (raw)
In-Reply-To: <77F7DB30C698A44DA22FB222C89DE941A668585708@BGMAIL01.nvidia.com>
On 03/31/2013 10:34 PM, Bibek Basu wrote:
> Hi Stephen,
>
> My response inline.
Upstream, responses should always be inline, so there's no need to
mention that.
By the way, can you please configure your email client to:
a) Not re-wrap the email you're replying to; email should be wrapped to
about 74 characters.
b) Prefix all the lines you're quoting with "> " so that we can
differentiate the text you quoted from the text you wrote. If you need
to write "[BB]" to differentiate those pieces of text, something is
wrong. Thanks.
I've tried to fix these below in my reply.
> Stephen Warren wrote at Thursday, March 28, 2013 11:19 PM:
> > On 03/28/2013 11:11 AM, Bibek Basu wrote:
> >> This patch adds suspend and resume callbacks to the pinctrl-tegra driver.
> >> diff --git a/drivers/pinctrl/pinctrl-tegra.c
> >> b/drivers/pinctrl/pinctrl-tegra.c
> >
> >> +static struct tegra_pmx *pmx;
> >
> > Isn't there any way to pass data into the suspend/resume functions so that this global isn't needed?
> >
> > Why can't we just use the device suspend/resume functions rather than
> > global (syscore) suspend/resume functions? Presumably this is to
> > ensure that all other drivers suspend first, then the pinctrl driver
> > does, and the reverse for resume. Can't we rely on deferred probe to
> > ensure that instead?
> >
> > To make that work, we might need every affected driver to define a
> > dummy pinmux state in DT that references the pinctrl driver, to make
> > sure they all get probed after the pinctrl driver.
>
> [BB]: Before I add dummy pinmux state in DT of affected driver, I would
> like to know the following:
>
> 1> The usage of syscore api needs global data. So, are you suggesting
> that syscore APIs are not appropriate to be used or syscore
> implementation is not proper?
Yes. The code here is a driver, and drivers shouldn't be using global
data where possible.
> 2> Adding dummy DT states may give scope for BUGS. Reason being there
> must be someone checking that every time some new driver refrences
> pinmux driver, should put a dummy entry in device tree. Isnt it more
> time costing then having "static struct tegra_pmx *pmx;"?
The overhead isn't high, and fixing that particular bug is trivial. And
yes, sometimes doing things the right way is more work than a
quick-and-dirty solution.
next prev parent reply other threads:[~2013-04-01 16:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-28 17:11 [PATCH] pinctrl: tegra: add suspend-resume support Bibek Basu
2013-03-28 17:48 ` Stephen Warren
2013-04-01 4:34 ` Bibek Basu
2013-04-01 16:23 ` Stephen Warren [this message]
2013-04-03 14:09 ` Linus Walleij
2013-04-03 17:16 ` Stephen Warren
2013-04-03 20:28 ` Linus Walleij
2013-04-03 16:21 ` Linus Walleij
2013-04-23 17:52 ` Bibek Basu
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=5159B469.1000303@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=bbasu@nvidia.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=praithatha@nvidia.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