Skip to content
Commit 8c2709e8 authored by Martí Bolívar's avatar Martí Bolívar Committed by Anas Nashif
Browse files

drivers: bme280: get dependencies straight from DT



Now that we have various convenience macros in drivers/spi.h and
device.h defined, we can resolve some longstanding TODO items in how
this driver gets a hold of the devices it depends on:

- get bus devices with DEVICE_DT_GET
- get SPI chip select information with SPI_CONFIG_DT_INST

The results are shorter on boilerplate, save RAM, and improve boot
time.

The same techniques could be reused by other device drivers.

These changes require that the SPI bus and GPIO (for device CS)
devices used to interface with the BME280 are defined in devicetree.

Signed-off-by: default avatarMartí Bolívar <marti.bolivar@nordicsemi.no>
parent 193b8872
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment