Commit graph zephyr/drivers/sensor
Author SHA1 Message Date
Benjamin Cabé
fd1d5a5086 drivers: sensor: wsen_isds_2536030320001: fix temp fetch when odr is 0
SENSOR_CHAN_AMBIENT_TEMP shared a case block with SENSOR_CHAN_ALL that
required both the accelerometer and the gyroscope to be enabled, so
fetching the die temperature returned -ENOTSUP whenever either ODR was
set to the power-down entry. Give the temperature channel its own case
that derives the poll step from whichever engine is enabled.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-08-21 14:24:51 +02:00
Benjamin Cabé
769a16c7c3 drivers: sensor: wsen_isds_2536030320001: fix gyro full scale unit
The SENSOR_ATTR_FULL_SCALE getter for SENSOR_CHAN_GYRO_XYZ returned the
raw dps value from the full scale list, while the setter converts its
input with sensor_rad_to_degrees(), so a get-then-set round trip failed
with -EINVAL. Convert the reported range to rad/s to match the setter.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-08-21 14:24:51 +02:00
Benjamin Cabé
dfcf69d90c drivers: sensor: wsen_isds_2536030320001: fix accel full-scale unit
The SENSOR_ATTR_FULL_SCALE getter for the accelerometer returned the
raw range from the full scale list, which is expressed in g, while the
setter expects m/s^2 as mandated by the sensor API. Convert the value
with sensor_g_to_ms2() so the getter is the exact inverse of the
setter.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-08-21 14:24:51 +02:00
Benjamin Cabé
b3e28bcee4 drivers: sensor: ccs811: report I2C errors from baseline fetch
ccs811_baseline_fetch() tested the i2c_write_read_dt() result with
"rc <= 0", which is also true on failure, so a failed transfer returned
the uninitialised stack value of baseline instead of the negative errno
the API documents. Test for success with "rc == 0".

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-08-20 08:07:28 -07:00
Benjamin Cabé
d4837e7c62 drivers: sensor: adt7420: don't disable the other trigger's interrupt
adt7420_trigger_set() unconditionally disabled both the INT and CT GPIO
interrupts but only re-enabled the line matching trig->chan, silently
killing a previously registered trigger on the other pin. Each disable
now happens in its own branch, guarded by that pin's presence, and the
trigger type is validated before any GPIO is touched.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-08-20 14:14:43 +02:00
Benjamin Cabé
ead4d3c479 drivers: sensor: max30009: reject PLL-off attr writes while events armed
Attributes flagged MAX30009_ATTR_PLL_OFF cycle the PLL, and the
re-enable path polls the clear-on-read STATUS1 register. Running that
poll while streaming or triggers are active eats pending A_FULL /
FIFO_DATA_RDY events (permanently stalling an assert-once FIFO
watermark stream) or lets those readers consume the lock bits, causing
spurious -ETIMEDOUT. Return -EBUSY instead when a stream request is
pending or a trigger handler is registered.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-08-20 10:51:23 +02:00
Benjamin Cabé
12ffad5586 drivers: sensor: max30009: track runtime ADC OSR for sample period
The streamed FIFO sample period was computed from the const devicetree
ADC OSR code, so runtime SENSOR_ATTR_MAX30009_ADC_OSR changes were
ignored and decoded per-sample timestamps were wrong. Cache the OSR
code in driver data, update it on attribute writes, and use it when
computing the sample period.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-08-20 10:51:23 +02:00
Benjamin Cabé
2abd8f6782 drivers: sensor: max30009: fix NULL deref in flush_rtio error path
max30009_flush_rtio is only called after the streaming request was
already completed with rtio_iodev_sqe_ok and data->sqe was set to
NULL, so calling rtio_iodev_sqe_err(data->sqe, -ENOMEM) on SQE
acquire failure dereferenced NULL. Drop any partially acquired SQE
with rtio_sqe_drop_all instead, matching the other error paths.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-08-20 10:51:23 +02:00
Benjamin Cabé
ba8f1abb55 drivers: sensor: max30009: fix decoder writing array of q31_data structs
The decoder wrote a full struct sensor_q31_data per decoded FIFO
sample, striding ~32 bytes per frame, while get_size_info advertises
frame_size = sizeof(struct sensor_q31_sample_data) (8 bytes),
overflowing contract-sized buffers when max_count > 1. Fill a single
header/shift once and append samples to out->readings[] with proper
timestamp deltas, matching the sibling FIFO decoders.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-08-20 10:51:23 +02:00
Corey Wharton
d8e2fccbb9 drivers: sensor: ti: tmp114: add PM support
Add device power management so the sensor can sit under a power domain
that may be unpowered at init. Bring-up moves to a PM_DEVICE_ACTION_TURN_ON
handler, and RESUME/SUSPEND toggle the config register shutdown bit.

Signed-off-by: Corey Wharton <xodus7@cwharton.com>
2026-08-19 17:08:04 +01:00
Jose Morales
c93a8e0685 drivers: sensor: akm09918c: condition fetch delay
The akm09918c driver imposes and unconditional wait time on fetch. This
is only neccesary for single-shot sampling. If the sensor is configured in
continuous mode, an application can time the fetch to align with the sensor
ODR. For continous mode operation it does not make sense to have an
artificial delay added - if the application is trying to fetch values at a
higher frequency than the ODR it can just handle the -EBUSY by adding
its own delay and retrying the fetch or reading the old values.
Verified this change testing parallel sampling with an LSM6DSO IMU,
Fetching all channels on DRDY of the IMU with the same ODR configured
for both IMU and magnetometer.

Signed-off-by: Jose Morales <josfemova@gmail.com>
2026-08-19 17:07:30 +01:00
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
Jordan Yates
00104f8426 sensor: wsen: add missing dependencies
Add missing dependencies on the HAL module for sensors that use the HAL
headers. This fixes compile time errors for `build_all` tests downstream
that don't have the HAL checked out.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-08-14 16:12:50 -04:00
Jordan Yates
48da99b4a1 sensor: tdk: add missing dependencies
Add missing dependencies on the HAL module for sensors that use the HAL
headers. This fixes compile time errors for `build_all` tests downstream
that don't have the HAL checked out.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-08-14 16:12:50 -04:00
Ryan McClelland
98d82d55b7 drivers: sensor: adxl362: fix base_timestamp_ns to first sample time
Adjust base_timestamp_ns backward from the trigger timestamp by
(N-1)*period so it reflects the time of the first FIFO sample,
matching the lsm6dsv16x reference implementation.

Fixes: #98720
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
(cherry picked from commit 2e9f16f337e5ae2748257871328d2bc29f442bd5)
2026-08-14 10:33:46 +01:00
Ryan McClelland
a37df2f685 drivers: sensor: icm45686: use per-packet hardware timestamps
Enable FIFO_TMST_FSYNC_EN in FIFO_CONFIG4 so the sensor inserts a
16-bit hardware timestamp into every 20-byte FIFO packet. Set
TMST_RESOL=1 (16us/tick) to support batch spans up to ~524ms.

In the decoder, anchor the batch to the host IRQ time via the last
packet's hardware timestamp, then compute base_timestamp_ns and
per-sample timestamp_delta using the signed 16-bit delta between
packet timestamps. This handles wraparound naturally and gives exact
inter-sample timing without assuming a uniform ODR.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2026-08-13 16:19:11 -07:00
Fabrice DJIATSA
8b667381d3 drivers: sensor: ti: tmp1075: enable GPIO when gpio property is set
The thermometer sample uses sensor hardware that depends on a GPIO
device, but GPIO is not enabled in the board-specific sample
configuration for nucleo_h7a3zi_q.

Automatically enable CONFIG_GPIO when ti,tmp1075 is enabled with
alert-gpios property set,to ensure the required GPIO device is
instantiated and allow the sample to build successfully.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2026-08-13 13:13:11 -04:00
Benjamin Cabé
bd42c9e5fd drivers: sensor: bmm150: Fix build of REP_XY/REP_Z attribute support
Code guarded by BMM150_SET_ATTR_REP used the nonexistent
dev->driver->data and the undefined bmm150_magn_data type. Use
dev->data and struct bmm150_data.

Drop unused config variable as well.

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-08-13 13:10:29 -04:00
Alban Chauvel
6fdddaca33 drivers: sensor: max30101: check the slot sequence in Multi-LED mode
In Multi-LED mode, nothing prevents adding zeros between numbers in
the slot sequence. This is not recommended by the datasheet and can
actually render the translation map unusable because a shift appears
when reading the sensor FIFO data register. To prevent this, additional
build asserts have been added to check the slot sequence at compile time.
The default led-slot from bindings has been corrected: each type of
sensor will make all accessible LEDs available to the user by default.

Signed-off-by: Alban Chauvel <a.chauvel@catie.fr>
2026-08-13 13:09:40 -04:00
Jan Carlo Roleda
eee6e9f4d4 drivers: sensor: adi: Add LTC4286 Emulation Driver
Implements an emulated I2C device for register access of the LTC4286,
used to test driver conversion and register access logic.

Signed-off-by: Jan Carlo Roleda <jancarlo.roleda@analog.com>
2026-08-13 06:31:08 -04:00
Jan Carlo Roleda
2ea540ab83 drivers: sensor: adi: Add LTC4286 Driver Support
Added Driver support for LTC4286 Hot-Swap Controller and Power Monitor.
Supports power telemetry and interrupt support to alert host device of
fault and warning events.

Signed-off-by: Jan Carlo Roleda <jancarlo.roleda@analog.com>
2026-08-13 06:31:08 -04:00
Martin Hubáček
aa439fcfd5 drivers: sensor: tmp112: add one-shot conversion mode
The TMP112 can stay in shutdown (SD) mode and perform a single
conversion on demand via the one-shot (OS) bit. This is the lowest
idle-current mode and suits battery-powered designs that sample
infrequently.

Expose this mode through the conversion-rate property: setting it to 0
keeps the sensor shut down and triggers a one-shot conversion on every
sample_fetch call, blocking until the OS bit reads back as 1 (typ.
10 ms per datasheet 7.4.3) or a timeout elapses. The same mode can be
selected at runtime by setting a 0 Hz sampling frequency through
sensor_attr_set().

Because a new value (0) is prepended to the conversion-rate enum, the
device-tree enum index no longer maps directly onto the CR register
field, so the init path subtracts one for the periodic rates.

Tested on an nRF54L15-DK with a TMP112 over I2C: the periodic rates are
unchanged and conversion-rate = 0 returns correct readings on demand
while the sensor is held in shutdown between fetches.

Assisted-by: Claude:claude-opus-4.8
Signed-off-by: Martin Hubáček <martin.hubacek@hardwario.com>
2026-08-11 17:00:24 -04:00
Stefan Prisacariu
75f9205fcb drivers: sensor: tmag5273: fix invalid default ANGLE_EN setting
The default case of the angle_magnitude_axis switch programs
TMAG5273_ANGLE_EN_POS. This value sets bits outside the ANGLE_EN
field and overlaps with the adjacent range configuration bits in
SENSOR_CONFIG_2.

Use TMAG5273_ANGLE_EN_NONE instead to be corrrectly configured.

Signed-off-by: Stefan Prisacariu <stefan.prisacariu@prevas.dk>
2026-08-09 17:44:53 -04:00
Sundareswar Palanichamy
32b4e40d9c drivers: sensor: fdc2x1x: use channel config in conversions
Use the active channel's configuration when converting raw sensor data
to frequency and capacitance.

The conversion helpers were using cfg->ch_cfg->fin_sel and
cfg->ch_cfg->inductance, which always reference channel 0. This gives
incorrect results for multi-channel configurations where channels use
different fin_sel or inductance values.

Index ch_cfg with the selected channel so each conversion uses the
correct per-channel configuration.

Signed-off-by: Sundareswar Palanichamy <sundareswarp@gmail.com>
2026-08-07 16:24:35 -04:00
Markus Grafen
8453412be5 drivers: sensor: lis2dh: return -ENODATA when no new sample is available
lis2dh_fetch_xyz did not return -ENODATA when LIS2DH_STATUS_DRDY_MASK
was clear. Because the successful read returned 0, the data-ready check
was masked and old data was silently reported as fresh.

Signed-off-by: Markus Grafen <markus.grafen@medicassist.de>
2026-08-07 11:17:33 -04:00
Michal Frankiewicz
8b92d9b807 drivers: clock_control: split clock control into individual clocks.
Split clock control into individual clocks:
HFCLK, XO, LFCLK, HFCLK192M, XO24M, HFCLKAUDIO

Signed-off-by: Michal Frankiewicz <michal.frankiewicz@nordicsemi.no>
2026-08-06 14:30:12 +02:00
Aaron Kim
781e974030 drivers: sensor: icm566xx: Add ICM56622 and ICM56686 support
Use official TDK Invensense driver for ICM566xx sensor in tdk_hal module.

Signed-off-by: Aaron Kim <aaron.kim@tdk.com>
2026-08-05 13:54:23 +01:00
Liam Ogletree
3aebd685b4 drivers: sensor: Unify runtime PM log messages
Propagates #113545 to sensor drivers.

Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
2026-08-05 09:27:01 +02:00
Antoniu Miclaus
85182dc9ae drivers: sensor: adxl367: add INT2 interrupt pin support
The driver so far hardcoded INT1 (INTMAP1_LOWER at 0x2A) for all
interrupt mappings, so a board that routes only INT2 to the host could
never receive trigger or FIFO watermark interrupts. INT1 and INT2 have
bit-for-bit identical event mapping registers (INTMAP2_LOWER at 0x2B).

Select the connected pin from the int1-gpios/int2-gpios devicetree
properties and route the interrupt mappings to the matching register,
following the pattern already used by the adxl345 driver. When only
int1-gpios is present the driver keeps using INT1, so existing device
trees continue to work unchanged.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
2026-08-04 06:54:08 -04:00
Leo Li
7add3c7ea2 drivers: sensor: adi: add ADXL313 accelerometer driver
Add an I2C driver for the Analog Devices ADXL313 3-axis accelerometer
with classic sensor API support for range and ODR configuration.

Use i2c_reg_update_byte_dt for register read-modify-write, reconfigure
range/ODR in standby, and add build_all coverage plus a release-notes
entry.

Signed-off-by: Leo Li <leo.li@rakwireless.com>
2026-08-03 15:06:00 -04:00
Vladislav Pejic
c627cf26d1 drivers: sensor: adxl345: RTIO stream fix
Fix for RTIO streaming. When stream is canceled
with rtio_sqe_cancel before IRQ or when sequence
for getting data from FIFO, data->sqe is set to NULL.
This will result with early exit from some functions.
Because data->fifo_watermark_irq remain set, it was
not possible to start new stream.

Signed-off-by: Vladislav Pejic <vladislav.pejic@orioninc.com>
2026-08-03 15:05:43 -04:00
Yu He
1bdac9e22d drivers: sensor: bmp581: fix SPI multi-byte writes
The BMP581 SPI protocol requires every data byte in a multi-byte write
to be preceded by its register address. The driver currently submits
one address followed by all data bytes, so the second data byte is
interpreted as another register address.

Build one two-byte RTIO SQE for each register-address/data pair and
chain the SQEs as one transaction to keep CSB asserted. Leave the I2C
and I3C paths unchanged.

Update the SPI emulator to parse address/data pairs independently of
SPI buffer boundaries. This supports the corrected transaction layout
and rejects the previous malformed write sequence.

This allows OSR_CONFIG and ODR_CONFIG to be programmed correctly
during initialization and prevents the data registers from remaining
at their reset values.

Tested by building samples/sensor/pressure_polling for an STM32F407
target.

Assisted-by: Codex:gpt-5.6-sol
Signed-off-by: Yu He <auhy@mail.scut.edu.cn>
2026-08-03 15:05:34 -04:00
Yu He
0b2a5c505e drivers: sensor: bmp581: fix SPI soft reset sequence
After a soft reset, BMP581 returns to its power-up I2C/I3C mode.
The first SPI transaction selects SPI mode and returns invalid data.

The driver performs the post-reset dummy read only after soft_reset()
returns. However, soft_reset() reads INT_STATUS first, so the status read
is consumed as the SPI activation transaction and initialization fails
with -EFAULT.

Move the dummy read into soft_reset(), after the reset delay and before
reading INT_STATUS. The I2C and I3C paths remain unchanged.

Tested by building samples/sensor/sensor_shell for
arcap/stm32f407xx.

Link: https://github.com/zephyrproject-rtos/zephyr/pull/109240
Link: https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmp581-ds004.pdf

Assisted-by: Codex:gpt-5.6-sol
Signed-off-by: Yu He <auhy@mail.scut.edu.cn>
2026-08-03 15:05:34 -04:00
Ryan McClelland
5bfb3a758b drivers: sensor: bmp581: fix timestamps in FIFO stream
Capture the timestamp at GPIO callback time (IRQ time) rather than
in the RTIO completion callback after the data has been read. Add odr
to the encoded header, fix base_timestamp_ns to reflect the time of
the first FIFO sample, and add timestamp_delta per sample, matching
the lsm6dsv16x reference implementation.

Fixes: #98720
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
(cherry picked from commit 8cdcdeb189e63e0fed1cc06b2eb7a74fd9e9ce5d)
2026-08-03 15:02:04 -04:00
Felix Wang
cae5334d28 drivers: sensor: nxp: eqdc_mcux: migrate to mux subsystem
The mux subsystem redefines the "nxp,inputmux" binding as a mux
controller (#mux-control-cells / #mux-state-cells), which collided with
the EQDC driver's use of the same compatible through a
"specifier-space: inputmux" phandle-array. Reconcile the two by moving
the EQDC PHASEA/PHASEB input routing onto the generic mux model:

- nxp,mcxa156 / nxp,mcxa344 / nxp,mcxaxx6: switch the inputmux node
  from #inputmux-cells to #mux-control-cells / #mux-state-cells so it
  validates against the new binding (nxp,mcxa153 was already done).
- nxp,mcux-eqdc.yaml: drop the local inputmux-connections property and
  include mux-consumer.yaml; routing is now described with "mux-states".
- eqdc_mcux: drop the direct fsl_inputmux HAL calls and apply the
  routing through mux_state_apply(), guarded by device_is_ready(). The
  mux controllers init at priority 40, before the sensor at 90, so they
  are ready at EQDC init time.
- Migrate the frdm_mcxa153/156/266/344/346/366 QDEC sample overlays to
  the mux-states syntax.

Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
2026-08-03 15:00:55 -04:00
Felix Wang
e51dc855d4 drivers: sensor: nxp: qdec_mcux: migrate to mux subsystem
Drop the direct MCUX_XBARA HAL coupling in the QDEC driver in
favour of the new generic mux subsystem: the driver now selects
CONFIG_MUX, defines mux states from a "mux-states" devicetree
property and applies them at init time via mux_state_apply(),
which makes it agnostic to the underlying mux hardware.

Update the nxp,mcux-qdec binding to include mux-consumer.yaml,
augment the i.MX RT10xx XBAR nodes with CCM clock phandles plus
the new #mux-control-cells / #mux-state-cells declarations, and
migrate the MIMXRT1050-EVK QDEC overlay to the mux-states syntax.

Add the matching XBAR clock support to the i.MX CCM clock driver
(IMX_CCM_XBAR1_CLK / IMX_CCM_XBAR2_CLK gate/ungate, guarded by
CONFIG_MUX_NXP_XBAR) so the XBAR controllers referenced by those
nodes can be clocked.

Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
2026-08-03 15:00:55 -04:00
Felix Wang
5c727a83d1 drivers: sensor: nxp: qdc_mcux: migrate to mux subsystem
Drop the direct INPUTMUX_AttachSignal() coupling in the QDC driver
in favour of the new generic mux subsystem: the driver now selects
CONFIG_MUX, defines mux states from a "mux-states" devicetree
property, and applies them at init time via mux_state_apply().
This makes the driver mux-hardware-agnostic.

Update the nxp,mcux-qdc binding to use mux-consumer.yaml, expose
the inputmux0 node on the MCXNx4x family DTSI, and migrate the
FRDM-MCXN947 / MCXN5xx-EVK QDC overlays to the new mux-states
syntax.

Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
2026-08-03 15:00:55 -04:00
Sylvio Alves
b5d7a1a7a0 drivers: sensor: pcnt_esp32: add multi-unit support
Rework the esp32 pcnt driver to expose every counting unit of a
single device. The read-and-decode api threads the unit index
through sensor_chan_spec.chan_idx so sensor_read returns an
encoded buffer that the driver's decoder unpacks per unit. The
legacy sensor_channel_get path is kept on unit 0 for backward
compatibility.

The new sensor_chan_pcnt_esp32_unit(n) helper (in a public
header) packs the unit index into the legacy sensor_channel
field so sensor_attr_set and sensor_trigger_set can target a
specific unit. A new sensor_attr_pcnt_esp32_reset attribute
clears the hardware counter.

Dt binding gains counts-per-revolution (enables degrees output
on sensor_chan_rotation), high-limit and low-limit watchpoints
(counter auto-resets on reach and raises the trigger), and
zero-cross-event. Filter is documented in apb cycles with the
correct 1023 clamp.

Threshold trigger demultiplexes per unit in the isr and fixes
the old behaviour that silently re-allocated the isr on every
trigger_set. Interrupt alloc moves to init.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-08-03 14:59:53 -04:00
Elie Carrot
7846553719 drivers: sensor: hc-sr04: handle runtime clock frequency
Avoid static initialization of the hc-sr04 driver to support boards with
a runtime clock frequency.

Signed-off-by: Elie Carrot <elie.carrot@smile.fr>
2026-07-31 20:02:23 -04:00
Bayrem Gharsellaoui
9b82224e09 drivers: sensor: linux_temp: split host file access
To avoid assuming that ZVFS_O_RDONLY matches O_RDONLY, compile the
Linux file access code directly with the host libc.

This also removes the need for the nsi_host file operation wrappers and
makes the host-side code easier to read.

Signed-off-by: Bayrem Gharsellaoui <bayrem.gharsellaoui@gmail.com>
2026-07-31 13:20:35 -04:00
Bayrem Gharsellaoui
427385c066 drivers: sensor: add a native Linux temperature driver
Add a native_sim driver to read a Linux host temperature using the
Zephyr sensor API.

Signed-off-by: Bayrem Gharsellaoui <bayrem.gharsellaoui@gmail.com>
2026-07-31 13:20:35 -04:00
Armando Visconti
13a4ab5b94 drivers/sensor: lsm6dsv16x: add SHUB handling in FIFO
Stream Sensor HUB data in FIFO and decode them properly.
Currently two channels are handled:

	- SENSOR_CHAN_MAGN_XYZ
	- SENSOR_CHAN_PRESS

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2026-07-31 13:04:24 -04:00
Armando Visconti
4d15a1672b drivers: sensors: st: fix shub for FIFO usage
Set the read number of operation to 0 at the end of
lsm6dsv16x_shub_read_target_reg(), just to avoid issues
when reading data from FIFO.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2026-07-31 13:04:24 -04:00
Francis Roi Manabat
74b58bc66f drivers: sensor: max30009: add sensor decoder
Add a sensor decoder for the MAX30009 streaming path, decoding the I and
Q BioZ channels from the FIFO sample sets pushed by the RTIO submit
path.

The decoder is compiled in with the streaming path via
CONFIG_MAX30009_STREAM.

Signed-off-by: Francis Roi Manabat <francisroi.manabat@analog.com>
2026-07-30 17:36:12 -04:00
Francis Roi Manabat
1cdbc7e48c drivers: sensor: max30009: add RTIO streaming
Add RTIO streaming of the I and Q BioZ channels. The submit path reads
the FIFO on a watermark/data-ready interrupt and pushes sample sets into
the RTIO buffer; one-shot (non-streaming) reads are rejected.

Streaming is compiled in via CONFIG_MAX30009_STREAM.

Signed-off-by: Francis Roi Manabat <francisroi.manabat@analog.com>
2026-07-30 17:36:12 -04:00
Francis Roi Manabat
db8773b075 drivers: sensor: max30009: add trigger support
Add own-thread and global-thread trigger support for the MAX30009.
Handlers are provided for the FIFO watermark, data-ready and DC
lead-off / range status events, dispatched from the interrupt GPIO.

The trigger source is compiled in via CONFIG_MAX30009_TRIGGER.

Signed-off-by: Francis Roi Manabat <francisroi.manabat@analog.com>
2026-07-30 17:36:12 -04:00
Francis Roi Manabat
a655b3c24b drivers: sensor: add MAX30009 Bio-Impedance AFE driver
Add a driver for the Analog Devices MAX30009 bioimpedance analog
front-end. The device is supported over both SPI and I2C.

This base commit provides the core acquisition-path driver:

- Full BioZ acquisition-path configuration from devicetree (clock/PLL,
  drive, receive channel, digital filters, thresholds, mux, DC leads and
  lead bias), with a dt-bindings header of MAX30009_DT_* constants for
  the enumerated properties.
- Runtime attribute access (attr_set / attr_get) for the meaningful BioZ
  parameters via a descriptor table, cycling the PLL where the datasheet
  requires the acquisition path to be quiesced.
- Power management (suspend / resume) following the datasheet's
  bandgap / PLL / channel enable sequence.

Trigger and RTIO streaming support are added in follow-up commits; the
full Kconfig describing those options is included here so the driver's
configuration surface is complete.

Signed-off-by: Francis Roi Manabat <francisroi.manabat@analog.com>
2026-07-30 17:36:12 -04:00
Nils Harder
b1061f09b0 drivers: sensor: hc_sr04: Replace hardcoded echo-timeout
The echo-timeout defines the maximum range of the ultrasonic sensor and
was hardcoded to 10ms (~1.5m).
This commit creates a dts property for the timeout,
so users can configure the maximum range per sensor instance.
The default setting of the property is 10ms for compatibility.

Signed-off-by: Nils Harder <harder@metratec.com>
2026-07-30 17:36:00 -04:00
Etienne Carriere
aa3187f793 drivers: Include include/zephyr/sys/clock.h
Header file include/zephyr/sys_clock.h is deprecated and will be removed
someday. Update the whole file tree to include zephyr/sys/clock.h
straight instead of zephyr/sys_clock.h.

This change was made running the sed shell command below:
$ sed -i 's/zephyr\/sys_clock\.h/zephyr\/sys\/clock\.h/' \
      `grep -rsl "zephyr/sys_clock\.h" drivers/`

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-07-30 07:45:05 -05:00
Anas Nashif
72e5c301b2 drivers: kconfig: drop 'select UART' of nonexistent symbol
There is no 'config UART' base definition in the tree; the only
definition was an accidental bare declaration in the
cy8cproto_062_4343w board Kconfig.defconfig, so every
'select UART' resolved against a phantom bool that gates nothing.

- bluetooth: hci: BT_AIROC: drop the select. BT_H4 already selects
  BT_UART, which selects SERIAL and UART_INTERRUPT_DRIVEN, so the
  H4 transport is fully covered.
- sensor: explorir_m, fcx_mldx5, s3km1110: drop the select. These
  drivers already have 'depends on UART_INTERRUPT_DRIVEN', which
  requires SERIAL; replacing the select with 'select SERIAL' would
  create a Kconfig dependency loop through UART_INTERRUPT_DRIVEN.
- input: ch9350l: drop the select for the same reason (it depends
  on SERIAL_SUPPORT_INTERRUPT and selects UART_INTERRUPT_DRIVEN).
- stepper: adi_tmc: STEPPER_ADI_TMC_UART: replace with
  'select SERIAL', matching the sibling STEPPER_ADI_TMCM_RS485
  symbol, so enabling the UART bus variant actually enables the
  serial drivers.

Found by a full-tree Kconfig audit cross-referencing every defined
symbol against its uses.

Assisted-by: Claude:claude-fable-5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-07-28 20:51:01 -04:00