Fabio Baltieri
21900c4c33
drivers: sensor: max17055: fix TTE and TTF time units
...
The unit for SENSOR_CHAN_GAUGE_TIME_TO_EMPTY and
SENSOR_CHAN_GAUGE_TIME_TO_FULL are defined in
zephyr/drivers/sensor.h as being in minutes.
Change the max17055 implementation to match the API spec, fix the
annotation for time register units.
Link: https://datasheets.maximintegrated.com/en/ds/MAX17055.pdf
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-08-01 14:49:59 -05:00
Maximilian Deubel
d8e0dd1804
ADXL372: add names for KConfig choices
...
This patch adds names to the KConfig choices of the ADXL372 driver.
Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
2022-07-25 09:33:54 +00:00
Kumar Gala
f0441fba58
drivers: sensor: Update drivers to use devicetree Kconfig symbol
...
Update sensor drivers to use DT_HAS_<compat>_ENABLED Kconfig symbol
to expose the driver and enable it by default based on devicetree.
Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-22 02:20:18 -05:00
Pieter De Gendt
d01934f9e9
drivers: sensor: bq274xx: convert lazy load Kconfig option to dts property
...
This change allows per-instance configuration of lazy loading and
fixes build issue.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2022-07-20 08:39:45 -05:00
Kumar Gala
d77389464b
drivers: sensor: shell_battery: Convert to DEVICE_DT_GET
...
Move to using DEVICE_DT_GET so we can phase out DT_LABEL.
Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-19 08:45:13 -05:00
Benjamin Björnsson
6098e1894b
drivers: sensor: ms5607: Update driver to use spi_dt_spec
...
Simplify driver by using spi_dt_spec for bus access.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-19 12:28:29 +00:00
Benjamin Björnsson
e6f9ef4cc7
drivers: sensor: ms5607: Update driver to use i2c_dt_spec
...
Simplify driver by using i2c_dt_spec for bus access.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-19 12:28:29 +00:00
Tomislav Milkovic
0fe2c1fe90
everywhere: Fix legacy include paths
...
Any project with Kconfig option CONFIG_LEGACY_INCLUDE_PATH set to n
couldn't be built because some files were missing zephyr/ prefix in
includes
Re-run the migrate_includes.py script to fix all legacy include paths
Signed-off-by: Tomislav Milkovic <milkovic@byte-lab.com>
2022-07-18 16:16:47 +00:00
Benjamin Björnsson
0649679b98
drivers: sensor: bmp388: Rename spi variable
...
Rename variable for consistency across drivers.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-18 10:24:35 -05:00
Benjamin Björnsson
b6c8148e7e
drivers: sensor: bmp389: Update driver to use i2c_dt_spec
...
Simplify driver by using i2c_dt_spec for bus access.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-18 10:24:35 -05:00
Andrew McRae
008859a6ba
drivers: sensor: npcx_tach: Remove underflow LOG_INF
...
A LOG_DBG already exists for the underflow check,
and given that reading 0 edges is a valid case, remove
the noisy underflow log.
Signed-off-by: Andrew McRae <amcrae@google.com>
2022-07-18 09:11:04 -05:00
TOKITA Hiroshi
189c8a82d4
drivers: sensor: adxl345: Add support SPI connection
...
Support SPI connection for ADXL345.
It works as well as an I2C connection.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2022-07-18 10:37:14 +00:00
Benjamin Björnsson
704e366fcf
drivers: sensor: iis2mdc: Move bus union inside device config
...
Simplify driver by moving auxiliary bus union inside device config.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-15 15:35:54 +02:00
Benjamin Björnsson
bbff6eb592
drivers: sensor: iis2mdc: move driver to use i2c_dt_spec and spi_dt_spec
...
Simplify driver by using i2c_dt_spec and spi_dt_spec for bus access.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-15 15:35:54 +02:00
Benjamin Björnsson
2259c6771f
drivers: sensor: fxas21002: Add multi-instance support
...
Move driver to use DT_INST_FOREACH_STATUS_OKAY to add
multi-instance support.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-14 10:39:40 +02:00
Benjamin Björnsson
05a6c0fe68
drivers: sensor: stm32_temp: Add multi-instance support
...
Move driver to use DT_INST_FOREACH_STATUS_OKAY to add
multi-instance support.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-13 19:06:41 +02:00
Benjamin Björnsson
597be4d4f7
drivers: sensor: ak8975: Add multi-instance support
...
Move driver to use DT_INST_FOREACH_STATUS_OKAY to add
multi-instance support.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-13 15:53:26 +02:00
Benjamin Björnsson
9ed194a00b
drivers: sensor: ak8975: Update driver to use i2c_dt_spec
...
Simplify driver by using i2c_dt_spec for bus access.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-13 05:39:37 -05:00
Kumar Gala
1eeae77621
sensors: ak8975: remove passthrough support for MPU9150
...
Remove the support for enabling passthrough mode support for MPU9150
on the AK8975. We don't have a proper MPU9150 driver and the MPU9150
has been EOL. So its highly unlikely this code is being used.
Additonally we remove the device tree binding for the MPU9150 since
we don't have a proper driver for it.
Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-12 17:57:18 -05:00
Benjamin Björnsson
6c82570f62
drivers: sensor: ccs811: Add multi-instance support
...
Move driver to use DT_INST_FOREACH_STATUS_OKAY to add
multi-instance support.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-12 12:28:53 +02:00
Benjamin Björnsson
bf4b30e848
drivers: sensor: iis3dhhc: Add multi-instance support
...
Move driver to use DT_INST_FOREACH_STATUS_OKAY to add
multi-instance support.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-12 10:56:15 +02:00
Benjamin Björnsson
0364f3ae4d
drivers: sensor: ti_hdc: Add multi-instance support
...
Move driver to use DT_INST_FOREACH_STATUS_OKAY to add
multi-instance support.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-12 10:18:29 +02:00
Maximilian Deubel
3d2b04c9a8
ADXL362: add dynamic inact time setting
...
This patch extends the adxl362 driver by adding an option
to change the inactivity detection timeout at runtime.
Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
2022-07-11 18:19:45 +00:00
Kiril Petrov
44f651d315
drivers: nordic_nrf_temp: nrfx: Fix build warning into temp_nrf5_init
...
Building lwm2m_client with CONFIG_NET_L2_OPENTHREAD=y leads to
following warning during build:
west build -s samples/net/lwm2m_client -b nrf52840dk_nrf52840 -- \
-DCONFIG_NET_L2_OPENTHREAD=y
zephyr/drivers/sensor/nrf5/temp_nrf5.c:115:10:
warning: zero-length gnu_printf format string [-Wformat-zero-length]
115 | LOG_DBG("");
Signed-off-by: Kiril Petrov <retfie@gmail.com>
2022-07-11 17:57:12 +02:00
Benjamin Björnsson
78af3f39ec
drivers: sensor: ism330dhcx: Add multi-instance support
...
Move driver to use DT_INST_FOREACH_STATUS_OKAY to add
multi-instance support.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-08 10:57:18 +02:00
Benjamin Björnsson
e0cc66ab6f
drivers: sensor: amg88xx: Add multi-instance support
...
Move driver to use DT_INST_FOREACH_STATUS_OKAY to add
multi-instance support.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-07 09:21:34 -05:00
Yann Roth
c640392211
typo: fix LSM6DSL_SHIFT_MD2_CFG_INT2_WU
...
The register MD2_CFG contains INT2_WU and not INT1_WU
Signed-off-by: Yann Roth <yannroth@msn.com>
2022-07-07 10:16:35 +02:00
Benjamin Björnsson
092251017f
drivers: sensor: stts751: Add multi-instance support
...
Move driver to use DT_INST_FOREACH_STATUS_OKAY to add
multi-instance support.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-06 18:00:21 +00:00
Benjamin Björnsson
0ce4d8b2da
drivers: sensor: stm32_vbat: Add multi-instance support
...
Move driver to use DT_INST_FOREACH_STATUS_OKAY to add
multi-instance support.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-06 18:00:02 +00:00
Anas Nashif
49b36ead95
drivers: add mising braces to single line if statements
...
Following zephyr's style guideline, all if statements, including single
line statements shall have braces.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-06 11:00:45 -04:00
Benjamin Björnsson
1cd8a0fb34
drivers: sensor: lsm9ds0_gyro: Add multi-instance support
...
Move driver to use DT_INST_FOREACH_STATUS_OKAY to add
multi-instance support.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-06 09:49:32 -05:00
Benjamin Björnsson
ccf9292a52
drivers: sensor: iis2dh: Add multi-instance support
...
Move driver to use DT_INST_FOREACH_STATUS_OKAY to add
multi-instance support.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-06 09:11:06 -05:00
Benjamin Björnsson
6e62bd070f
drivers: sensor: bmg160: Add multi-instance support
...
Move driver to use DT_INST_FOREACH_STATUS_OKAY to add
multi-instance support.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-06 09:09:38 -05:00
Benjamin Björnsson
2cff424bea
drivers: sensor: tmp007: Add multi-instance support
...
Move driver to use DT_INST_FOREACH_STATUS_OKAY to add
multi-instance support.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-06 09:07:33 -05:00
Aurelien Jarno
869c60e208
drivers: sensor: stm32_vbat: get vref-mv through the ADC API
...
Get the vref-mv through the ADC API instead of the device tree. This
saves 8 bytes of SRAM and will be future proof in case, one day, support
for a variable vref is added.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2022-07-06 11:10:42 +02:00
Benjamin Björnsson
251755e21d
drivers: sensor: iis2dh: Update driver to use gpio_dt_spec
...
Move driver to use gpio_dt_spec for GPIO interrupt handling.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-06 10:43:10 +02:00
Benjamin Björnsson
5c9f5a12f4
drivers: sensor: iis2dh: Update driver to use spi_dt_spec and i2c_dt_spec
...
Move driver to use spi_dt_spec and i2c_dt_spec for SPI and I2C bus
access, respectively.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-06 10:43:10 +02:00
Benjamin Björnsson
619c0ee17b
drivers: sensor: iis2dh: Change parameter list of helper functions
...
Change parameter list of functions for consistency with other drivers.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-06 10:43:10 +02:00
Thomas Stranger
3d70711c04
drivers: sensor: add support for ds18b20 1-wire temperatue sensor
...
This commit adds support for the ds18b20 1-wire temperature sensor.
The sampling resolution of the sensor can be set in DT.
In case only a single device is on the bus, the driver issues
skip_rom commands. However, in case DT defines several devices,
the driver will use match_rom commands and therefore it is necessary
to set the rom_id of the device via the sensor attribute interface before
being able to sample sensor values.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-07-05 23:06:45 +02:00
Benjamin Björnsson
c2861ffda2
drivers: sensor: th02: Add multi-instance support
...
Move driver to use DT_INST_FOREACH_STATUS_OKAY to add
multi-instance support.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-05 15:41:10 +00:00
Benjamin Björnsson
f5b9635e31
drivers: sensor: adxl345: Add multi-instance support
...
Move driver to use DT_INST_FOREACH_STATUS_OKAY to add
multi-instance support.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-05 15:39:33 +00:00
Benjamin Björnsson
1d0e5e17d3
drivers: sensor: ams_iAQcode: Add multi-instance support
...
Move driver to use DT_INST_FOREACH_STATUS_OKAY to add
multi-instance support.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-05 15:39:15 +00:00
Benjamin Björnsson
803fdf6a46
drivers: sensor: vcnl4040: Add multi-instance support
...
Move driver to use DT_INST_FOREACH_STATUS_OKAY to add
multi-instance support.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-05 09:14:50 -05:00
Benjamin Björnsson
b4dffbfb40
drivers: sensor: mcp9808: Add multi-instance support
...
Move driver to use DT_INST_FOREACH_STATUS_OKAY to add
multi-instance support.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-05 09:10:06 -05:00
Benjamin Björnsson
b2b7665b9c
drivers: sensor: mpu6050: Add multi-instance support
...
Move driver to use DT_INST_FOREACH_STATUS_OKAY to add
multi-instance support.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-05 09:08:43 -05:00
Benjamin Björnsson
1409a8f86b
drivers: sensor: lis3mdl: Add multi-instance support
...
Move driver to use DT_INST_FOREACH_STATUS_OKAY to add
multi-instance support.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-05 09:06:13 -05:00
Benjamin Björnsson
131aedc769
drivers: sensor: isl29035: Add multi-instance support
...
Move driver to use DT_INST_FOREACH_STATUS_OKAY to add
multi-instance support.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-05 09:02:05 -05:00
Benjamin Björnsson
0ab5e7964c
drivers: sensor: bmc150_magn: Add multi-instance support
...
Move driver to use DT_INST_FOREACH_STATUS_OKAY to add
multi-instance support.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-05 08:59:13 -05:00
Benjamin Björnsson
3f42a6a75f
drivers: sensor: hmc5883l: Add multi-instance support
...
Move driver to use DT_INST_FOREACH_STATUS_OKAY to add
multi-instance support.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-05 08:57:59 -05:00
Benjamin Björnsson
ff7aa22217
drivers: sensor: adt7420: Add multi-instance support
...
Move driver to use DT_INST_FOREACH_STATUS_OKAY to add
multi-instance support.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-05 08:53:08 -05:00