From: Dan Carpenter <error27@gmail.com>
To: Taha Narimani <tahanarimani3443@gmail.com>,
Nishad Kamdar <nishadkamdar@gmail.com>
Cc: "Lars-Peter Clausen" <lars@metafoo.de>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"open list:STAGING - INDUSTRIAL IO" <linux-iio@vger.kernel.org>,
"open list:STAGING SUBSYSTEM" <linux-staging@lists.linux.dev>,
"open list" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] staging: iio: adc: ad7816: drop busy pin requirement for ad7816
Date: Mon, 1 Jun 2026 14:37:14 +0300 [thread overview]
Message-ID: <ah1u6r2NemqKd2k7@stanley.mountain> (raw)
In-Reply-To: <20260530173514.56640-1-tahanarimani3443@gmail.com>
On Sat, May 30, 2026 at 05:35:12PM +0000, Taha Narimani wrote:
> According to the AD7816/7/8 datasheet, the AD7816 is an 8-pin device
> and does not possess a BUSY pin. The BUSY pin is exclusive to the
> 16-pin AD7817.
>
> The driver previously requested a 'busy' GPIO unconditionally for both
> the AD7816 and AD7817. If a device tree correctly modeled the hardware
> by omitting the busy-gpios property for the AD7816, devm_gpiod_get()
> would return -ENOENT and cause the probe to fail.
>
> Fix this by restricting the busy GPIO request strictly to the AD7817.
>
> Signed-off-by: Taha Narimani <tahanarimani3443@gmail.com>
The patch is corrupted.
Otherwise this seems reasonable enough. (I haven't read the datasheet
but I trust that you have). Let's add Nishad to the CC list since he
is the one who first limitted it to not check ID_AD7818.
The other way to solve this would be to use devm_gpiod_get_optional()
in the probe() function and test for NULL in ad7816_spi_read(). I
think this would be a cleaner solution because then it works based
on the device trees instead of having to hardcode which devices
have it in the driver itself.
regards,
dan carpenter
next prev parent reply other threads:[~2026-06-01 11:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-30 17:35 [PATCH] staging: iio: adc: ad7816: drop busy pin requirement for ad7816 Taha Narimani
2026-06-01 11:37 ` Dan Carpenter [this message]
2026-06-01 15:40 ` Taha Narimani
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=ah1u6r2NemqKd2k7@stanley.mountain \
--to=error27@gmail.com \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=gregkh@linuxfoundation.org \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=nishadkamdar@gmail.com \
--cc=nuno.sa@analog.com \
--cc=tahanarimani3443@gmail.com \
/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