mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] iio: proximity: add driver for ST VL53L1X ToF sensor
@ 2026-03-08 11:37 Siratul Islam
  2026-03-08 11:37 ` [PATCH v2 1/2] dt-bindings: iio: proximity: add " Siratul Islam
  2026-03-08 11:37 ` [PATCH v2 2/2] iio: proximity: add driver for " Siratul Islam
  0 siblings, 2 replies; 7+ messages in thread
From: Siratul Islam @ 2026-03-08 11:37 UTC (permalink / raw)
  To: linux-iio, devicetree
  Cc: jic23, dlechner, nuno.sa, andy, robh, krzk+dt, conor+dt,
	linux-kernel, Siratul Islam

This series adds support for the STMicroelectronics VL53L1X
Time-of-Flight ranging sensor.

The VL53L1X is a ToF laser-ranging sensor with I2C interface,
capable of measuring distances up to 4 meters. The driver
supports both interrupt-driven and polled operation.

Tested on Raspberry Pi 5 with a VL53L1X breakout board.

---
Changes in v2:
- Skip software reset in chip_init when xshut GPIO is available, since the device was already hardware-reset during power-on.
- Rename "reset" GPIO to "xshut" to match the datasheet pin name and updated DT binding accordingly.
- Make vdd-supply required in DT binding.
- Use reg_sequence arrays and regmap_multi_reg_write() for distance mode configuration.
- Switch to a hardirq handler with iio_trigger_poll() and IRQF_NO_THREAD instead of a threaded handler.
- Drop IRQF_TRIGGER_FALLING fallback. Leave trigger type to firmware/DT.
- Use iio_validate_own_trigger() instead of a custom validate_trigger, drop trig pointer from driver data.
- Switch usleep_range() to fsleep() throughout and add comments for sleep values.
- Don't fail probe on unknown model ID, just log with dev_info().
- Split stop_ranging cleanup into its own devm action, separate from power_off.
- Add missing includes: device.h, bitfield.h, completion.h, mod_devicetable.h.
- Use FIELD_GET() for range status checks.
- Move configure_irq() closer to probe(), use dev_err_probe() for its error paths.
- Fix buffer ops symmetry: postdisable -> predisable.
- Drop reg_format_endian from regmap config.
- Various alignment and formatting fixes.

Link to v1: https://lore.kernel.org/linux-iio/20260303090253.42076-1-email@sirat.me

Siratul Islam (2):
  dt-bindings: iio: proximity: add ST VL53L1X ToF sensor
  iio: proximity: add driver for ST VL53L1X ToF sensor

 .../bindings/iio/proximity/st,vl53l1x.yaml    |  50 +
 MAINTAINERS                                   |   7 +
 drivers/iio/proximity/Kconfig                 |  14 +
 drivers/iio/proximity/Makefile                |   1 +
 drivers/iio/proximity/vl53l1x-i2c.c           | 871 ++++++++++++++++++
 5 files changed, 943 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/proximity/st,vl53l1x.yaml
 create mode 100644 drivers/iio/proximity/vl53l1x-i2c.c

--
2.53.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-03-09 11:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-08 11:37 [PATCH v2 0/2] iio: proximity: add driver for ST VL53L1X ToF sensor Siratul Islam
2026-03-08 11:37 ` [PATCH v2 1/2] dt-bindings: iio: proximity: add " Siratul Islam
2026-03-09  7:31   ` Krzysztof Kozlowski
2026-03-08 11:37 ` [PATCH v2 2/2] iio: proximity: add driver for " Siratul Islam
2026-03-08 21:08   ` Andy Shevchenko
2026-03-09 10:27     ` Sirat
2026-03-09 11:29       ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®