* [PATCH] thermal: qcom-spmi-adc5: Suppress probe-deferral error message
@ 2022-12-16 19:09 Marijn Suijten
2022-12-16 23:42 ` Marijn Suijten
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Marijn Suijten @ 2022-12-16 19:09 UTC (permalink / raw)
To: phone-devel
Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
Konrad Dybcio, Martin Botka, Jami Kettunen, Marijn Suijten,
Johan Hovold, Andy Gross, Bjorn Andersson, Konrad Dybcio,
Jonathan Cameron, Lars-Peter Clausen, Robert Marko, Linus Walleij,
Nuno Sá, linux-arm-msm, linux-iio, linux-kernel
Much like 807efb7102e8 ("thermal: qcom-spmi-adc-tm5: suppress
probe-deferral error message") the ADC5 driver also spams a similar
probe-deferral error on startup when a channel is not yet available:
[ 0.343136] qcom-spmi-adc-tm5 1c40000.spmi:pmic@0:adc-tm@3500: get dt data failed: -517
Suppress it by using dev_err_probe instead, which also takes care of
storing the message as reason for deferring.
Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
---
drivers/iio/adc/qcom-spmi-adc5.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/iio/adc/qcom-spmi-adc5.c b/drivers/iio/adc/qcom-spmi-adc5.c
index 821fee60a765..69cc36004b5a 100644
--- a/drivers/iio/adc/qcom-spmi-adc5.c
+++ b/drivers/iio/adc/qcom-spmi-adc5.c
@@ -894,10 +894,8 @@ static int adc5_probe(struct platform_device *pdev)
mutex_init(&adc->lock);
ret = adc5_get_fw_data(adc);
- if (ret) {
- dev_err(dev, "adc get dt data failed\n");
- return ret;
- }
+ if (ret)
+ return dev_err_probe(dev, ret, "adc get dt data failed\n");
irq_eoc = platform_get_irq(pdev, 0);
if (irq_eoc < 0) {
--
2.39.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] thermal: qcom-spmi-adc5: Suppress probe-deferral error message
2022-12-16 19:09 [PATCH] thermal: qcom-spmi-adc5: Suppress probe-deferral error message Marijn Suijten
@ 2022-12-16 23:42 ` Marijn Suijten
2022-12-23 15:14 ` Jonathan Cameron
2022-12-17 0:18 ` Dmitry Baryshkov
2022-12-18 11:13 ` Martin Botka
2 siblings, 1 reply; 5+ messages in thread
From: Marijn Suijten @ 2022-12-16 23:42 UTC (permalink / raw)
To: phone-devel
Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
Konrad Dybcio, Martin Botka, Jami Kettunen, Johan Hovold,
Andy Gross, Bjorn Andersson, Konrad Dybcio, Jonathan Cameron,
Lars-Peter Clausen, Robert Marko, Linus Walleij, Nuno Sá,
linux-arm-msm, linux-iio, linux-kernel
Whoops, that tile must of course have started with:
iio: adc: qcom-spmi-adc5:
instead of blindly copying the suffix from the thermal monitor patch
(this driver is not a thermal monitor...). I'll send a v2 if there are
no other objections, unless this can be fixed up when the patch is
applied.
On 2022-12-16 20:09:45, Marijn Suijten wrote:
> Much like 807efb7102e8 ("thermal: qcom-spmi-adc-tm5: suppress
> probe-deferral error message") the ADC5 driver also spams a similar
> probe-deferral error on startup when a channel is not yet available:
>
> [ 0.343136] qcom-spmi-adc-tm5 1c40000.spmi:pmic@0:adc-tm@3500: get dt data failed: -517
>
> Suppress it by using dev_err_probe instead, which also takes care of
> storing the message as reason for deferring.
>
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
> ---
> drivers/iio/adc/qcom-spmi-adc5.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/iio/adc/qcom-spmi-adc5.c b/drivers/iio/adc/qcom-spmi-adc5.c
> index 821fee60a765..69cc36004b5a 100644
> --- a/drivers/iio/adc/qcom-spmi-adc5.c
> +++ b/drivers/iio/adc/qcom-spmi-adc5.c
> @@ -894,10 +894,8 @@ static int adc5_probe(struct platform_device *pdev)
> mutex_init(&adc->lock);
>
> ret = adc5_get_fw_data(adc);
> - if (ret) {
> - dev_err(dev, "adc get dt data failed\n");
> - return ret;
> - }
> + if (ret)
> + return dev_err_probe(dev, ret, "adc get dt data failed\n");
>
> irq_eoc = platform_get_irq(pdev, 0);
> if (irq_eoc < 0) {
> --
> 2.39.0
>
Apologies for the clumsiness.
- Marijn
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] thermal: qcom-spmi-adc5: Suppress probe-deferral error message
2022-12-16 19:09 [PATCH] thermal: qcom-spmi-adc5: Suppress probe-deferral error message Marijn Suijten
2022-12-16 23:42 ` Marijn Suijten
@ 2022-12-17 0:18 ` Dmitry Baryshkov
2022-12-18 11:13 ` Martin Botka
2 siblings, 0 replies; 5+ messages in thread
From: Dmitry Baryshkov @ 2022-12-17 0:18 UTC (permalink / raw)
To: Marijn Suijten, phone-devel
Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
Konrad Dybcio, Martin Botka, Jami Kettunen, Johan Hovold,
Andy Gross, Bjorn Andersson, Konrad Dybcio, Jonathan Cameron,
Lars-Peter Clausen, Robert Marko, Linus Walleij, Nuno Sá,
linux-arm-msm, linux-iio, linux-kernel
On 16/12/2022 21:09, Marijn Suijten wrote:
> Much like 807efb7102e8 ("thermal: qcom-spmi-adc-tm5: suppress
> probe-deferral error message") the ADC5 driver also spams a similar
> probe-deferral error on startup when a channel is not yet available:
>
> [ 0.343136] qcom-spmi-adc-tm5 1c40000.spmi:pmic@0:adc-tm@3500: get dt data failed: -517
>
> Suppress it by using dev_err_probe instead, which also takes care of
> storing the message as reason for deferring.
>
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
> ---
> drivers/iio/adc/qcom-spmi-adc5.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
With the prefix fixed:
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] thermal: qcom-spmi-adc5: Suppress probe-deferral error message
2022-12-16 19:09 [PATCH] thermal: qcom-spmi-adc5: Suppress probe-deferral error message Marijn Suijten
2022-12-16 23:42 ` Marijn Suijten
2022-12-17 0:18 ` Dmitry Baryshkov
@ 2022-12-18 11:13 ` Martin Botka
2 siblings, 0 replies; 5+ messages in thread
From: Martin Botka @ 2022-12-18 11:13 UTC (permalink / raw)
To: Marijn Suijten
Cc: phone-devel, ~postmarketos/upstreaming,
AngeloGioacchino Del Regno, Konrad Dybcio, Jami Kettunen,
Johan Hovold, Andy Gross, Bjorn Andersson, Konrad Dybcio,
Jonathan Cameron, Lars-Peter Clausen, Robert Marko, Linus Walleij,
Nuno Sá, linux-arm-msm, linux-iio, linux-kernel
On Fri, Dec 16 2022 at 08:09:45 PM +01:00:00, Marijn Suijten
<marijn.suijten@somainline.org> wrote:
> Much like 807efb7102e8 ("thermal: qcom-spmi-adc-tm5: suppress
> probe-deferral error message") the ADC5 driver also spams a similar
> probe-deferral error on startup when a channel is not yet available:
>
> [ 0.343136] qcom-spmi-adc-tm5 1c40000.spmi:pmic@0:adc-tm@3500:
> get dt data failed: -517
>
> Suppress it by using dev_err_probe instead, which also takes care of
> storing the message as reason for deferring.
>
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
> ---
> drivers/iio/adc/qcom-spmi-adc5.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/iio/adc/qcom-spmi-adc5.c
> b/drivers/iio/adc/qcom-spmi-adc5.c
> index 821fee60a765..69cc36004b5a 100644
> --- a/drivers/iio/adc/qcom-spmi-adc5.c
> +++ b/drivers/iio/adc/qcom-spmi-adc5.c
> @@ -894,10 +894,8 @@ static int adc5_probe(struct platform_device
> *pdev)
> mutex_init(&adc->lock);
>
> ret = adc5_get_fw_data(adc);
> - if (ret) {
> - dev_err(dev, "adc get dt data failed\n");
> - return ret;
> - }
> + if (ret)
> + return dev_err_probe(dev, ret, "adc get dt data failed\n");
>
Reviewed-by: Martin Botka <martin.botka@somainline.org>
-Martin
> irq_eoc = platform_get_irq(pdev, 0);
> if (irq_eoc < 0) {
> --
> 2.39.0
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] thermal: qcom-spmi-adc5: Suppress probe-deferral error message
2022-12-16 23:42 ` Marijn Suijten
@ 2022-12-23 15:14 ` Jonathan Cameron
0 siblings, 0 replies; 5+ messages in thread
From: Jonathan Cameron @ 2022-12-23 15:14 UTC (permalink / raw)
To: Marijn Suijten
Cc: phone-devel, ~postmarketos/upstreaming,
AngeloGioacchino Del Regno, Konrad Dybcio, Martin Botka,
Jami Kettunen, Johan Hovold, Andy Gross, Bjorn Andersson,
Konrad Dybcio, Lars-Peter Clausen, Robert Marko, Linus Walleij,
Nuno Sá, linux-arm-msm, linux-iio, linux-kernel
On Sat, 17 Dec 2022 00:42:12 +0100
Marijn Suijten <marijn.suijten@somainline.org> wrote:
> Whoops, that tile must of course have started with:
>
> iio: adc: qcom-spmi-adc5:
>
> instead of blindly copying the suffix from the thermal monitor patch
> (this driver is not a thermal monitor...). I'll send a v2 if there are
> no other objections, unless this can be fixed up when the patch is
> applied.
Fixed up whilst applying.
Applied to the togreg branch of iio.git, but only pushed out as testing for
now as I want to rebase the branch on rc1 once available.
Jonathan
>
> On 2022-12-16 20:09:45, Marijn Suijten wrote:
> > Much like 807efb7102e8 ("thermal: qcom-spmi-adc-tm5: suppress
> > probe-deferral error message") the ADC5 driver also spams a similar
> > probe-deferral error on startup when a channel is not yet available:
> >
> > [ 0.343136] qcom-spmi-adc-tm5 1c40000.spmi:pmic@0:adc-tm@3500: get dt data failed: -517
> >
> > Suppress it by using dev_err_probe instead, which also takes care of
> > storing the message as reason for deferring.
> >
> > Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
> > ---
> > drivers/iio/adc/qcom-spmi-adc5.c | 6 ++----
> > 1 file changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/iio/adc/qcom-spmi-adc5.c b/drivers/iio/adc/qcom-spmi-adc5.c
> > index 821fee60a765..69cc36004b5a 100644
> > --- a/drivers/iio/adc/qcom-spmi-adc5.c
> > +++ b/drivers/iio/adc/qcom-spmi-adc5.c
> > @@ -894,10 +894,8 @@ static int adc5_probe(struct platform_device *pdev)
> > mutex_init(&adc->lock);
> >
> > ret = adc5_get_fw_data(adc);
> > - if (ret) {
> > - dev_err(dev, "adc get dt data failed\n");
> > - return ret;
> > - }
> > + if (ret)
> > + return dev_err_probe(dev, ret, "adc get dt data failed\n");
> >
> > irq_eoc = platform_get_irq(pdev, 0);
> > if (irq_eoc < 0) {
> > --
> > 2.39.0
> >
>
> Apologies for the clumsiness.
>
> - Marijn
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-12-23 15:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-16 19:09 [PATCH] thermal: qcom-spmi-adc5: Suppress probe-deferral error message Marijn Suijten
2022-12-16 23:42 ` Marijn Suijten
2022-12-23 15:14 ` Jonathan Cameron
2022-12-17 0:18 ` Dmitry Baryshkov
2022-12-18 11:13 ` Martin Botka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox