public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/2] Continuous mode support for VL53l0x
@ 2024-09-09 10:15 Abhash Jha
  2024-09-09 10:15 ` [PATCH v4 1/2] iio: proximity: vl53l0x-i2c: Added sensor ID check Abhash Jha
  2024-09-09 10:15 ` [PATCH v4 2/2] iio: proximity: vl53l0x-i2c: Added continuous mode support Abhash Jha
  0 siblings, 2 replies; 4+ messages in thread
From: Abhash Jha @ 2024-09-09 10:15 UTC (permalink / raw)
  To: linux-iio; +Cc: songqiang1304521, jic23, lars, linux-kernel, Abhash Jha

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/20240902122557.129013-1-abhashkumarjha123@gmail.com/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/20240830201627.298264-1-abhashkumarjha123@gmail.com/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(-)

-- 
2.43.0


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

end of thread, other threads:[~2024-09-14 13:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-09 10:15 [PATCH v4 0/2] Continuous mode support for VL53l0x Abhash Jha
2024-09-09 10:15 ` [PATCH v4 1/2] iio: proximity: vl53l0x-i2c: Added sensor ID check Abhash Jha
2024-09-09 10:15 ` [PATCH v4 2/2] iio: proximity: vl53l0x-i2c: Added continuous mode support Abhash Jha
2024-09-14 13:34   ` Jonathan Cameron

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