lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 3 Apr 2015 16:01:30 +0100
From:	Charles Keepax <ckeepax@...nsource.wolfsonmicro.com>
To:	lee.jones@...aro.org
Cc:	linux-kernel@...r.kernel.org, broonie@...nel.org,
	sameo@...ux.intel.com, patches@...nsource.wolfsonmicro.com
Subject: Re: [PATCH v2 4/5] mfd: arizona: Add better support for system
	suspend

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@...nsource.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ