Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1608289 > unrolled thread

Re: [PATCH v2 3/5] mfd: palmas: Reset the POWERHOLD mux during power off

Started byKeerthy <j-keerthy@ti.com>
First post2017-03-24 11:10 +0100
Last post2017-03-24 12:40 +0100
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v2 3/5] mfd: palmas: Reset the POWERHOLD mux during power  off Keerthy <j-keerthy@ti.com> - 2017-03-24 11:10 +0100
    Re: [PATCH v2 3/5] mfd: palmas: Reset the POWERHOLD mux during power  off Lee Jones <lee.jones@linaro.org> - 2017-03-24 12:40 +0100
      Re: [PATCH v2 3/5] mfd: palmas: Reset the POWERHOLD mux during power  off Keerthy <j-keerthy@ti.com> - 2017-03-24 12:40 +0100

#1608289 — Re: [PATCH v2 3/5] mfd: palmas: Reset the POWERHOLD mux during power off

FromKeerthy <j-keerthy@ti.com>
Date2017-03-24 11:10 +0100
SubjectRe: [PATCH v2 3/5] mfd: palmas: Reset the POWERHOLD mux during power off
Message-ID<toukp-8qR-3@gated-at.bofh.it>

On Tuesday 22 November 2016 06:33 PM, Lee Jones wrote:
> 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@ti.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.

Lee Jones,

For some strange reason this patch is missing!
The other patch in the series is applied through mfd tree but somehow
this particular patch is missed out.

https://patchwork.kernel.org/patch/9420631/ is applied.

https://patchwork.kernel.org/patch/9420655/ is not.

I tried applying this very patch and it applies cleanly on the next
branch. Let me know if you want me to send this again on top of latest
next branch.

- Keerthy

> 
>> 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);
> 

[toc] | [next] | [standalone]


#1608344

FromLee Jones <lee.jones@linaro.org>
Date2017-03-24 12:40 +0100
Message-ID<tovJv-Sg-5@gated-at.bofh.it>
In reply to#1608289
On Fri, 24 Mar 2017, Keerthy wrote:

> 
> 
> On Tuesday 22 November 2016 06:33 PM, Lee Jones wrote:
> > 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@ti.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.
> 
> Lee Jones,
> 
> For some strange reason this patch is missing!
> The other patch in the series is applied through mfd tree but somehow
> this particular patch is missed out.
> 
> https://patchwork.kernel.org/patch/9420631/ is applied.
> 
> https://patchwork.kernel.org/patch/9420655/ is not.
> 
> I tried applying this very patch and it applies cleanly on the next
> branch. Let me know if you want me to send this again on top of latest
> next branch.

Sorry about this.

Reapplied and re-pushed.

> >> 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

[toc] | [prev] | [next] | [standalone]


#1608347

FromKeerthy <j-keerthy@ti.com>
Date2017-03-24 12:40 +0100
Message-ID<tovJv-Sg-15@gated-at.bofh.it>
In reply to#1608344

On Friday 24 March 2017 05:00 PM, Lee Jones wrote:
> On Fri, 24 Mar 2017, Keerthy wrote:
> 
>>
>>
>> On Tuesday 22 November 2016 06:33 PM, Lee Jones wrote:
>>> 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@ti.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.
>>
>> Lee Jones,
>>
>> For some strange reason this patch is missing!
>> The other patch in the series is applied through mfd tree but somehow
>> this particular patch is missed out.
>>
>> https://patchwork.kernel.org/patch/9420631/ is applied.
>>
>> https://patchwork.kernel.org/patch/9420655/ is not.
>>
>> I tried applying this very patch and it applies cleanly on the next
>> branch. Let me know if you want me to send this again on top of latest
>> next branch.
> 
> Sorry about this.
> 
> Reapplied and re-pushed.

Thanks Lee Jones.

> 
>>>> 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);
>>>
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web