lkml.org 
[lkml]   [2012]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] regulator: Set apply_uV only when min and max voltages are defined
On 25.01.2012 10:31, Karol Lewandowski wrote:
> apply_uV is errornously set when regulator is instantiated from device
> tree, even when it doesn't contain any voltage constraints.
...
> - if (constraints->min_uV == constraints->max_uV)
> + if (min_uV&& max_uV&& constraints->min_uV == constraints->max_uV)
> constraints->apply_uV = true;

While this fixes obvious error I doubt that apply_uV should be set based
on min max equality. It have required fix to fixed regulator[1]
as well for max8997[2]. It'll probably require fixes in other places too.

Wouldn't it be better to explicitly use property like
"regulator-voltage-apply" in DT to set apply_uV?

if (min_uV && max_uV && constraints->min_uV == constraints->max_uV
&& of_find_property "regulator-voltage-apply")
constraints->apply_uV = true;

This would be consistent with handling of this flag from platform data.

[1] http://permalink.gmane.org/gmane.linux.kernel/1234969
[2] http://permalink.gmane.org/gmane.linux.kernel/1243714

Regards,
--
Karol Lewandowski | Samsung Poland R&D Center | Linux/Platform


\
 
 \ /
  Last update: 2012-01-25 11:17    [W:0.039 / U:19.584 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site