Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: Pengpeng Hou <pengpeng@iscas.ac.cn>,
	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: Wed, 1 Jul 2026 22:36:20 +0100	[thread overview]
Message-ID: <20260701223620.714f4e7f@jic23-huawei> (raw)
In-Reply-To: <ajzPBWPKTra82lb_@ashevche-desk.local>

On Thu, 25 Jun 2026 09:47:33 +0300
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:

> 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.)
> 

Applied to the fixes-togreg branch of iio.git.

One small process thing.  Please don't send new versions in reply to older
ones - just send a new thread.  Doing it as replies makes for confusing threads
and ensures they are many pages up in the maintainers inbox!

Jonathan


      reply	other threads:[~2026-07-01 21:36 UTC|newest]

Thread overview: 6+ 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
2026-07-01 21:36     ` Jonathan Cameron [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=20260701223620.714f4e7f@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=dmurphy@ti.com \
    --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