lkml.org 
[lkml]   [2018]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] regulator: core: fix _regulator_do_disable return value
On Fri, Jul 13, 2018 at 02:56:24PM +0200, Marco Felsch wrote:

> Currently _regulator_do_disable returns 0 if either the ena_pin nor the
> ops.disbale() isn't present. This assumes that the call was successful
> but it wasn't because disbaling isn't supported at all.

> The last case of the if-chain should return -EINVAL, because disabling
> isn't supported by the driver as it is done already by
> _regulator_do_enable.

This is fine - consumers shouldn't expect that a disable will cause
anything to actually get powered off, constraints or other consumers
might mean that the disable doesn't actually happen. It's just the same
as a consumer with an always on flag.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2018-07-15 22:06    [W:0.075 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site