Re: [PATCH v3 2/2] iio: proximity: cleanup fixes for vl53l1x-i2c
From: Andy Shevchenko
Date: Thu Jun 11 2026 - 15:23:42 EST
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@xxxxxxxxx>
...
> +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