zephyr/drivers/sensor
Titouan Christophe 93d06330c5 drivers: sensor: vl53l0x: add support to reprogram I2C address
The I2C address of the VL53L0X distance sensor can only be programmed
over the I2C bus. To do this:

1. The sensor is powered off or in standby mode
2. Power up the sensor, it boots with a default I2C address (0x29)
3. The I2C master sends a configuration command to set the new address
4. The sensor now communicates at the new address

In case there are more than one such sensor on the bus, they all have
the same address when starting up. We therefore need to first apply
step 1. on all of them. Then, sensor by sensor apply steps 2. to 4.

Because simple designs may not need to reprogram the address, we
introduce a new configuration option CONFIG_VL53L0X_RECONFIGURE_ADDRESS

If this setting is disabled, then the driver behaves as before.

If CONFIG_VL53L0X_RECONFIGURE_ADDRESS is enabled, then the driver does
the following:

- In vl53l0x_init(), apply step 1. This is done when the driver is
  brought up when starting the system
- in vl53l0x_start(), apply steps 2. to 4. This is done when fetching
  a sample, if the sensor has not been started yet.

Also, as cosmetic changes:
- add parenthesis around sub conditions in call to __ASSERT_NO_MSG
- gracefully handle unknown sensor channels in vl53l0x_channel_get

Signed-off-by: Titouan Christophe <moiandme@gmail.com>
2022-04-07 14:30:01 -05:00
..
adt7420
adxl345
adxl362
adxl372 everywhere: fix typos 2022-03-14 20:22:24 -04:00
ak8975
amg88xx everywhere: fix typos 2022-03-14 20:22:24 -04:00
ams_iAQcore
apds9960 kconfig: remove Enable from boolean prompts 2022-03-09 15:35:54 +01:00
bma280 everywhere: fix typos 2022-03-14 20:22:24 -04:00
bmc150_magn kconfig: remove Enable from boolean prompts 2022-03-09 15:35:54 +01:00
bme280 drivers: sensor: drop get_dev_data/get_dev_config usage 2022-01-19 18:16:02 +01:00
bme680 drivers: remove redundant data/config casts 2022-01-19 18:16:02 +01:00
bmg160
bmi160 bmi160: Added I2C to Kconfig dependency 2022-03-23 10:01:47 -07:00
bmi270 drivers: fix double promotion warnings 2021-11-24 17:14:25 -05:00
bmm150 kconfig: remove Enable from boolean prompts 2022-03-09 15:35:54 +01:00
bmp388 everywhere: fix typos 2022-03-14 20:22:24 -04:00
bq274xx everywhere: fix typos 2022-03-14 20:22:24 -04:00
ccs811
dht everywhere: fix typos 2022-03-14 20:22:24 -04:00
dps310 everywhere: fix typos 2022-03-14 20:22:24 -04:00
ens210 kconfig: remove Enable from boolean prompts 2022-03-09 15:35:54 +01:00
fdc2x1x everywhere: fix typos 2022-03-14 20:22:24 -04:00
fxas21002
fxos8700 kconfig: remove Enable from boolean prompts 2022-03-09 15:35:54 +01:00
grove kconfig: remove Enable from boolean prompts 2022-03-09 15:35:54 +01:00
hmc5883l everywhere: fix typos 2022-03-14 20:22:24 -04:00
hp206c
hts221 drivers/sensors: Enable 3-wire SPI access to HTS221 sensor driver 2021-11-19 11:50:38 +01:00
i3g4250d everywhere: fix typos 2022-03-14 20:22:24 -04:00
icm42605 drivers: sensor: icm42605: fix arg passing bug in trigger thread 2022-03-16 08:58:06 -05:00
iis2dh everywhere: fix typos 2022-03-14 20:22:24 -04:00
iis2dlpc everywhere: fix typos 2022-03-14 20:22:24 -04:00
iis2iclx kconfig: remove Enable from boolean prompts 2022-03-09 15:35:54 +01:00
iis2mdc everywhere: fix typos 2022-03-18 13:24:08 -04:00
iis3dhhc kconfig: remove Enable from boolean prompts 2022-03-09 15:35:54 +01:00
ina23x drivers: sensor: ina23x: add support for INA237 2021-12-14 13:48:54 -06:00
ina219 include: sensor: sensor_value from double overflow 2022-02-24 13:45:29 -08:00
isl29035
ism330dhcx kconfig: remove Enable from boolean prompts 2022-03-09 15:35:54 +01:00
ite_tach_it8xxx2 ITE drivers/sensor: add tachometer driver for it8xxx2_evb 2021-11-29 08:25:19 -05:00
ite_vcmp_it8xxx2 ITE drivers/sensor/vcmp: don't connect shared irq multiple times 2022-03-31 12:20:11 -05:00
lis2dh everywhere: fix typos 2022-03-18 13:24:08 -04:00
lis2ds12 kconfig: remove Enable from boolean prompts 2022-03-09 15:35:54 +01:00
lis2dw12 drivers/sensor: stmemsc: make use of spi_dt_spec and i2c_dt_spec 2021-10-22 09:06:07 -05:00
lis2mdl everywhere: fix typos 2022-03-18 13:24:08 -04:00
lis3mdl everywhere: fix typos 2022-03-14 20:22:24 -04:00
lm75 drivers: remove redundant data/config casts 2022-01-19 18:16:02 +01:00
lm77 pm: s/PM_DEVICE_(DT_(INST))_REF/PM_DEVICE_(DT_(INST))_GET 2022-01-18 12:14:06 -05:00
lps22hb
lps22hh drivers/sensor: lps22hh: Move odr Kconfig property into dts 2021-12-14 09:11:15 -06:00
lps25hb
lsm6ds0 kconfig: remove Enable from boolean prompts 2022-03-09 15:35:54 +01:00
lsm6dsl drivers: sensor: lsm6dsl: FIX bugs on few registers definition 2022-03-17 08:43:39 -05:00
lsm6dso kconfig: remove Enable from boolean prompts 2022-03-09 15:35:54 +01:00
lsm9ds0_gyro kconfig: remove Enable from boolean prompts 2022-03-09 15:35:54 +01:00
lsm9ds0_mfd kconfig: remove Enable from boolean prompts 2022-03-09 15:35:54 +01:00
lsm303dlhc_magn drivers: sensor: lsm303dlhc_mag: Fix gain factor 2021-10-04 20:40:43 -04:00
max6675 drivers: sensor: max6675: convert to spi_dt_spec 2021-12-09 10:21:13 -06:00
max17055 everywhere: fix typos 2022-03-18 13:24:08 -04:00
max17262 everywhere: fix typos 2022-03-14 20:22:24 -04:00
max30101
max31875 drivers: sensors: Implement MAX31875 sensor 2022-02-24 08:49:40 -06:00
max44009
mchp_tach_xec drivers: tach: Microchip XEC TACH driver add PINCTRL support 2022-03-31 10:30:17 +02:00
mcp9808
mcux_acmp drivers: sensor: Add pinctrl support for mcux acmp sensor 2022-03-22 12:36:04 +01:00
mhz19b drivers: sensor: mhz19b: fix all channels fetch 2022-03-25 08:22:33 -05:00
mpr
mpu6050
mpu9250 sensors: Implement MPU9250 driver 2022-01-14 12:33:04 +01:00
ms5607 drivers: Apply SPI API change to relevant places 2021-11-19 11:50:38 +01:00
ms5837
nrf5 drivers: nrf5: kconfig: add missing dependency for TEMP_NRF5 2021-12-01 16:10:59 +01:00
nuvoton_tach_npcx everywhere: fix typos 2022-03-14 20:22:24 -04:00
nxp_kinetis_temp kconfig: remove Enable from boolean prompts 2022-03-09 15:35:54 +01:00
opt3001 everywhere: fix typos 2022-03-14 20:22:24 -04:00
pms7003
qdec_nrfx soc: nrf: Use data from DTS to populate HAS_HW_NRF_* Kconfig options 2022-04-02 15:14:38 +02:00
qdec_sam drivers: sensors: Update sam qdec driver to use pinctrl 2022-03-24 15:45:37 -07:00
sbs_gauge drivers: remove redundant data/config casts 2022-01-19 18:16:02 +01:00
sgp40 everywhere: fix typos 2022-03-14 20:22:24 -04:00
sht3xd everywhere: fix typos 2022-03-14 20:22:24 -04:00
sht4x
shtcx drivers: sensor: shtcx: fix 2021-11-29 18:18:42 -05:00
si7006 everywhere: fix typos 2022-03-14 20:22:24 -04:00
si7055
si7060
si7210 everywhere: fix typos 2022-03-14 20:22:24 -04:00
sm351lt everywhere: fix typos 2022-03-14 20:22:24 -04:00
stm32_temp include: sensor: sensor_value from double overflow 2022-02-24 13:45:29 -08:00
stmemsc everywhere: fix typos 2022-03-18 13:24:08 -04:00
stts751
sx9500
th02
ti_hdc
ti_hdc20xx
tmp007
tmp108 sample: sensor: tmp108: Add ti tmp108 sample 2021-12-17 21:15:25 +01:00
tmp112 drivers: avoid i2c_burst_write where possible 2021-12-22 12:14:42 +01:00
tmp116 sensor: eeprom: Add TMP116 EEPROM access 2021-12-08 07:51:46 -06:00
vcnl4040 kconfig: remove Enable from boolean prompts 2022-03-09 15:35:54 +01:00
vl53l0x drivers: sensor: vl53l0x: add support to reprogram I2C address 2022-04-07 14:30:01 -05:00
wsen_itds drivers: use DT_INST_ENUM_IDX(_OR) macros 2021-11-18 19:12:07 -05:00
CMakeLists.txt ITE drivers/sensor: add voltage comparator driver 2022-03-25 15:00:35 -07:00
Kconfig ITE drivers/sensor: add voltage comparator driver 2022-03-25 15:00:35 -07:00
sensor_handlers.c
sensor_shell.c drivers: sensor_shell: add missing power sensor channel 2021-10-19 07:15:55 -04:00
shell_battery.c