From: Mark Brown <broonie@kernel.org>
To: Romain Perier <romain.perier@gmail.com>
Cc: devicetree@vger.kernel.org, lgirdwood@gmail.com,
linux-kernel@vger.kernel.org, heiko@sntech.de,
sameo@linux.intel.com, lee.jones@linaro.org,
grant.likely@linaro.org, robh@kernel.org, sre@kernel.org,
dbaryshkov@gmail.com, dwmw2@infradead.org, anton@enomsg.org,
ldewangan@nvidia.com, linux-omap@vger.kernel.org,
linux-tegra@vger.kernel.org
Subject: Re: [RFC PATCH v2 2/4] regulator: act8865: Add support to turn off all outputs
Date: Mon, 13 Oct 2014 15:16:22 +0200 [thread overview]
Message-ID: <20141013131622.GA27755@sirena.org.uk> (raw)
In-Reply-To: <1412711104-15902-2-git-send-email-romain.perier@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 953 bytes --]
On Tue, Oct 07, 2014 at 07:45:02PM +0000, Romain Perier wrote:
> When the property "poweroff-source" is found in the
> devicetree, the function pm_power_off is defined. This function sends the
> rights bit fields to the global off control register. shutdown/poweroff
> commands are now supported for hardware components which use these PMU.
Reviwed-by: Mark Brown <broonie@kernel.org>
but...
> + if (dev->of_node && is_system_poweroff_source(dev->of_node) &&
> + !pm_power_off) {
> + act8865_i2c_client = client;
> + act8865->off_reg = off_reg;
> + act8865->off_mask = off_mask;
> + pm_power_off = act8865_power_off;
> + }
Perhaps worth wrapping the dev->of_node check into the function? I
imagine the same pattern will be quite common.
Might also make sense to warn if we've got the property but we're not
setting pm_power_off - it's indicating that things aren't working as
expected, an error will help users figure out what's going wrong.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2014-10-13 13:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-07 19:45 [RFC PATCH v2 1/4] regulator: Add helper function to get "poweroff-source" property Romain Perier
[not found] ` <1412711104-15902-1-git-send-email-romain.perier-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-10-07 19:43 ` PERIER Romain
2014-10-10 11:47 ` Grant Likely
[not found] ` <CACxGe6vmBSgGpJgJ51Ki5KbQO65GDw3kSGSxnswYMfE8OGj9gw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-10-10 11:53 ` Mark Brown
2014-10-10 12:29 ` PERIER Romain
[not found] ` <CABgxDoKo8RkM3etK7Yu+8vHQSWs-53wnZujF_QvXR0GJAwBfoA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-10-11 13:51 ` Grant Likely
2014-10-10 12:33 ` Heiko Stübner
2014-10-07 19:45 ` [RFC PATCH v2 2/4] regulator: act8865: Add support to turn off all outputs Romain Perier
2014-10-13 13:16 ` Mark Brown [this message]
2014-10-07 19:45 ` [RFC PATCH v1 3/4] ARM: dts: rockchip: Enable power off in pmic for Radxa Rock Romain Perier
2014-10-07 19:45 ` [RFC PATCH v1 4/4] dt-bindings: Document the property poweroff-source for act8865 regulator Romain Perier
2014-10-13 13:17 ` Mark Brown
2014-10-13 13:54 ` PERIER Romain
2014-10-13 13:12 ` [RFC PATCH v2 1/4] regulator: Add helper function to get "poweroff-source" property Mark Brown
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=20141013131622.GA27755@sirena.org.uk \
--to=broonie@kernel.org \
--cc=anton@enomsg.org \
--cc=dbaryshkov@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=dwmw2@infradead.org \
--cc=grant.likely@linaro.org \
--cc=heiko@sntech.de \
--cc=ldewangan@nvidia.com \
--cc=lee.jones@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=robh@kernel.org \
--cc=romain.perier@gmail.com \
--cc=sameo@linux.intel.com \
--cc=sre@kernel.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).