lkml.org 
[lkml]   [2015]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] regulator: of: simplifing the parsing code
On Fri, Nov 20, 2015 at 01:27:27PM +0530, Saurabh Sengar wrote:

> in case of_property_read_u32 fails, it keeps the parameter unchanged
> so no need to test if its success and then assign the value

On the other hand the current code doesn't require us to know that
detail... it's really not entirely clear to me that this is a great
win.

> I also have concern related to how we are passing 'regulator-mode' and
> 'regulator-initial-mode'. Currently this require a extra function to be
> set in 'of_map_mode', which can be avoided.
> These two parameters can be set directly from the device tree as in below patch:
> https://lkml.org/lkml/2014/1/16/263

No, they can't - the values we set for modes in the DT are defined per
regulator and we need to translate these into the regulator API
definitions.

> + of_property_read_u32(np, "regulator-microvolt-offset",
> + &constraints->uV_offset);

The indentation for these is very strange - the second line is indented
a really long way.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2015-11-21 14:41    [W:0.044 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site