Commit graph zephyr/drivers/sensor/meas
Author SHA1 Message Date
Sudarshan Iyengar
e7ae602b5c drivers: sensor: ms5637: Add async sensor API support
Implement SENSOR_ASYNC_API for the MS5637 driver using RTIO
submission chains for non-blocking pressure/temperature reads.

- Add RTIO SQE chain helper (ms5637_prep_conv_chain) to
  reduce duplication between pressure and temperature paths
- Add sensor data decoder with q31 output format
- Refactor ms5637_compensate to accept calibration struct
  and output reading pointer, eliminating dependency on the
  full ms5637_data struct for use in decoder context
- Add Kconfig selections for I2C_RTIO and RTIO_OP_DELAY
  when SENSOR_ASYNC_API is enabled
- Fix CMakeLists.txt to use CONFIG_SENSOR_ASYNC_API

Signed-off-by: Sudarshan Iyengar <sudarshan.iyengar@alifsemi.com>
Assisted-by: Claude:claude-opus-4.7
2026-08-18 17:18:08 -04:00
William Markezana
1ca2d97d69 drivers: sensor: add TE Connectivity MS5637 sensor driver
Add a driver for the MS5637-02BA03 digital pressure & temperature
sensor from TE Connectivity (Measurement Specialties).

The driver implements the Zephyr sensor API with support for
SENSOR_CHAN_PRESS (kPa) and SENSOR_CHAN_AMBIENT_TEMP (degrees C).
Oversampling ratio (OSR) is configurable at build time via Kconfig
and at runtime via SENSOR_ATTR_OVERSAMPLING.

Includes full PROM CRC-4 validation per AN520 and second-order
temperature compensation per the MS5637 datasheet.

Signed-off-by: William Markezana <william.markezana@gmail.com>
2026-05-08 15:58:49 -05:00
William Markezana
d3274916ab drivers: sensor: add TE Connectivity HTU31D sensor driver
Add a driver for the HTU31D digital humidity and temperature sensor
from TE Connectivity (Measurement Specialties).

The driver implements the Zephyr sensor API with support for
SENSOR_CHAN_HUMIDITY (%) and SENSOR_CHAN_AMBIENT_TEMP (degrees C).
Measurement data is validated with CRC-8 per the datasheet.

Signed-off-by: William Markezana <william.markezana@gmail.com>
2026-05-07 09:13:40 +02:00
Maureen Helm
43d6f06f1e drivers: sensor: use LOG_ERR_DEVICE_NOT_READY macro
Unify all "device not ready" error messages across sensor drivers with
the LOG_ERR_DEVICE_NOT_READY macro, following the pattern established
for input drivers in commit 31b5866.

This improves consistency and makes device readiness errors easier to
grep across the codebase. Using the standardized macro ensures device
names are properly formatted with null-safety checks.

Image size impact (tests/drivers/build_all/sensor on native_sim,
building 211 sensor drivers):
- Before: 1,033 KB (text: 961 KB)
- After:  1,036 KB (text: 964 KB)
- Change: +2.5 KB (+0.25%), text: +2.5 KB

The small size increase is due to the macros adding null-safety checks
and dynamic device name formatting, which generates slightly more code
than some of the simpler static log strings used by drivers previously.

Assisted-by: Claude:claude-sonnet-4.5
Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2026-04-24 15:36:33 -04:00
Maureen Helm
7c2a9c1a22 drivers: sensor: change device readiness LOG_DBG to LOG_ERR
Several sensor drivers were logging device readiness failures as LOG_DBG
rather than LOG_ERR, making initialization failures harder to diagnose.
These readiness checks occur during device initialization and return error
codes, so they should be logged as errors rather than debug messages.

This change affects drivers that check for bus or GPIO device readiness
and ensures consistent error reporting across the sensor subsystem.

Assisted-by: Claude:claude-sonnet-4.5
Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2026-04-24 15:36:33 -04:00
Josuah Demangeon
1b87ec87ef style: drivers: apply coding style on CMakeLists.txt files
Apply the CMake style guidelines to CMakeList.txt files in drivers/.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-11-17 13:48:03 -05:00
Declan Snyder
570b445a61 drivers: Convert to use SPI macro without delay parameters
Convert all drivers and other consumers to use SPI macros without the
delay parameters.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-10-01 14:39:36 +03:00
Ivan Wagner
b5adb4457c drivers: sensor: meas: ms5837 supporting 02 and 30 variants via dt
This patch adds support via dt compatible property.

Signed-off-by: Ivan Wagner <ivan.wagner@tecinvent.ch>
2025-04-04 21:16:20 +02:00
Pieter De Gendt
a553af738d drivers: sensor: Place API into iterable section
Add wrapper DEVICE_API macro to all sensor_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:04:55 +00:00
Ethan Lu
9baf77dd39 sensor: ms5837: fix compensate parameters for 30BA variant
The previous parameters seems wrong if we refer to:
https://www.te.com/usa-en/product-CAT-BLPS0017.html

Signed-off-by: Ethan Lu <ethan@cpdesign.com.au>
2024-05-29 07:34:51 +02:00
Maureen Helm
d2dfb8e8d7 drivers: sensor: meas: Move to vendor subdirectory
Organizes sensor drivers by vendor to distribute maintainership
responsibilities.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-04-08 09:14:06 -04:00