Skip to contentSkip to conversation

iio: proximity: vl53l0x: select triggered buffer support

PATCH In review Pengpeng Hou 2 participants 2 messages Nov 30 IIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iio: proximity: vl53l0x: select triggered buffer support

The VL53L0X interrupt and continuous-mode paths register and poll an IIO trigger and set up a triggered buffer. VL53L0X_I2C does not select those facilities, so enabling this driver without another IIO buffer consumer can leave the trigger types and interfaces unavailable during compilation.

Select IIO_BUFFER and IIO_TRIGGERED_BUFFER to provide the complete buffer and trigger infrastructure used by the driver.

The issue was found by our static-analysis tool and manually reviewed.

Fixes 762186c6e7b1 ("iio: proximity: vl53l0x-i2c: Added continuous mode support")

---
AI assistance: gpt 5 (patch preparation and review).

 drivers/iio/proximity/Kconfig | 2 ++
 1 file changed, 2 insertions(+)
drivers/iio/proximity/Kconfig +2 -0
index bb77fad..0793a53 100644
@@ -236,6 +236,8 @@ config VCNL3020
 config VL53L0X_I2C
 	tristate "STMicroelectronics VL53L0X ToF ranger sensor (I2C)"
 	depends on I2C
+	select IIO_BUFFER
+	select IIO_TRIGGERED_BUFFER
 	help
 	  Say Y here to build a driver for STMicroelectronics VL53L0X
 	  ToF ranger sensors with i2c interface.

base-commit: fe6ff8d5d675c01793b9f051d16055dd4aa75244

Tested-by Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Pengpeng Hou

The VL53L0X interrupt and continuous-mode paths register and poll an IIO trigger and set up a triggered buffer. VL53L0X_I2C does not select those facilities, so enabling this driver without another IIO buffer consumer can leave the trigger types and interfaces unavailable during compilation.

Quoted 8 lines

Select IIO_BUFFER and IIO_TRIGGERED_BUFFER to provide the complete buffer and trigger infrastructure used by the driver.

The issue was found by our static-analysis tool and manually reviewed.

Fixes 762186c6e7b1 ("iio: proximity: vl53l0x-i2c: Added continuous mode support")

---

Signature · 2 lines
Kind regards,
Joshua Crofts