Commit graph

2,829 commits

Author SHA1 Message Date
Maksim Salau
cce752f808 sensor: Add more device checks to shell-battery
The battery alias is verified to be a sensor device before use.
Also the commit fixes incorrect use of `argv[1]` instead of `dev->name`.

Signed-off-by: Maksim Salau <maksim.salau@gmail.com>
2026-05-23 17:14:36 -07:00
Aaron Kim
0d4f781476 drivers: sensor: tad2144: Add tad2144 support
Use official TDK Invensense driver for tad2144 sensor in tdk_hal module.

Signed-off-by: Aaron Kim <aaron.kim@tdk.com>
2026-05-22 21:55:54 +02:00
Nick Ward
74ff7d3913 drivers: sensor: use shell_print for command output
shell_info is intended for informational side-notes, not for printing
command result data. Use shell_print instead, consistent with other
Zephyr driver shell implementations (rtc_shell, gpio_shell, i2c_shell,
eeprom_shell).

Signed-off-by: Nick Ward <nix.ward@gmail.com>
Assisted-by: Claude:claude-sonnet-4-6
2026-05-21 17:04:13 -04:00
Ryan McClelland
78dfbf1833 drivers: sensor: bmp581: make INT pin polarity and drive type configurable
The streaming code previously hard-coded the INT pin as active-high
push-pull when writing INT_CONFIG. Add two boolean DT properties,
int-active-low and int-open-drain, and thread them through
bmp581_config so boards with active-low or open-drain INT wiring can
be supported without patching the driver.

Defaults preserve the previous hard-coded behavior (active-high,
push-pull) so existing in-tree boards do not need DT changes. Boards
with active-low INT wiring set int-active-low, which programs
BMP5_INT_POL_ACTIVE_LOW into INT_CONFIG. Note that the GPIO flags on
int-gpios must agree with the chip-side polarity setting.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2026-05-19 17:49:34 -04:00
Ryan McClelland
c68a25e4d5 drivers: sensor: bmp581: add PM device action support
Add a CONFIG_PM_DEVICE action handler that maps PM_DEVICE_ACTION_RESUME
to the devicetree-configured power-mode (NORMAL/FORCED/CONTINUOUS) and
PM_DEVICE_ACTION_SUSPEND to STANDBY, reusing set_power_mode() so the
mandatory STANDBY transition before entering an active mode (datasheet
section 4.3.7) is preserved. PM_DEVICE_DT_INST_DEFINE is wired into the
SENSOR_DEVICE_DT_INST_DEFINE call so the handler is registered for each
instance.

Add a bmp581_pm_busy_check() helper that returns -EBUSY when the device
is not PM_DEVICE_STATE_ACTIVE. The check is applied only to the
streaming branch of bmp581_submit(), because DRDY/FIFO interrupts only
fire while the device is in NORMAL or CONTINUOUS mode and a streaming
submission against a suspended device would otherwise wait forever for
an interrupt that cannot arrive.

Per datasheet section 4.3.1, STANDBY keeps all registers accessible for
read and write and preserves the last sample in the data registers, so
sample_fetch, channel_get, attr_set and the one-shot submit path are
deliberately left ungated. In particular IIR/FIFO/NVM writes (section
4.3.8) require STANDBY, and BMP5_ATTR_POWER_MODE is the mechanism used
to leave STANDBY, both of which would deadlock if attr_set were gated.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2026-05-19 17:49:34 -04:00
Ryan McClelland
3106896eab drivers: sensor: bmp581: add SPI and I3C bus support
The BMP581 driver previously only supported I2C. Add SPI and I3C
transports by extending the existing RTIO-based bus abstraction with
two new bus types (BMP581_BUS_TYPE_SPI, BMP581_BUS_TYPE_I3C),
following the pattern established by the icm45686 driver.

For SPI, the read register address is OR'd with bit 7 (BMP5_SPI_RD_MASK)
per the datasheet, and bmp581_init() performs the SPI activation dummy
read both before and after soft-reset (the device boots and reverts to
I2C/I3C mode on reset and requires a 16-SCK transaction with CSB
asserted to switch to SPI). For I3C, RTIO_IODEV_I3C_STOP/RESTART flags
are set on the read/write SQEs.

The BMP581_INIT macro now uses COND_CODE_1 to dispatch on the bus type
and instantiate the appropriate I2C/SPI/I3C iodev. Kconfig selects
I2C/SPI/I3C and the corresponding *_RTIO option conditionally based
on which buses the matching DT nodes use.

The original bosch,bmp581.yaml is split into a common binding plus
per-bus bindings (bosch,bmp581-i2c.yaml, bosch,bmp581-spi.yaml,
bosch,bmp581-i3c.yaml) that include the bus-specific yaml. Test nodes
for SPI and I3C are added to the build_all sensor test.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2026-05-19 17:49:34 -04:00
Fin Maaß
4d859419d9 drivers: serial: don't check return value of uart_irq_update()
Remove return value checks of uart_irq_update().
Needed for changing it's return value to void.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-05-19 17:46:51 -04:00
Jeppe Odgaard
d7a4c10df3 drivers: sensor: ti: tmp11x: do not set sample to 0 in fetch
The value is a valid temperature value and cannot be used in get to check
if fetch failed.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2026-05-19 11:57:08 +01:00
Nick Ward
b366673163 drivers: sensor: shell: return error when trigger device not in array
In the 'off' path, sensor_trigger_set clears the hardware trigger
then find_sensor_trigger_device removes the bookkeeping entry. If the
device was not in sensor_trigger_devices[] (inconsistent state),
shell_error was printed but err remained 0 and the function returned
success. Return -ENOENT so the caller sees the failure.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
Assisted-by: Claude:claude-sonnet-4-6
2026-05-19 09:39:50 +02:00
Nick Ward
b712f8ad38 drivers: sensor: shell: use goto for cmd_get_sensor mutex cleanup
Replace four scattered k_mutex_unlock/return pairs with a single
goto unlock label. Each error path sets err and jumps to the label;
the lock and unlock are paired at the top and bottom of the function.
Adding a new error path now only requires goto unlock rather than a
manually-added unlock call.

The goto on sensor_read_async_mempool failure also prevents a thread
deadlock. sensor_processing_with_callback calls rtio_cqe_consume_block
which blocks with K_FOREVER waiting for a CQE. If the mempool call
fails (e.g. -ENOMEM from SQE pool exhaustion) no SQE is submitted and
no CQE ever arrives. Without the goto, the shell thread spins inside
sensor_processing_with_callback while holding cmd_get_mutex, causing
all subsequent 'sensor get' calls to fail with -EBUSY permanently.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
Assisted-by: Claude:claude-sonnet-4-6
2026-05-19 09:39:50 +02:00
Nick Ward
133f9968a0 drivers: sensor: shell: propagate sensor_read_async_mempool failure
cmd_get_sensor discarded the error from sensor_read_async_mempool and
always returned 0. Return err so callers can detect a failed read.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
Assisted-by: Claude:claude-sonnet-4-6
2026-05-19 09:39:50 +02:00
Nick Ward
15d36d87b6 drivers: sensor: shell: remove spurious k_mutex_unlock in attr commands
cmd_sensor_attr_set and cmd_sensor_attr_get never acquire cmd_get_mutex.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
Assisted-by: Claude:claude-sonnet-4-6
2026-05-19 09:39:50 +02:00
Maureen Helm
98c20941e7 drivers: sensor: adltc2990: Add support for fetching SENSOR_CHAN_ALL
Refactors the adltc2990 sensor driver to extract sample fetching into
static functions, and uses the new functions to support fetching
individual channels or all channels at once.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2026-05-17 10:41:50 +02:00
Md Shofiqul Islam
5178d0acc9 drivers: sensor: max30101: add MAX30102 support
The MAX30102 is register-compatible with the MAX30101 but has only
Red and IR LED channels (no Green LED). Re-use the existing MAX30101
driver by switching DT_DRV_COMPAT to maxim_max30102 and guarding
Green LED operations with an is_max30102 flag in the config struct.

A shared MAX3010X_INIT macro with a chip argument avoids duplicating
the device instantiation code between the two variants.

Signed-off-by: Md Shofiqul Islam <shofiqtest@gmail.com>
2026-05-17 10:41:33 +02:00
Daniel Lindestad
84a7dc4df1 drivers: sensor: fdc2x1x: fix optional sd gpio checks
The sd-gpios property is optional, and GPIO_DT_SPEC_INST_GET_OR()
leaves sd_gpio.port NULL when it is absent.

The driver checked sd_gpio.port->name in the init and PM turn-off
paths, which dereferenced the missing GPIO spec before it could skip
shutdown pin setup. Check the port pointer directly instead.

Assisted-by: Codex CLI:GPT-5.5 High Reasoning
Signed-off-by: Daniel Lindestad <lindestad@proton.me>
2026-05-13 05:12:20 +02:00
Tim Pambor
8486bb8d0f drivers: sensor: stm32_vbat: Extend Vbat sensor driver to handle Vddcore
Measurement of the internal Vddcore voltage differs only slightly from
the Vbat measurement. The main difference is that the Vddcore channel
is enabled differently in the ADC peripheral.

To avoid code duplication, the existing Vbat sensor driver is extended
to also handle the Vddcore measurement.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2026-05-12 22:26:09 +02:00
Davide Di Lello
82741b2614 drivers: infineon: Update copyright for Infineon
Update structure of the copyright

Signed-off-by: Davide Di Lello <Davide.Dilello@Infineon.com>
2026-05-12 22:19:02 +02:00
Srinivas Edireswarapu
d1ebbfcc30 drivers: sensor: tach: xec: refactor for encoded DT properties and MEC175x
Refactor the Microchip XEC tachometer driver to use DTS-encoded
GIRQ and PCR properties instead of series-specific ifdefs,
enabling a unified driver across MEC150x, MEC172x, and MEC175x.

Fix build error from incorrect PCR devicetree configuration.
Remove duplicate include and add missing static qualifier to
tach_xec_sample_fetch().

Co-authored-by: Andy Chang <andy.chang@microchip.com>
Signed-off-by: Andy Chang <andy.chang@microchip.com>
Signed-off-by: Srinivas Edireswarapu <srinivas.edireswarapu@microchip.com>
2026-05-11 21:03:12 -05: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
Zhaoxiang Jin
9bf8689eb7 drivers: nxp_pmc_tmpsns: get calibration data using NVMEM
Read the temperature sensor calibration value through the
NVMEM API instead of the legacy ROM OTP API. The calibration
data is exposed by the OCOTP node as an NVMEM cell, so the
driver no longer depends on fsl_romapi_otp.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-05-07 18:04:59 -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
Terry Geng
27023e0b5d drivers: sensor: hx711_spi: Fix bit sampling bug
As pointed out in #106786, when disentangling the bitstream from the chip,
for every 8 bits, instead of sampling bit 1, 3, 5, and 7, bit 0, 3, 5, and
7 are erroneously sampled. The behavior of sampling bit 0 is undefined in
the datasheet, and causes data corruption in some cases.

This fix has been tested on actual hardware and no regression is observed.

Fixes #106786

Signed-off-by: Terry Geng <terry@terriex.com>
2026-05-06 07:08:14 +02:00
Matej Neumann
9a8f11fc27 drivers: sensor: fdc1004: add fdc1004 driver
Add driver for the TI FDC1004 capacitance-to-digital converter.

Signed-off-by: Matej Neumann <email@neumma.com>
2026-05-01 11:17:46 -05:00
Henrik Lindblom
a9061573b0 drivers: sensor: clock: fix overflow when converting cycles to ns
The straightforward way to convert cycles to nanoseconds with

  x * y / z

will easily overflow the multiplication in the numerator. Rewriting the
operation as

  y * (x / z + (x % z) / z)

or NSEC_PER_SEC * (quot + (rem / cycles_per_sec)) improves the situation
and allows useful sensor timestamps for a bit longer before overflows are a
concern.

The API in sys/time_units.h handles exactly this type of numerical
manipulation for time units which might overflow. The predefined macros
only handle conversions between the various Z_HZ_* macros so a wrapper for
z_tmcvt_64 is required for the external clock case.

Signed-off-by: Henrik Lindblom <henrik.lindblom@vaisala.com>
2026-05-01 12:40:51 +01:00
Mathieu Choplain
9e78d17742 drivers: *: stm32: use CONFIG_HAS_STM32_UNCACHED_ACCESS_ONLY_OTP
Instead of performing series check, use the new common Kconfig option
CONFIG_HAS_STM32_UNCACHED_ACCESS_ONLY_OTP in drivers which access the
internal NVM's OTP/read-only area.

While at it, use the public `sys_cache_xxx()` API in flash_stm32 instead
of the internal `cache_xxx()` API.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-04-30 14:02:59 -04:00
Bartlomiej Fijal
7a1e78e0b3 drivers: sensor: nxp_pmc_tmpsns: fix invalid member access in init
config->adc is of type 'const struct device *', assigned via
DEVICE_DT_GET(). It has no '.dev' member — that field exists only
in 'struct adc_dt_spec'.

The LOG_ERR_DEVICE_NOT_READY() call in lpadc_temp40_init() was
using config->adc.dev, causing a compile error on all platforms
that select NXP_PMC_TMPSNS:

  error: 'config->adc' is a pointer; did you mean to use '->'?

Remove the spurious '.dev' dereference. LOG_ERR_DEVICE_NOT_READY()
accepts 'const struct device *' directly, so passing config->adc
is correct and consistent with the device_is_ready() call on the
line above.

Signed-off-by: Bartlomiej Fijal <StaryAnoda@Gmail.com>
2026-04-29 16:33:03 -04:00
Bartlomiej Fijal
a0dbdc2073 drivers: sensor: nxp_lpadc_temp40: fix invalid member access in init
config->adc is of type 'const struct device *', assigned via
DEVICE_DT_GET(). It has no '.dev' member — that field exists only
in 'struct adc_dt_spec'.

The LOG_ERR_DEVICE_NOT_READY() call in lpadc_temp40_init() was
using config->adc.dev, causing a compile error on all platforms
that select NXP_LPADC_TEMP40:

  error: 'config->adc' is a pointer; did you mean to use '->'?

Remove the spurious '.dev' dereference. LOG_ERR_DEVICE_NOT_READY()
accepts 'const struct device *' directly, so passing config->adc
is correct and consistent with the device_is_ready() call on the
line above.

Signed-off-by: Bartlomiej Fijal <StaryAnoda@Gmail.com>
2026-04-29 16:32:52 -04:00
William Markezana
fc58a57869 drivers: sensor: bflb: add TSEN die temperature sensor
Add a die temperature sensor driver for Bouffalo Lab SoCs using
the internal TSEN peripheral integrated into the GPADC.

The driver uses the ADC subsystem for hardware initialization and
raw sample acquisition via adc_bflb_tsen_read_phase(). Temperature
is computed from two ADC measurement phases (TSVBE_LOW toggle)
using the formula: temp = (|v0 - v1| - tsen_offset) / 7.753

The TSEN calibration offset is read from efuse when available,
falling back to the default value of 2042.

Includes:
- Sensor driver at drivers/sensor/bflb/bflb_tsen/
- DT binding for compatible "bflb,tsen"
- TSEN nodes (disabled) in bl60x, bl61x, bl70x, bl70xl dtsi files

Tested on BL602, BL616, BL706, and BL704L hardware.

Signed-off-by: William Markezana <william.markezana@gmail.com>
2026-04-29 16:31:08 -04:00
Yuzhuo Liu
a3138ce417 drivers: sensor: add Realtek Bee series QDEC driver
Add QDEC driver support for Realtek Bee series SoCs,
including RTL87x2G (AON QDEC) and RTL8752H (Basic QDEC).

This driver supports:
- X, Y, and Z axis count reading
- Hardware interrupt-based event trigger

Signed-off-by: Yuzhuo Liu <yuzhuo_liu@realsil.com.cn>
2026-04-29 16:29:07 -04:00
Alberto Escolar Piedras
4ab570427c sensor: pac194x: Fix multiple build warnings with clang
Fix multiple minor issues which trigger build warnings with clang,
including:
* label followed by a declaration is a C23 extension
* duplicate 'const' declaration specifier (DEVICE_API already has const)

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2026-04-28 11:18:04 +02:00
Wojciech Macek
2613230e73 sensor: pac194x: add driver for Microchip PAC194x power monitors
Add a comprehensive driver for the Microchip PAC194x/195x family of
multi-channel power monitors. This driver supports VBUS, VSENSE,
and power accumulation measurements.

Key features and implementation details:
- Support for PAC1941/42/43/44 (9V FSR) and PAC1951/52/53/54 (32V FSR).
- Efficient I2C handling: uses per-channel burst reads to optimize
  bus bandwidth based on enabled channels.
- Flexible Refresh Modes: introduced SENSOR_ATTR_REFRESH_MODE to
  allow users to choose between AUTO_WAIT (synchronous),
  AUTO_NOWAIT (asynchronous/latched), and MANUAL modes.
- Broadcast Support: added a force refresh command using I2C
  General Call (0x00) to synchronize snapshots across multiple
  sensors (up to 16 instances) simultaneously.
- Configurable range: support for Unipolar, Bipolar, and Bipolar
  Half FSR modes via Devicetree.

Tested on RISC-V (ESP32-C3) with 16 PAC1944 instances.

Signed-off-by: Wojciech Macek <wmacek@google.com>
2026-04-28 00:25:55 +01:00
Fabio Baltieri
dbcba4794a sensors: ite_vcmp: fix build error
Fix build error:

error: '((const struct vcmp_it8xxx2_config *)config)->adc' is a pointer

Tested with: west build -p -b it8xxx2_evb samples/sensor/sensor_shell
-DCONFIG_ADC=y -DCONFIG_COMPARATOR=y -DCONFIG_LOG=y

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2026-04-27 19:02:37 +01: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
Camille BAUD
0b3c77eef3 drivers: sensor: Add Sensylink CHT8315
Add a temperature and humidty sensor with advanced trigger functions

Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-04-24 19:02:52 +02:00
Henrik Brix Andersen
09f4511297 drivers: sensor: st: lsm6dsv80x: fix lsm6dsv80x_gy_setup() call params
Use the correct parameters for setting the ODR to "off" when calling
lsm6dsv80x_gy_setup().

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2026-04-24 19:02:15 +02:00
Henrik Brix Andersen
4fc2b02601 drivers: sensor: st: lsm6dsv320x: fix lsm6dsv320x_gy_setup() call params
Use the correct parameters for setting the ODR to "off" when calling
lsm6dsv320x_gy_setup().

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2026-04-24 19:02:15 +02:00
Armando Visconti
896e8819af modules/hal_st: Align to stmemsc HAL i/f v2.13.2
Align all sensor drivers that are using stmemsc (STdC) HAL i/f
to new APIs of stmemsc v2.13.2

Requires https://github.com/zephyrproject-rtos/hal_st/pull/35

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2026-04-24 13:02:14 +02:00
Antoniu Miclaus
e1af90d636 drivers: sensor: adxl362: fix LINKLOOP mode not being applied
In adxl362_set_interrupt_mode(), the LINKLOOP field is first cleared
from the register value, but then the original uncleared register
value is OR'd back in on the next line, restoring the old LINKLOOP
bits. This makes it impossible to change the interrupt mode from its
current value.

Remove the erroneous OR of old_act_inact_reg so the cleared field is
properly set to the new mode value.

Fixes: 11295c190b ("drivers: sensor: Add ADXL362 interrupt handling")
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
2026-04-24 10:57:16 +02:00
Armando Visconti
51674f69ae drivers/sensor: lsm6dsvxxx: add gyro support
Add support to gyro channels for polling read.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2026-04-23 13:11:53 -04:00
Steven Chang
fe73ef6831 drivers: sensor: kb106x: tachometer driver
- Add tachometer sensor driver for ENE KB106X.

Signed-off-by: Steven Chang <steven@ene.com.tw>
2026-04-23 13:10:36 -04:00
Antoniu Miclaus
e0f7d6ee6b drivers: sensor: adt7420: fix inverted resolution values in get
The get_resolution function returns 13 when the resolution bit is set
and 16 when it is clear. Per the ADT7420 datasheet, bit 7 of the
config register set to 1 means 16-bit resolution and 0 means 13-bit.
This is also confirmed by the driver's own set_resolution and init
code which sets the bit when 16-bit mode is desired.

Swap the return values so that 16 is returned when the resolution bit
is set and 13 when it is clear.

Fixes: d07b8a20f6 ("sensor: adt7420: Extend ADT7420 Driver Support")
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
2026-04-23 08:17:04 -04:00
Jakub Zymelka
c95d86d6bc drivers: sensor: seeed: grove: Fix SAADC pin configuration
SAADC pin configuration need to be fixed after changes in NRFX driver

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2026-04-22 17:14:29 +02:00
Alberto Escolar Piedras
2f3474c9cb Revert "modules/hal_st: Align to stmemsc HAL i/f v2.13.1"
This reverts commit 1643904ac4.

This change introduced a regression: A build warning when building
with clang, which is visible in the clang workflow in main
causing it to fail. The issue is in the HAL itself and the fix
is not evident.

Let's revert this commit until the issue is fixed in the HAL.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2026-04-22 08:06:34 -05:00
Szymon Antkowiak
7b54696ef8 drivers: sensor: bmi270: align initialization with spec
Soft reset is largely equivalent to power cycle. Add dummy read of chip ID
after soft reset in BMI270 initialization function. Dummy read is
performed via bus initialization.

Signed-off-by: Szymon Antkowiak <szymon.antkowiak@nordicsemi.no>
2026-04-22 12:54:53 +02:00
Armando Visconti
43af622bc5 drivers/sensor: lsm6dsvxxx: fix conditional compilation
Add CONFIG_LSM6DSVXXX_ENABLE_TEMP directive in few places where it was
missing.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2026-04-21 18:39:46 -04:00
Armando Visconti
4cc4f244ec drivers/sensor: lsm6dsvxxx: change data_out for single axis
When a request is performed on a single accelerometer axis
(e.g. SENSOR_CHAN_ACCEL_X) the driver must return a single
scalar q31 data.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2026-04-21 18:39:46 -04:00
Armando Visconti
44b7a95c19 drivers/sensor: lsm6dsvxxx: increase cqe/sqe queue size
In a IMU there might be multiple concurrent asynchronous requests
active at the same time. Increase the size of the RTIO queues.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2026-04-21 18:39:46 -04:00
Nancy Sangani
827c2323f8 drivers: sensor: stmemsc: add gyro ODR-triggered mode support
Expose mode 3 (ODR-triggered) in gyro_set_mode and gyro_get_mode for
lsm6dsv320x, lsm6dsv80x, and ism6hg256x so gyro mode matches accel mode
as required by datasheet section 6.1.5.

Fixes #106389

Signed-off-by: Nancy Sangani <9d.24.nancy.sangani@gmail.com>
2026-04-21 17:46:12 +01:00
Guillaume Gautier
f09d68463b drivers: otp: stm32: disable instruction cache also for stm32c5
To access the OTP area on STM32C5, the instruction cache needs to be
disabled to prevent a bus fault.
Do it for the OTP driver, as well as the temperature and Vref sensor.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-04-21 10:17:47 +01:00