From: Jonathan Cameron <jic23@kernel.org>
To: Dmitry Osipenko <digetx@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
Andy Shevchenko <andy.shevchenko@gmail.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] iio: magnetometer: ak8974: Silence deferred-probe error
Date: Sat, 18 Apr 2020 19:21:45 +0100 [thread overview]
Message-ID: <20200418192145.57fa291b@archlinux> (raw)
In-Reply-To: <20200418171244.2320-1-digetx@gmail.com>
On Sat, 18 Apr 2020 20:12:44 +0300
Dmitry Osipenko <digetx@gmail.com> wrote:
> It's not uncommon that voltage regulator becomes available later during
> kernel's boot process. This patch adds info message about unavailable
> regulators in a case of the deferred-probe error and also amends the
> error message with a error code.
>
> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Applied to the togreg branch of iio.git and pushed out as testing for the
autobuilders to play with it.
Thanks,
Jonathan
> ---
>
> Changelog:
>
> v3: - Replaced dev_info() with dev_dbg().
>
> v2: - Replaced dev_printk() with dev_info() for the deferred-probe error,
> as was requested by Linus Walleij in a review comment to v1.
>
> drivers/iio/magnetometer/ak8974.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/iio/magnetometer/ak8974.c b/drivers/iio/magnetometer/ak8974.c
> index d32996702110..372c80c25dd4 100644
> --- a/drivers/iio/magnetometer/ak8974.c
> +++ b/drivers/iio/magnetometer/ak8974.c
> @@ -746,7 +746,12 @@ static int ak8974_probe(struct i2c_client *i2c,
> ARRAY_SIZE(ak8974->regs),
> ak8974->regs);
> if (ret < 0) {
> - dev_err(&i2c->dev, "cannot get regulators\n");
> + if (ret != -EPROBE_DEFER)
> + dev_err(&i2c->dev, "cannot get regulators: %d\n", ret);
> + else
> + dev_dbg(&i2c->dev,
> + "regulators unavailable, deferring probe\n");
> +
> return ret;
> }
>
next prev parent reply other threads:[~2020-04-18 18:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-18 17:12 [PATCH v3] iio: magnetometer: ak8974: Silence deferred-probe error Dmitry Osipenko
2020-04-18 18:21 ` Jonathan Cameron [this message]
2020-04-18 18:58 ` Dmitry Osipenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200418192145.57fa291b@archlinux \
--to=jic23@kernel.org \
--cc=andy.shevchenko@gmail.com \
--cc=digetx@gmail.com \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linus.walleij@linaro.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox