Linux IIO development
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Pengpeng Hou <pengpeng@iscas.ac.cn>
Cc: Jonathan Cameron <jic23@kernel.org>,
	David Lechner <dlechner@baylibre.com>,
	Nuno Sa <nuno.sa@analog.com>, Andy Shevchenko <andy@kernel.org>,
	Dan Murphy <dmurphy@ti.com>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org, Joshua Crofts <joshua.crofts1@gmail.com>
Subject: Re: [PATCH v2] iio: adc: ti-ads124s08: Return reset GPIO lookup errors
Date: Thu, 25 Jun 2026 09:47:33 +0300	[thread overview]
Message-ID: <ajzPBWPKTra82lb_@ashevche-desk.local> (raw)
In-Reply-To: <20260625054407.82228-1-pengpeng@iscas.ac.cn>

On Thu, Jun 25, 2026 at 01:44:07PM +0800, Pengpeng Hou wrote:
> devm_gpiod_get_optional() returns NULL when the optional GPIO is absent,
> but returns an ERR_PTR when the GPIO provider lookup fails, including
> probe deferral.
> 
> Probe currently logs the ERR_PTR case as if the reset GPIO were simply
> absent and keeps the error pointer in reset_gpio. Later ads124s_reset()
> treats any non-NULL reset_gpio as a valid descriptor and passes it to
> gpiod_set_value_cansleep().

The GPIOLIB code will print an error message each time that's called.
This might flood the logs with a noise.

> Return the lookup error instead of retaining the ERR_PTR.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>

It's good as a fix for backport, but can you consider switching to use reset
framework and reset-gpio driver instead? (As a separate change on top of this
one.)

-- 
With Best Regards,
Andy Shevchenko



      reply	other threads:[~2026-06-25  6:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-24  5:53 [PATCH] iio: adc: ti-ads124s08: Return reset failures Pengpeng Hou
2026-06-24  6:57 ` Joshua Crofts
2026-06-24 11:10 ` Andy Shevchenko
2026-06-25  5:44 ` [PATCH v2] iio: adc: ti-ads124s08: Return reset GPIO lookup errors Pengpeng Hou
2026-06-25  6:47   ` Andy Shevchenko [this message]

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=ajzPBWPKTra82lb_@ashevche-desk.local \
    --to=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=dmurphy@ti.com \
    --cc=jic23@kernel.org \
    --cc=joshua.crofts1@gmail.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=pengpeng@iscas.ac.cn \
    --cc=stable@vger.kernel.org \
    /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