Re: [PATCH 5.10.y-cip 02/13] regulator: core: Add helper for allow HW access to enable/disable regulator

Pavel Machek
2024-07-31T10:06:17Z

[-- Attachment #1: Type: text/plain, Size: 1166 bytes --]

Hi!

> > > +++ b/drivers/regulator/core.c
> > > @@ -3244,6 +3244,34 @@ int regulator_list_hardware_vsel(struct
> > > regulator *regulator, }
> > > EXPORT_SYMBOL_GPL(regulator_list_hardware_vsel);
> > >
> > > +/**
> > > + * regulator_hardware_enable - access the HW for enable/disable
> > > +regulator
> > > + * @regulator: regulator source
> > > + * @enable: true for enable, false for disable
> > > + *
> > > + * Request that the regulator be enabled/disabled with the regulator
> > > +output at
> > > + * the predefined voltage or current value.
> >
> > "Unlinke other functions, this can be called ...".
> >
> > And fill in the blanks. "from interrupt context"? "with interrupts disabled"? I'm not sure what real
> > limits are. Probably can't do that from NMI?
>
> From interrupt context provided the callback function does not uses any sleeping calls.

So the contexts allowed differ based on what low-level driver is used?
That's quite unfortunate...

Best regards,
Pavel
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]