Re: [PATCH v6 2/2] iio: proximity: add driver for ST VL53L1X ToF sensor
From: Andy Shevchenko
Date: Fri Mar 20 2026 - 04:41:04 EST
On Fri, Mar 20, 2026 at 01:07:14AM +0600, Siratul Islam wrote:
> Add support for the STMicroelectronics VL53L1X Time-of-Flight
> ranging sensor with I2C interface.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
A couple of small style amendments below, but no need to resend
only for addressing them — Jonathan can tweak if he agrees on that.
...
> +static const struct regmap_range vl53l1x_wr_only_ranges[] = {
> + regmap_reg_range(VL53L1X_SOFT_RESET, VL53L1X_SOFT_RESET),
> + regmap_reg_range(VL53L1X_SYSTEM__INTERRUPT_CLEAR,
> + VL53L1X_SYSTEM__MODE_START),
> +};
> +
> +static const struct regmap_access_table vl53l1x_readable_table = {
> + .no_ranges = vl53l1x_wr_only_ranges,
I would spell 'write' in full in the name of the array variable.
> + .n_no_ranges = ARRAY_SIZE(vl53l1x_wr_only_ranges),
> +};
...
> + ret = regmap_write(data->regmap, VL53L1X_SYSTEM__INTERRUPT_CONFIG_GPIO,
> + VL53L1X_INT_NEW_SAMPLE_READY);
> + if (ret)
> + return dev_err_probe(dev, ret,
> + "failed to configure IRQ\n");
It's perfectly one line.
--
With Best Regards,
Andy Shevchenko