[PATCHv2] regulator: pwm-regulator: Make use of the helper function dev_err_probe()
Anand Moon
linux.amoon at gmail.com
Tue Sep 21 12:21:32 PDT 2021
Hi Martin,
On Tue, 21 Sept 2021 at 11:04, Martin Blumenstingl
<martin.blumenstingl at googlemail.com> wrote:
>
> Hi Anand,
>
> On Mon, Sep 20, 2021 at 10:38 PM Anand Moon <linux.amoon at gmail.com> wrote:
> >
> > devm_pwm_get() can return -EPROBE_DEFER if the pwm regulator is not
> > ready yet. Use dev_err_probe() for pwm regulator resources
> > to indicate the deferral reason when waiting for the
> > resource to come up.
> >
> > Fixes: 0cd71b9a43ad ("regulator: pwm: Don't warn on probe deferral")
> Personally I consider this as an improvement (having the deferral
> reason show up in debugfs), not a bugfix.
> Because of that I would drop the Fixes tag.
> Let's wait on other people's opinions though.
>
Ok will drop this in the next version.
> [...]
> > - dev_err(&pdev->dev, "Failed to get PWM: %d\n", ret);
> > - return ret;
> > + return dev_err_probe(&pdev->dev, PTR_ERR(drvdata->pwm),
> > + "Failed to register regulator %s\n",
> The message here should still be similar to the original one since the
> actual problem is that we could not get a reference to the PWM
> controller. At this point we are not trying to register the
> pwm-regulator yet.
>
Yep, Typo I mixed up the logs completely.
it should be "Failed to get PWM, deferring probe"
Thanks
-Anand
>
> Best regards,
> Martin
More information about the linux-arm-kernel
mailing list