diff mbox

[2/2] regulator: of: Add support for parsing microvolts for suspend state

Message ID 1414813978-32233-2-git-send-email-dianders@chromium.org (mailing list archive)
State New, archived
Headers show

Commit Message

Douglas Anderson Nov. 1, 2014, 3:52 a.m. UTC
Leverage all the work that was done in (40e20d6 regulator: of: Add
support for parsing regulator_state for suspend state) and throw in
the ability to set suspend microvolts from the device tree.

Signed-off-by: Doug Anderson <dianders@chromium.org>
---
 drivers/regulator/of_regulator.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Javier Martinez Canillas Nov. 1, 2014, 8:49 a.m. UTC | #1
Hello Doug,

On 11/01/2014 04:52 AM, Doug Anderson wrote:
> Leverage all the work that was done in (40e20d6 regulator: of: Add
> support for parsing regulator_state for suspend state) and throw in
> the ability to set suspend microvolts from the device tree.
> 
> Signed-off-by: Doug Anderson <dianders@chromium.org>
> ---
>  drivers/regulator/of_regulator.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c
> index f0d19fc..7fe93c5 100644
> --- a/drivers/regulator/of_regulator.c
> +++ b/drivers/regulator/of_regulator.c
> @@ -107,6 +107,10 @@ static void of_get_regulation_constraints(struct device_node *np,
>  					"regulator-off-in-suspend"))
>  			suspend_state->disabled = true;
>  
> +		if (!of_property_read_u32(suspend_np,
> +					"regulator-suspend-microvolt", &pval))
> +			suspend_state->uV = pval;
> +
>  		of_node_put(suspend_np);
>  		suspend_state = NULL;
>  		suspend_np = NULL;
> 

Looks good to me.

Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>

Best regards,
Javier
Chris Zhong Nov. 3, 2014, 12:27 a.m. UTC | #2
On 11/01/2014 04:49 PM, Javier Martinez Canillas wrote:
> Hello Doug,
>
> On 11/01/2014 04:52 AM, Doug Anderson wrote:
>> Leverage all the work that was done in (40e20d6 regulator: of: Add
>> support for parsing regulator_state for suspend state) and throw in
>> the ability to set suspend microvolts from the device tree.
>>
>> Signed-off-by: Doug Anderson <dianders@chromium.org>
>> ---
>>   drivers/regulator/of_regulator.c | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c
>> index f0d19fc..7fe93c5 100644
>> --- a/drivers/regulator/of_regulator.c
>> +++ b/drivers/regulator/of_regulator.c
>> @@ -107,6 +107,10 @@ static void of_get_regulation_constraints(struct device_node *np,
>>   					"regulator-off-in-suspend"))
>>   			suspend_state->disabled = true;
>>   
>> +		if (!of_property_read_u32(suspend_np,
>> +					"regulator-suspend-microvolt", &pval))
>> +			suspend_state->uV = pval;
>> +
>>   		of_node_put(suspend_np);
>>   		suspend_state = NULL;
>>   		suspend_np = NULL;
>>
> Looks good to me.
>
> Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
>
> Best regards,
> Javier
>
>
>
Reviewed-by: Chris Zhong <zyw@rock-chips.com>
Mark Brown Nov. 3, 2014, 12:29 p.m. UTC | #3
On Sat, Nov 01, 2014 at 09:49:42AM +0100, Javier Martinez Canillas wrote:
> On 11/01/2014 04:52 AM, Doug Anderson wrote:

> > +
> >  		of_node_put(suspend_np);
> >  		suspend_state = NULL;
> >  		suspend_np = NULL;

> Looks good to me.

> Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>

If you're reviewing something please don't quote the entire patch, the
same rule applies as always - just include relevant context - and
especially don't include your one line of content at the very end of the
patch.  Otherwise people have to page through the entire thing to find
what you've said (if they don't get fed up first).
Javier Martinez Canillas Nov. 3, 2014, 12:45 p.m. UTC | #4
On 11/03/2014 01:29 PM, Mark Brown wrote:
> 
> If you're reviewing something please don't quote the entire patch, the
> same rule applies as always - just include relevant context - and
> especially don't include your one line of content at the very end of the
> patch.  Otherwise people have to page through the entire thing to find
> what you've said (if they don't get fed up first).
> 

Yes, I usually add my {Review,Acked,Tested}-by tags at the end of the
commit message and remove the complete patch but since it was a 4-lines
patch I didn't think it was that bad.

Sorry about that, I will do it next time no matter the patch size.

Best regards,
Javier
Mark Brown Nov. 3, 2014, 12:47 p.m. UTC | #5
On Mon, Nov 03, 2014 at 01:45:15PM +0100, Javier Martinez Canillas wrote:

> Yes, I usually add my {Review,Acked,Tested}-by tags at the end of the
> commit message and remove the complete patch but since it was a 4-lines
> patch I didn't think it was that bad.

It's the patch, the diffstat, the signoff, the commit message...
diff mbox

Patch

diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c
index f0d19fc..7fe93c5 100644
--- a/drivers/regulator/of_regulator.c
+++ b/drivers/regulator/of_regulator.c
@@ -107,6 +107,10 @@  static void of_get_regulation_constraints(struct device_node *np,
 					"regulator-off-in-suspend"))
 			suspend_state->disabled = true;
 
+		if (!of_property_read_u32(suspend_np,
+					"regulator-suspend-microvolt", &pval))
+			suspend_state->uV = pval;
+
 		of_node_put(suspend_np);
 		suspend_state = NULL;
 		suspend_np = NULL;