From: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
To: Jakub Szczudlo <jakubszczudlo40@gmail.com>
Cc: linux-iio@vger.kernel.org, dlechner@baylibre.com,
nuno.sa@analog.com, andy@kernel.org, marcelo.schmitt@analog.com,
robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
mike.looijmans@topic.nl, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, jorge.marques@analog.com,
antoniu.miclaus@analog.com, mazziesaccount@gmail.com,
jishnu.prakash@oss.qualcomm.com, duje@dujemihanovic.xyz,
wens@kernel.org, sakari.ailus@linux.intel.com, linusw@kernel.org
Subject: Re: [PATCH v8 3/3] iio: adc: ti-ads1100: Add ti-ads1110 support to ti-ads1100 driver
Date: Sat, 18 Jul 2026 02:02:03 +0100 [thread overview]
Message-ID: <20260718020145.72762d9d@jic23-huawei> (raw)
In-Reply-To: <20260717185033.246580-4-jakubszczudlo40@gmail.com>
On Fri, 17 Jul 2026 20:50:33 +0200
Jakub Szczudlo <jakubszczudlo40@gmail.com> wrote:
> Add ADS1110 support that have faster datarate than ADS1100, it also uses
> internal voltage reference of 2.048V for measurement.
>
> Signed-off-by: Jakub Szczudlo <jakubszczudlo40@gmail.com>
Hi Jakub,
Seems some stuff in here should be in patch 1.
Thanks
Jonathan
> diff --git a/drivers/iio/adc/ti-ads1100.c b/drivers/iio/adc/ti-ads1100.c
> index 363f790ca5d5..19533667e6cd 100644
> --- a/drivers/iio/adc/ti-ads1100.c
> +++ b/drivers/iio/adc/ti-ads1100.c
...
> @@ -139,14 +177,16 @@ static int ads1100_new_data_is_ready(struct ads1100_data *data)
> return ret;
> }
>
> - return FIELD_GET(ADS1100_CFG_ST_BSY, buffer[2]) ? 0 : 1;
> + return FIELD_GET(ADS1100_CFG_ST_BSY, buffer[2]);
This change and the use below seem odd to be in this patch. I guess
they should be back in patch 1.
> }
>
> static int ads1100_poll_data_ready(struct ads1100_data *data)
> {
> - int data_rate_Hz = ads1100_data_rate[FIELD_GET(ADS1100_DR_MASK, data->config)];
> + int data_rate_index = FIELD_GET(ADS1100_DR_MASK, data->config);
> + int data_rate_Hz = data->chip_info->available_data_rate_hz[data_rate_index];
> /* To be sure we wait 5 times more than data rate */
> - unsigned long wait_time_us = DIV_ROUND_CLOSEST(USEC_PER_SEC, 2 * data_rate_Hz);
> + unsigned long period_us = DIV_ROUND_CLOSEST(USEC_PER_SEC, data_rate_Hz);
> + unsigned long wait_time_us = 5UL * period_us;
> int data_ready;
> u8 buffer[3];
> int ret;
> @@ -159,7 +199,7 @@ static int ads1100_poll_data_ready(struct ads1100_data *data)
> }
>
> ret = readx_poll_timeout(ads1100_new_data_is_ready, data,
> - data_ready, data_ready != 0,
> + data_ready, data_ready == 0,
see above. Seems to be in wrong patch.
> wait_time_us, ADS1100_MAX_DRDY_TIMEOUT_US);
Sashiko points out that the polling period is very long. Was this meant to be period_us?
> if (data_ready < 0)
> return data_ready;
prev parent reply other threads:[~2026-07-18 1:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-17 18:50 [PATCH v8 0/3] iio: adc: ti-ads1100: Add support for TI ADS1110 " Jakub Szczudlo
2026-07-17 18:50 ` [PATCH v8 1/3] iio: adc: ti-ads1100: Fix incorrect reading when datarate changed in single mode Jakub Szczudlo
2026-07-18 0:54 ` Jonathan Cameron
2026-07-17 18:50 ` [PATCH v8 2/3] dt-bindings: iio: adc: ti,ads1100: add support for ADS1110 Jakub Szczudlo
2026-07-17 18:50 ` [PATCH v8 3/3] iio: adc: ti-ads1100: Add ti-ads1110 support to ti-ads1100 driver Jakub Szczudlo
2026-07-18 1:02 ` 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=20260718020145.72762d9d@jic23-huawei \
--to=jonathan.cameron@oss.qualcomm.com \
--cc=andy@kernel.org \
--cc=antoniu.miclaus@analog.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=duje@dujemihanovic.xyz \
--cc=jakubszczudlo40@gmail.com \
--cc=jishnu.prakash@oss.qualcomm.com \
--cc=jorge.marques@analog.com \
--cc=krzk+dt@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.schmitt@analog.com \
--cc=mazziesaccount@gmail.com \
--cc=mike.looijmans@topic.nl \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=wens@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
Powered by JetHome