From: Dan Carpenter <error27@gmail.com>
To: Taha Narimani <tahanarimani3443@gmail.com>
Cc: jic23@kernel.org, lars@metafoo.de, Michael.Hennerich@analog.com,
gregkh@linuxfoundation.org, dlechner@baylibre.com,
nuno.sa@analog.com, andy@kernel.org, linux-iio@vger.kernel.org,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] staging: iio: adc: ad7816: Use devm_gpiod_get_optional() for busy GPIO
Date: Fri, 10 Jul 2026 19:54:15 +0300 [thread overview]
Message-ID: <alEjtybak6T5sH7I@stanley.mountain> (raw)
In-Reply-To: <20260710160001.29856-2-tahanarimani3443@gmail.com>
On Fri, Jul 10, 2026 at 04:00:01PM +0000, Taha Narimani wrote:
> /*
> * struct ad7816_chip_info - chip specific information
> @@ -48,7 +48,7 @@ struct ad7816_chip_info {
> struct gpio_desc *convert_pin;
> struct gpio_desc *busy_pin;
> u8 oti_data[AD7816_CS_MAX + 1];
> - u8 channel_id; /* 0 always be temperature */
> + u8 channel_id; /* 0 always be temperature */
What changed here??
> u8 mode;
> };
>
> @@ -84,10 +84,8 @@ static int ad7816_spi_read(struct ad7816_chip_info *chip, u16 *data)
> gpiod_set_value(chip->convert_pin, 1);
> }
>
> -if (chip->id == ID_AD7816 || chip->id == ID_AD7817) {
> - while (gpiod_get_value(chip->busy_pin))
> - cpu_relax();
This patch doesn't apply. Not sure what went wrong but maybe it's
related to this?
> - }
> + while (gpiod_get_value(chip->busy_pin))
> + cpu_relax();
>
> gpiod_set_value(chip->rdwr_pin, 0);
> gpiod_set_value(chip->rdwr_pin, 1);
regards,
dan carpenter
next prev parent reply other threads:[~2026-07-10 16:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-10 16:00 [PATCH v3 RFC v3] dt-bindings: iio: adc: add ad7816/7/8 digital temperature sensor / ADC Taha Narimani
2026-07-10 16:00 ` [PATCH v3] staging: iio: adc: ad7816: Use devm_gpiod_get_optional() for busy GPIO Taha Narimani
2026-07-10 16:54 ` Dan Carpenter [this message]
2026-07-10 17:53 ` Maxwell Doose
2026-07-11 7:48 ` [PATCH v3 RFC v3] dt-bindings: iio: adc: add ad7816/7/8 digital temperature sensor / ADC Krzysztof Kozlowski
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=alEjtybak6T5sH7I@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=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