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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161122130308.GE316@dell.lan>
Date:   Tue, 22 Nov 2016 13:03:08 +0000
From:   Lee Jones <lee.jones@...aro.org>
To:     Keerthy <j-keerthy@...com>
Cc:     tony@...mide.com, robh+dt@...nel.org, linux-omap@...r.kernel.org,
        linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
        linux-gpio@...r.kernel.org, nm@...com, t-kristo@...com
Subject: Re: [PATCH v2 3/5] mfd: palmas: Reset the POWERHOLD mux during power
 off

On Thu, 10 Nov 2016, Keerthy wrote:

> POWERHOLD signal has higher priority  over the DEV_ON bit.
> So power off will not happen if the POWERHOLD is held high.
> Hence reset the MUX to GPIO_7 mode to release the POWERHOLD
> and the DEV_ON bit to take effect to power off the PMIC.
> 
> PMIC Power off happens in dire situations like thermal shutdown
> so irrespective of the POWERHOLD setting go ahead and turn off
> the powerhold.  Currently poweroff is broken on boards that have
> powerhold enabled. This fixes poweroff on those boards.
> 
> Signed-off-by: Keerthy <j-keerthy@...com>
> ---
> 
> Changes in v2:
> 
>   * Changed pr_err to dev_err
>   * removed redundant boolean variable override-powerhold
> 
>  drivers/mfd/palmas.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)

Applied, thanks.

> diff --git a/drivers/mfd/palmas.c b/drivers/mfd/palmas.c
> index ee9e9ea..da90124 100644
> --- a/drivers/mfd/palmas.c
> +++ b/drivers/mfd/palmas.c
> @@ -430,6 +430,20 @@ static void palmas_power_off(void)
>  {
>  	unsigned int addr;
>  	int ret, slave;
> +	struct device_node *np = palmas_dev->dev->of_node;
> +
> +	if (of_property_read_bool(np, "ti,palmas-override-powerhold")) {
> +		addr = PALMAS_BASE_TO_REG(PALMAS_PU_PD_OD_BASE,
> +					  PALMAS_PRIMARY_SECONDARY_PAD2);
> +		slave = PALMAS_BASE_TO_SLAVE(PALMAS_PU_PD_OD_BASE);
> +
> +		ret = regmap_update_bits(palmas_dev->regmap[slave], addr,
> +				PALMAS_PRIMARY_SECONDARY_PAD2_GPIO_7_MASK, 0);
> +		if (ret)
> +			dev_err(palmas_dev->dev,
> +				"Unable to write PRIMARY_SECONDARY_PAD2 %d\n",
> +				ret);
> +	}
>  
>  	slave = PALMAS_BASE_TO_SLAVE(PALMAS_PMU_CONTROL_BASE);
>  	addr = PALMAS_BASE_TO_REG(PALMAS_PMU_CONTROL_BASE, PALMAS_DEV_CTRL);

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ