mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] iio: proximity: Add Benewake TF-Luna LiDAR driver
@ 2026-10-19 18:33 Vidhu Sarwal via B4 Relay
  2026-10-19 18:33 ` [PATCH 1/3] dt-bindings: vendor-prefixes: Add Benewake Vidhu Sarwal via B4 Relay
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Vidhu Sarwal via B4 Relay @ 2026-10-19 18:33 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Vidhu Sarwal,
	Jonathan Cameron, David Lechner, Nuno Sá,
	Andy Shevchenko
  Cc: devicetree, linux-kernel, linux-iio, Shuah Khan

This series adds support for the Benewake TF-Luna, a single point ToF
 LiDAR distance sensor with a range of 0.2 m to 8 m. The
sensor uses either UART or I2C, selected by a strap pin at power-up.
This series covers the I2C interface only.

Patch 1 adds the vendor prefix, patch 2 adds the binding and patch 3 adds the
driver, which reports distance using an IIO_DISTANCE channel.

The driver keeps the sensor in trigger mode and starts a measurement
per read. The manual warns that reads in continuous mode can race with
the sensor updating its result registers unless they are synchronised
to the data ready output, which the driver does not use yet.

Two issues I faced with the hardware that the manual does not mention:
- The sensor silently drops a register write that arrives right after
  another one, so probe reads the mode back after setting it.
- The boot time is not documented. I was able to measure 350ms after a
  reboot before the registers read back correctly, so probe waits
  500 ms after enabling the supply, keeping some buffer.

Later on I plan to add buffered caputure using data ready interrupt and 
runtime PM in a follow up series. 

This was tested on hardware using Raspberry Pi 4 and with firmware v3.6.0
built out of tree on the 6.18 RPi kernel both via new_device as well as a 
DT Overlay.

---
Vidhu Sarwal (3):
      dt-bindings: vendor-prefixes: Add Benewake
      dt-bindings: iio: proximity: Add Benewake TF-Luna
      iio: proximity: Add Benewake TF-Luna LiDAR driver

 .../bindings/iio/proximity/benewake,tf-luna.yaml   |  58 +++++
 .../devicetree/bindings/vendor-prefixes.yaml       |   2 +
 MAINTAINERS                                        |   7 +
 drivers/iio/proximity/Kconfig                      |  11 +
 drivers/iio/proximity/Makefile                     |   1 +
 drivers/iio/proximity/tf-luna.c                    | 254 +++++++++++++++++++++
 6 files changed, 333 insertions(+)
---
base-commit: 43ffda3c7f8456bbe641ae8249a077a361b97880
change-id: 20261019-tf-luna-e2685e0570d5

Best regards,
--  
Vidhu Sarwal <vidhu.linux@gmail.com>



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

end of thread, other threads:[~2026-10-19 23:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-19 18:33 [PATCH 0/3] iio: proximity: Add Benewake TF-Luna LiDAR driver Vidhu Sarwal via B4 Relay
2026-10-19 18:33 ` [PATCH 1/3] dt-bindings: vendor-prefixes: Add Benewake Vidhu Sarwal via B4 Relay
2026-10-19 18:33 ` [PATCH 2/3] dt-bindings: iio: proximity: Add Benewake TF-Luna Vidhu Sarwal via B4 Relay
2026-10-19 18:33 ` [PATCH 3/3] iio: proximity: Add Benewake TF-Luna LiDAR driver Vidhu Sarwal via B4 Relay

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®