zephyr/drivers
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
..
adc soc: nrf: Use data from DTS to populate HAS_HW_NRF_* Kconfig options 2022-04-02 15:14:38 +02:00
audio soc: nrf: Use data from DTS to populate HAS_HW_NRF_* Kconfig options 2022-04-02 15:14:38 +02:00
bbram drivers: bbram: mec: fixed compilation error 2022-03-01 14:18:55 -06:00
bluetooth ipc_service: Automatically include source files for backends 2022-03-29 12:30:50 -07:00
cache cache: Introduce external cache controller system support 2021-05-08 07:00:33 +02:00
can drivers: can: handlers: copy outbound argument structs 2022-04-07 09:38:18 +02:00
clock_control drivers: clock_control: lpc: syscon: Add BUSCLK support 2022-03-24 10:44:27 +01:00
console drivers: gsm_mux: Namespace macros to prevent compilation errors 2022-03-22 12:34:57 +01:00
counter drivers: timer: Add sam0 tc32 support to pinctrl 2022-03-24 15:45:37 -07:00
crypto soc: nrf: Use data from DTS to populate HAS_HW_NRF_* Kconfig options 2022-04-02 15:14:38 +02:00
dac drivers: dac: Add sam0 support to pinctrl 2022-03-24 15:45:37 -07:00
debug kconfig: remove Enable from boolean prompts 2022-03-09 15:35:54 +01:00
disk drivers/disk: sdmmc: stm32: DMA header requested on F4 serie 2022-04-05 11:17:08 +02:00
display drivers: display: st7789v: Add multi-instance support 2022-04-06 10:58:26 +02:00
dma dma/cavs_hda: Support channel filtering 2022-04-06 14:08:01 -04:00
ec_host_cmd_periph everywhere: fix typos 2022-03-14 20:22:24 -04:00
edac kconfig: remove Enable from boolean prompts 2022-03-09 15:35:54 +01:00
eeprom drivers: remove redundant DEV_NAME helpers 2022-03-15 17:31:51 -04:00
entropy Bluetooth: host: Introduce a new bt_hci_le_rand() call 2022-04-01 11:21:51 +02:00
espi drivers: espi: xec: mec172x: Handle eSPI bus host enable 2022-04-05 11:19:03 +02:00
ethernet drivers: ethernet: eth_mcux: add support for resetting phy 2022-03-25 15:47:54 -05:00
flash drivers: flash: shell: improve flash device choice 2022-03-31 13:55:10 +02:00
fpga kconfig: remove Enable from boolean prompts 2022-03-09 15:35:54 +01:00
gpio drivers: gpio: gpio_mcux_lpc: Add pinmuxing control to gpio driver 2022-04-06 20:57:22 -07:00
hwinfo hwinfo: Add dependency handling for HWINFO_NRF in nonsecure 2022-04-07 11:02:52 -04:00
i2c drivers: i2c: i2c_mcux_flexcomm: enable pinctrl for i2c flexcomm driver 2022-04-06 20:57:22 -07:00
i2s drivers: i2s: i2s_mcux_flexcomm: add pinctrl support to lpc i2s driver 2022-04-06 20:57:22 -07:00
ieee802154 drivers: ieee802154: Use secure services 2022-04-04 11:15:28 +02:00
interrupt_controller drivers: intc: intc_cavs: use correct per-core register set for all ops 2022-04-06 22:00:14 -04:00
ipm everywhere: fix typos 2022-03-18 13:24:08 -04:00
kscan ITE drivers/kscan: use wakeup interface for WUC pins 2022-03-21 16:35:03 -07:00
led everywhere: fix typos 2022-03-14 20:22:24 -04:00
led_strip drivers: led_strip: add tlc5971 driver 2022-03-23 12:50:11 +01:00
lora drivers: gpio: move non-standard dts flags to be soc specific 2022-03-10 13:46:34 -05:00
mbox mbox: Fix function syscall check 2022-03-02 07:55:32 -08:00
mdio drivers: eth: Update sam/sam0 eth drivers to use pinctrl 2022-03-24 15:45:37 -07:00
memc drivers: memc: memc_mcux_flexspi: make pinctrl support conditional 2022-03-26 03:41:02 -05:00
misc kconfig: tweak Kconfig prompts 2022-03-09 15:35:54 +01:00
mm everywhere: fix typos 2022-03-18 13:24:08 -04:00
modem modem: hl7800: add API to set bands 2022-03-30 11:39:06 +02:00
net drivers: net: loopback: Add interface to simulate packet drop 2022-04-01 12:36:14 -05:00
neural_net drivers: remove redundant DEV_NAME helpers 2022-03-15 17:31:51 -04:00
pcie pcie: ecam: implement MSI/MSI-X interrupts setup 2022-03-25 12:56:25 +01:00
peci drivers: peci: Microchip XEC PECI driver add PINCTRL support 2022-04-05 11:16:41 +02:00
pinctrl drivers: pinctrl: Add LPC IOCON pinctrl driver 2022-04-06 20:57:22 -07:00
pinmux drivers: pinmux: Drop sam0 pinmux in favor of pinctrl 2022-03-24 15:45:37 -07:00
pm_cpu_ops drivers: pm_cpu_ops: build as static library 2021-08-17 06:06:03 -04:00
power_domain pm: device: move pm_device_runtime_init_* funcs 2022-03-25 10:39:55 +01:00
ps2 everywhere: fix typos 2022-03-14 20:22:24 -04:00
ptp_clock drivers: ptp_clock: build as static library 2021-08-17 06:06:03 -04:00
pwm drivers: pwm: litex: remove redundant config 'helper' 2022-04-07 09:35:05 +02:00
regulator drivers: regulator: pmic: remove unneeded NULL check 2022-01-28 10:06:21 +01:00
reset drivers: reset: added Reset Controller for Raspberry Pi Pico 2022-03-23 12:51:39 +01:00
sensor drivers: sensor: vl53l0x: add support to reprogram I2C address 2022-04-07 14:30:01 -05:00
serial drivers/serial: Extend Altera Jtag Uart driver support 2022-04-07 06:58:16 -04:00
spi drivers: spi: spi_mcux_flexcomm: add pinctrl support to lpc spi driver 2022-04-06 20:57:22 -07:00
syscon syscon: Compile the generic driver only when selected 2022-02-07 09:27:41 -05:00
timer ITE drivers/timer: clean up sys_clock_set_timeout() 2022-04-05 11:16:51 +02:00
usb drivers: usb: Add sam0 support to pinctrl 2022-03-24 15:45:37 -07:00
usbc everywhere: fix typos 2022-03-18 13:24:08 -04:00
video drivers: video: video_mcux_csi: enable pinctrl 2022-03-25 15:47:54 -05:00
virtualization everywhere: fix typos 2022-03-18 13:24:08 -04:00
watchdog soc: nrf: Use data from DTS to populate HAS_HW_NRF_* Kconfig options 2022-04-02 15:14:38 +02:00
wifi wifi: esp_at: reset the modem in device init 2022-03-29 12:32:43 -07:00
xen xenvm: arm64: add Xen Enlighten and event channel support 2021-12-07 12:15:38 -05:00
CMakeLists.txt drivers: added file structure for Reset Controller Driver 2022-03-23 12:51:39 +01:00
Kconfig drivers: added file structure for Reset Controller Driver 2022-03-23 12:51:39 +01:00