lkml.org 
[lkml]   [2014]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] regulator: Allow set voltage on fixed regulators
From
On Fri, Apr 18, 2014 at 11:52 AM, Mark Brown <broonie@kernel.org> wrote:
> On Fri, Apr 18, 2014 at 11:30:10AM -0700, Tim Kryger wrote:
>> If a regulator consumer requests a voltage range that can be satisfied,
>> the return value should indicate success even if that regulator has a
>> fixed voltage. Since there is already logic to check if the requested
>> voltage range overlaps the allowed range, set REGULATOR_CHANGE_VOLTAGE
>> for regulators with constraints that include a positive voltage.
>
> This seems like the wrong place to fix this, it's nothing to do with DT
> and we shouldn't require that nonsensical permissions are set. Instead
> we should fix this at the point where we're implementing the permission
> check, have the failure case check the current voltage before returning
> an error.

Are you saying that REGULATOR_CHANGE_VOLTAGE and
REGULATOR_CHANGE_CURRENT are nonsense?

It does seem like, even in the non-DT case, that the decision of
whether to call the underlying set_voltage and set_current functions
could be made solely based on the numerical voltage and current
constraints.

Thanks,
Tim


\
 
 \ /
  Last update: 2014-04-19 00:01    [W:0.470 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site