Skip to content

Continuous mode support for VL53l0x

Abhash Jha linux-iio lkml 4 versions – Applied

Status from this message: Applied this with a couple of minor tweaks (see below) to the

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest2 patches 1 replyApplied
  2. v32 patches 2 repliesSuperseded
  3. v22 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v12 patches4 repliesSuperseded

Changes in v4 from the cover letter

- Added validate_trigger callback to check that this device uses its own trigger
- Refactored the vl53l0x_clear_irq function
- Minor code cleanups

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/2iio: proximity: vl53l0x-i2c: Added sensor ID checkdrivers/iio/proximity/vl53l0x-i2c.c+11 -20 replies
2/2iio: proximity: vl53l0x-i2c: Added continuous mode supportdrivers/iio/proximity/vl53l0x-i2c.c+135 -261 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 0/2] Continuous mode support for VL53l0x

Hello,

The first patch adds support for checking the sensor ID by reading MODEL_IDENTIFICATION register and seeing if it returns the value 0xEE

The second patch adds support for continuous mode in the sensor by using buffers. We enable the sensor's continuous mode in the buffer_postenable function.
Replaced the irq handler with a threaded irq handler in order to perform I2C reads for the data. The continuous mode can be disabled by disabling the buffer.
Added a trigger to the device for the continuous mode. Also validating that the device uses the internal trigger provided by us.

Changes in v4:
- Added validate_trigger callback to check that this device uses its own trigger
- Refactored the vl53l0x_clear_irq function
- Minor code cleanups

Changes in v3:
- Added "asm/unaligned.h" include to fix -Wimplicit-function-declaration.
- The above error was pointed during testing by kernel-test-robot
- Link to v2: https://lore.kernel.org/linux-iio/[email protected]/T/#t

Changes in v2:
- Added a trigger for the device
- Added a poll function for the triggered buffer setup
- Performed the data reading and pushing to buffers in the poll function
- Minor code refactoring

- Link to v1: https://lore.kernel.org/linux-iio/[email protected]/T/#t

Abhash Jha (2):
iio: proximity: vl53l0x-i2c: Added sensor ID check
iio: proximity: vl53l0x-i2c: Added continuous mode support

 drivers/iio/proximity/vl53l0x-i2c.c | 174 +++++++++++++++++++++++-----
 1 file changed, 146 insertions(+), 28 deletions(-)
Signature · 1 line
2.43.0