The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Siratul Islam <email@sirat.me>
Cc: jic23@kernel.org, dlechner@baylibre.com, nuno.sa@analog.com,
	andy@kernel.org, linux-iio@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/2] iio: proximity: cleanup fixes for vl53l1x-i2c
Date: Thu, 11 Jun 2026 22:23:30 +0300	[thread overview]
Message-ID: <aisLMs0Y5na9G-Qc@ashevche-desk.local> (raw)
In-Reply-To: <20260611134245.30042-3-email@sirat.me>

On Thu, Jun 11, 2026 at 07:42:30PM +0600, Siratul Islam wrote:
> Extract data-ready polling into a helper, fix regmap_read_poll_timeout()
> argument alignment, and add field definitions for BIT(0).
> No functional changes.

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

...

> +static int vl53l1x_wait_data_ready(struct vl53l1x_data *data)
> +{
> +	unsigned int val;
> +
> +	/* 1ms poll, 1s timeout covers max timing budgets (per ST Ultra Lite Driver) */
> +	return regmap_read_poll_timeout(data->regmap,
> +					VL53L1X_REG_GPIO__TIO_HV_STATUS,
> +					val, (val & VL53L1X_GPIO__TIO_HV_STATUS_DATA_READY) !=
> +					data->gpio_polarity,

I would put it this way
					val,
					(val & VL53L1X_GPIO__TIO_HV_STATUS_DATA_READY) != data->gpio_polarity,

but it goes over even 100! So up to Jonathan.

> +					1 * USEC_PER_MSEC, 1 * USEC_PER_SEC);
> +}

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2026-06-11 19:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-11 13:42 [PATCH v3 0/2] iio: proximity: cleanup fixes for vl53l1x-i2c Siratul Islam
2026-06-11 13:42 ` [PATCH v3 1/2] iio: proximity: sort the register values " Siratul Islam
2026-06-11 19:21   ` Andy Shevchenko
2026-06-11 13:42 ` [PATCH v3 2/2] iio: proximity: cleanup fixes " Siratul Islam
2026-06-11 19:23   ` Andy Shevchenko [this message]
2026-06-12 17:44     ` Jonathan Cameron
2026-06-12 17:40   ` Jonathan Cameron

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=aisLMs0Y5na9G-Qc@ashevche-desk.local \
    --to=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=email@sirat.me \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.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