From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
To: lee.jones@linaro.org
Cc: linux-kernel@vger.kernel.org, broonie@kernel.org,
sameo@linux.intel.com, patches@opensource.wolfsonmicro.com
Subject: Re: [PATCH v2 4/5] mfd: arizona: Add better support for system suspend
Date: Fri, 3 Apr 2015 16:01:30 +0100 [thread overview]
Message-ID: <20150403150130.GD5442@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1427216396-15517-5-git-send-email-ckeepax@opensource.wolfsonmicro.com>
On Tue, Mar 24, 2015 at 04:59:55PM +0000, Charles Keepax wrote:
> Allow the chip to completely power off if we enter runtime suspend and
> there is no jack detection active. This is helpful for systems where
> system suspend might remove the supplies to the CODEC, without informing
> us. Note the powering off is done in runtime suspend rather than system
> suspend, because we need to hold reset until the first time DCVDD is
> powered anyway (which would be in runtime resume), and we might as well
> save the extra power.
>
> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
> ---
> @@ -581,6 +616,18 @@ static int arizona_runtime_suspend(struct device *dev)
> regcache_mark_dirty(arizona->regmap);
> regulator_disable(arizona->dcvdd);
>
> + /* Allow us to completely power down if no jack detection */
> + if (!(val & ARIZONA_JD1_ENA)) {
> + dev_dbg(arizona->dev, "Fully powering off\n");
> +
> + arizona->has_fully_powered_off = true;
> +
> + arizona_enable_reset(arizona);
> +
> + regulator_bulk_disable(arizona->num_core_supplies,
> + arizona->core_supplies);
> + }
> +
Turns out we will need to disable the IRQ across this as well, we
lose control of it once we put the chip into reset. So depending
on pulls etc. we might get pulled straight out of suspend again
if we leave the IRQ enabled.
I will send a new series shortly.
Thanks,
Charles
next prev parent reply other threads:[~2015-04-03 15:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-24 16:59 [PATCH v2 0/5] wm5110 Boot Fixups Part 2 Charles Keepax
2015-03-24 16:59 ` [PATCH v2 1/5] mfd: arizona: Use devres to manage reset GPIO Charles Keepax
2015-03-24 16:59 ` [PATCH v2 2/5] mfd: wm5102: Move check for custom boot into arizona_wait_for_boot Charles Keepax
2015-03-24 16:59 ` [PATCH v2 3/5] mfd: arizona: Factor out hard reset into helper functions Charles Keepax
2015-03-24 16:59 ` [PATCH v2 4/5] mfd: arizona: Add better support for system suspend Charles Keepax
2015-04-03 15:01 ` Charles Keepax [this message]
2015-03-24 16:59 ` [PATCH v2 5/5] mfd: wm5110: Add delay before releasing reset line Charles Keepax
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=20150403150130.GD5442@opensource.wolfsonmicro.com \
--to=ckeepax@opensource.wolfsonmicro.com \
--cc=broonie@kernel.org \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.wolfsonmicro.com \
--cc=sameo@linux.intel.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