Re: [v2 3/4] regulator: qcom: Add labibb driver
From: Mark Brown
Date: Tue May 12 2020 - 07:44:57 EST
On Mon, May 11, 2020 at 07:15:09PM -0700, Bjorn Andersson wrote:
> On Fri 08 May 13:41 PDT 2020, Sumit Semwal wrote:
> > + int ret;
> > + struct labibb_regulator *reg = rdev_get_drvdata(rdev);
> > +
> > + while (retries--) {
> Mark's suggestion of extending _regulator_enable_delay() to support
> polling is_enable() seems reasonable.
> The only complication I can see is that code path currently doesn't have
> any expectations of the regulator not being operational at the end -
> this seems to offer that possibility. So some care needs to be taken
> there.
Are we expecting that to happen in normal operation? Generally this is
a pretty serious problem. In any caser if we're adding checks of status
we'd need an error return if the status doesn't show the regulator is on
after some reasonable time.
Attachment:
signature.asc
Description: PGP signature