lkml.org 
[lkml]   [2019]   [Oct]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] regulator: core: fix boot-on regulators use_count usage
On Tue, Oct 08, 2019 at 04:56:05PM +0200, Marco Felsch wrote:
> On 19-10-08 13:51, Mark Brown wrote:

> > No, we shouldn't do anything when the regulator probes - we'll only
> > disable unused regulators when we get to the end of boot (currently we
> > delay this by 30s to give userspace a chance to run, that's a hack but
> > we're fresh out of better ideas). During boot the regulator state will
> > only be changed if some consumer appears and changes the state.

> Okay, so this won't disable the regualtor?

> 8<----------------------------------------------------------------
> static int reg_fixed_voltage_probe(struct platform_device *pdev)
> {
> ...
>
> if (config->enabled_at_boot)
> gflags = GPIOD_OUT_HIGH;
> else
> gflags = GPIOD_OUT_LOW;
>
> ...
> }
> 8<----------------------------------------------------------------

If this is a GPIO regulator then the Linux APIs mean you can't read the
status back so it's one of the regulators for which this property was
invented. This is a real limitation of the Linux APIs, with most
hardware you can actually read the status back so we shouldn't need
this.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2019-10-08 17:42    [W:0.063 / U:1.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site