From: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Harini Katakam <harinik@xilinx.com>,
Mark Rutland <mark.rutland@arm.com>, <gnurou@gmail.com>,
Pawel Moll <pawel.moll@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Linus Walleij <linus.walleij@linaro.org>,
<linux-doc@vger.kernel.org>, <michal.simek@xilinx.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
<linux-gpio@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Rob Herring <robh+dt@kernel.org>, <michals@xilinx.com>,
Rob Landley <rob@landley.net>, Kumar Gala <galak@codeaurora.org>,
Grant Likely <grant.likely@linaro.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 1/2] GPIO: Add driver for Zynq GPIO controller
Date: Mon, 7 Apr 2014 12:00:05 -0700 [thread overview]
Message-ID: <7da0486b-bbdd-445b-8a6d-b5bcb311d908@TX2EHSMHS036.ehs.local> (raw)
In-Reply-To: <CAPDyKFo4R9izP=jcoU+jqd74Nbeh+-5A1T8c_=EL4cmzja_29A@mail.gmail.com>
On Mon, 2014-03-31 at 11:23AM +0200, Ulf Hansson wrote:
> On 27 March 2014 16:25, Harini Katakam <harinik@xilinx.com> wrote:
[...]
> > +static int __maybe_unused zynq_gpio_runtime_suspend(struct device *dev)
> > +{
> > + struct platform_device *pdev = to_platform_device(dev);
> > + struct zynq_gpio *gpio = platform_get_drvdata(pdev);
> > +
> > + clk_disable(gpio->clk);
>
> You should be able can use clk_disable_unprepare() here.
>
> > +
> > + return 0;
> > +}
> > +
> > +static int __maybe_unused zynq_gpio_runtime_resume(struct device *dev)
> > +{
> > + struct platform_device *pdev = to_platform_device(dev);
> > + struct zynq_gpio *gpio = platform_get_drvdata(pdev);
> > +
> > + return clk_enable(gpio->clk);
>
> You should be able can use clk_prepare_enable() here.
Is there some common practice regarding this? As I understand it, we
want to ensure the clock to be gated during suspend, which should happen
with clk_disable(). Why would we also unprepare the clock? We are highly
likely to use it again once we resume.
Thanks,
Sören
next prev parent reply other threads:[~2014-04-07 19:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-27 15:25 Harini Katakam
2014-03-27 15:25 ` [PATCH 2/2] Devicetree: Add Zynq GPIO devicetree bindings documentation Harini Katakam
2014-03-28 21:51 ` Linus Walleij
2014-03-28 21:50 ` [PATCH 1/2] GPIO: Add driver for Zynq GPIO controller Linus Walleij
2014-03-29 4:44 ` Harini Katakam
2014-03-31 8:22 ` Linus Walleij
2014-04-02 5:56 ` Michal Simek
2014-04-10 17:52 ` Linus Walleij
2014-04-11 6:57 ` Michal Simek
2014-03-31 9:23 ` Ulf Hansson
2014-04-07 19:00 ` Sören Brinkmann [this message]
2014-04-10 17:54 ` Linus Walleij
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=7da0486b-bbdd-445b-8a6d-b5bcb311d908@TX2EHSMHS036.ehs.local \
--to=soren.brinkmann@xilinx.com \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=gnurou@gmail.com \
--cc=grant.likely@linaro.org \
--cc=harinik@xilinx.com \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=michal.simek@xilinx.com \
--cc=michals@xilinx.com \
--cc=pawel.moll@arm.com \
--cc=rob@landley.net \
--cc=robh+dt@kernel.org \
--cc=ulf.hansson@linaro.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
all inboxes | Powered by JetHome®