lkml.org 
[lkml]   [2021]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCHv2] regulator: pwm-regulator: Make use of the helper function dev_err_probe()
Hi Anand,

On Mon, Sep 20, 2021 at 10:38 PM Anand Moon <linux.amoon@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.

[...]
> - 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.


Best regards,
Martin

\
 
 \ /
  Last update: 2021-09-21 07:35    [W:0.090 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site