lkml.org 
[lkml]   [2019]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 1/1] regulator: pwm: suppress EPROBE_DEFER error message
Hi Martin,

On Tue, 22 Jan 2019 at 00:07, Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
>
> Suppress the "Failed to get PWM" error output if the actual error code
> is EPROBE_DEFER. This makes the behavior of the pwm-regulator driver
> consistent with what most other drivers do (which is: print all errors
> except EPROBE_DEFER).
>
> An example where this cleans up the kernel log are the 32-bit Amlogic
> Meson boards:
> multi_v7_defconfig has CONFIG_REGULATOR_PWM=y and CONFIG_PWM_MESON=m.
> When booting such a board (for example the Meson8b Odroid-C1) the
> following message is printed five times during boot:
> pwm-regulator regulator-vcck: Failed to get PWM: -517
> On the sixth call the pwm-meson driver is finally loaded (as rootfs
> becomes ready) and the "VCCK" pwm-regulator comes up fine.
>
> Fixes: aa66cc6630a408 ("regulator: pwm-regulator: get voltage and duty table from dts")
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> ---
> drivers/regulator/pwm-regulator.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/regulator/pwm-regulator.c b/drivers/regulator/pwm-regulator.c
> index 3f53f9134b32..7789d181ae67 100644
> --- a/drivers/regulator/pwm-regulator.c
> +++ b/drivers/regulator/pwm-regulator.c
> @@ -357,7 +357,9 @@ static int pwm_regulator_probe(struct platform_device *pdev)
> drvdata->pwm = devm_pwm_get(&pdev->dev, NULL);
> if (IS_ERR(drvdata->pwm)) {
> ret = PTR_ERR(drvdata->pwm);
> - dev_err(&pdev->dev, "Failed to get PWM: %d\n", ret);
> + if (ret != -EPROBE_DEFER)
> + dev_err(&pdev->dev, "Failed to get PWM: %d\n", ret);
> +
> return ret;
> }
>
> --
> 2.20.1
>
Please add my. tested on Odroid c1+

Tested-by: Anand Moon <linux.amoon@gmail.com>

Best Regards
-Anand

>
> _______________________________________________
> linux-amlogic mailing list
> linux-amlogic@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-amlogic

\
 
 \ /
  Last update: 2019-01-23 16:28    [W:0.065 / U:47.504 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site