Commit graph zephyr/drivers/sensor
Author SHA1 Message Date
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
Benjamin Cabé
3471537cdb drivers: sensor: npm10xx_adc: Use charge LSB mask for calibration
The charge calibration extracted its two LSBs with the discharge mask
(bits 1:0) instead of the charge mask (bits 3:2), skewing charging
current readings.

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-07-27 11:39:20 -07:00
Flavio Ceolin
7a1d901113 drivers: sensor: cht8315: combine OR'd status flag checks
(tmp & A) != 0 || (tmp & B) != 0 is equivalent to (tmp & (A | B)) != 0.
Collapse the temperature and humidity threshold status tests into single
masked checks.

Signed-off-by: Flavio Ceolin <flavio@hubble.com>
2026-07-25 11:54:45 -07:00
Rupesh Majhi
cee2a2ad76 drivers: sensor: bmi270: guard any-motion against missing feature set
The default "bosch,bmi270" compatible selects the max_fifo feature set,
whose anymo_1/anymo_2 registers are NULL. Enabling SENSOR_TRIG_MOTION then
made bmi270_anymo_config() pass those NULL pointers to
bmi270_feature_reg_write(); on Cortex-M address 0 is readable, so the write
silently targeted an unintended feature page and returned success, leaving
the trigger a no-op.

Return -ENOTSUP when the configured feature set does not provide the
any-motion registers, so the condition is reported instead of failing
silently.

Fixes #112938

Signed-off-by: Rupesh Majhi <zoone.rupert@gmail.com>
2026-07-25 17:10:36 +02:00
Benjamin Cabé
339e3a88eb drivers: sensor: sb_tsi: Fix channel check in emulator set_channel
The channel guard combined its checks with &&, accepting any channel
type with index 0. Use ||, matching sb_tsi_emul_get_sample_range().

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-07-24 12:36:44 -07:00
Benjamin Cabé
f8266bc00b drivers: sensor: ntc_thermistor: Fix NCP15XH103 table entry
The 2586 Ohm point was listed at 64 degC in a table that steps by
exactly 10 degC, skewing interpolation between 55 and 75 degC. Use
65 degC.

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-07-24 12:36:32 -07:00
Benjamin Cabé
18ce2d4668 drivers: sensor: mlx90394: Fix temperature raw value assembly
Operator precedence applied the scale factor to the high byte before
OR-ing in the low byte, and the 16-bit sign was lost. Assemble and
sign-extend the raw value first, as the magnetometer path does.

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-07-24 12:36:20 -07:00
Benjamin Cabé
3c131d740a drivers: sensor: bmp581: Fix temperature IIR coefficient programming
set_iir_config() overwrote the whole DSP_IIR register with the raw
temperature coefficient instead of programming it through the
BMP5_SET_IIR_TEMP bitfield, corrupting the pressure IIR setting.

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-07-24 12:36:09 -07:00
Benjamin Cabé
b3b981fa06 drivers: sensor: mtch9010: Fix heartbeat error channel fall-through
The heartbeat error case fell through into default and returned
-ENOTSUP, so fetching the channel always failed. Add the missing
break.

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-07-24 12:35:49 -07:00
Benjamin Cabé
e844e5f01e drivers: sensor: mtch9010: Fix receive length in reference averaging
sizeof(temp_buffer) on a pointer parameter truncated the UART receive
to the pointer size. Pass MTCH9010_INTERNAL_BUFFER_SIZE.

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-07-24 12:35:49 -07:00
Benjamin Cabé
5eada09e7b drivers: sensor: lsm9ds0_mfd: Fix build with runtime full-scale
The accel and magn full-scale setters used an undeclared data pointer
when the respective FULL_SCALE_RUNTIME options are enabled. Declare
it from dev->data.

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-07-24 12:35:26 -07:00
Benjamin Cabé
337811b7db drivers: sensor: lsm9ds0_gyro: Fix build with runtime full-scale
lsm9ds0_gyro_set_fs_raw() used an undeclared data pointer when
CONFIG_LSM9DS0_GYRO_FULLSCALE_RUNTIME is enabled. Declare it from
dev->data.

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-07-24 12:35:26 -07:00
Benjamin Cabé
614a3baea0 drivers: sensor: lsm9ds0_mfd: Use magn ODR map in magn ODR setter
lsm9ds0_mfd_magn_set_odr() iterated the accelerometer ODR map instead
of the dedicated magnetometer map, producing out-of-range M_ODR codes
for frequencies above 100 Hz.

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-07-24 12:35:26 -07:00
Benjamin Cabé
adf539509a drivers: sensor: lsm9ds0_gyro: Fix ODR field shift in CTRL_REG1_G
The sample rate was shifted with the bandwidth field shift, so the
value never intersected the DR mask and the requested ODR was always
programmed as zero. Use the DR field shift.

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-07-24 12:35:26 -07:00
Anton Puppe
2fead6e31e drivers: add Hamamatsu S9706 digital color sensor driver
Add a driver for the Hamamatsu S9706 digital RGB sensor using plain
GPIOs. All parameters (e.g. integration time and sensor range) are
runtime-configurable via sensor attributes.

Signed-off-by: Anton Puppe <anton-noel-flynn.puppe@zeiss.com>
2026-07-23 17:14:29 -07:00
Benjamin Cabé
e03e40aec4 drivers: sensor: max32664c: Fix gender algorithm config sub-index
Setting the gender attribute wrote sub-index 0x08, which belongs to
age (height 0x06, weight 0x07, age 0x08), overwriting the age
setting. Use sub-index 0x09.

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-07-23 11:46:21 -07:00
Benjamin Cabé
1fd8608075 drivers: sensor: max31875: Pass a mask to the config update helper
The full-scale attribute passed MAX31875_DATA_FORMAT_SHIFT (a bit
position) as the register mask, clearing the conversion-rate bits and
never setting the data format. Use BIT(MAX31875_DATA_FORMAT_SHIFT).

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-07-23 11:46:21 -07:00
Benjamin Cabé
64fd17543c drivers: sensor: nxp_pmc_tmpsns: Fix ADC sequence buffer size
buffer_size was set to the size of the whole data struct instead of
the uint16_t buffer member. Use sizeof of the member.

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-07-23 16:19:46 +02:00
Benjamin Cabé
f57c2f82a3 drivers: sensor: fxas21002: Fix out-of-bounds SPI command buffer
The SPI read command buffer was 2 bytes but described with a length
of 3, reading past the stack array and clocking out an indeterminate
byte. Size the buffer to match.

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-07-23 16:19:46 +02:00
Benjamin Cabé
1fce583536 drivers: sensor: fxos8700: Fix motion threshold value
The trigger setup wrote the FF_MT_THS register address (0x17) as the
threshold instead of the maximum. Write FXOS8700_FF_MT_THS_MASK as
the comment describes.

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-07-23 16:19:46 +02:00
Maureen Helm
ac1db7eab2 drivers: sensor: adxl345: fix over-sized buffer request in submit_fetch
adxl345_submit_fetch() requests sizeof(struct adxl345_dev_data) bytes
from the RTIO buffer pool, but only writes sizeof(struct adxl345_sample)
into it. The decoder also casts the buffer to struct adxl345_sample *.

This over-allocation wastes memory and prevents callers from using
reasonably-sized read buffers (e.g. 128 bytes) since adxl345_dev_data
can exceed 200 bytes when triggers or streaming are enabled.

Assisted-by: Claude:claude-opus-4-6
Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2026-07-22 20:57:33 -04:00
Benjamin Cabé
9d47b1c967 drivers: sensor: icm40627: Fix undefined variable in init error path
icm40627_init() logged a failed bus check through an undeclared
'config' pointer and a nonexistent bus.bus member, breaking the build
when the driver is compiled. Point LOG_ERR_DEVICE_NOT_READY at the
underlying I2C bus device.

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-07-22 11:07:46 +01:00
Benjamin Cabé
8d1d65c4b6 drivers: sensor: mpu9250: Make die temperature channel unconditional
The SENSOR_CHAN_DIE_TEMP case sat inside the CONFIG_MPU9250_MAGN_EN
guard, so temperature reads returned -ENOTSUP with the magnetometer
disabled even though the register is always fetched.

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-07-22 11:07:46 +01:00
Benjamin Cabé
fc09bf7096 drivers: sensor: tad214x: Fix angle full-scale divisor and overflow
The angle conversion divided by 65635 instead of the 16-bit full
scale 65535, and raw_val * 36000 overflows signed 32-bit for large
readings. Use 65535 and widen to uint32_t.

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-07-22 11:07:46 +01:00
Benjamin Cabé
0f2e48108e drivers: sensor: tsl2540: Fix analog gain configuration
CFG2 was written with the CFG1 bit pattern so the AGAINMAX/AGAINL
bits were never programmed, and the 128x case loaded the CFG2
register value (20) into the lux gain instead of TSL2540_AGAIN_S128
(140).

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-07-22 11:07:37 +01:00
Benjamin Cabé
456baea0d3 drivers: sensor: si7210: Fix 2000G scale coefficient OTP addresses
The 2000G A3-A5 OTP addresses jumped from 0x29 to 0x30-0x32 instead
of continuing at 0x2A-0x2C, pointing at the wrong registers.

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-07-22 11:07:29 +01:00
Benjamin Cabé
58f4292cd9 drivers: sensor: mmc56x3: Apply new auto-self-reset value on change
The reconfigure path detected an auto_sr change but programmed the
old value, so the attribute never took effect. Pass the new value.

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-07-22 11:05:18 +01:00
Benjamin Cabé
02240c6b0e drivers: sensor: afbr_s50: Fix misplaced comparison in BUILD_ASSERT
The dual-frequency assertion placed '== 0' inside the DT_INST_PROP
property-name argument. Move the comparison outside the macro call,
matching the assertion below it.

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-07-22 11:05:07 +01:00
Alberto Escolar Piedras
8994f40014 drivers: sensor: bmp581: ifdef static function
So it is only built when needed, and we avoid a compiler warning:
bmp581.c:59:19: error: unused function 'bmp581_pm_busy_check'

The issue was there since c68a25e4d5
but only became apparent in CI when its test was added in
f0802b645b

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2026-07-21 10:27:49 +02:00
Ryan McClelland
14691a9ccb drivers: sensor: bmp581: add emulator
Add a bus emulator for the BMP581 so the driver can be exercised on
native_sim without hardware. It models the register file, the soft-reset
power-on-complete handshake, the chip-id and NVM-ready status, and the
temperature/pressure data registers, and implements the emul_sensor
backend (set_channel / get_sample_range) for the pressure and ambient
temperature channels.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2026-07-17 11:52:11 -04:00
Iustin Stolniceanu
a36b2dd27b drivers: sensor: adi: add adis1647x IMU driver
Add driver for the ADIS16477 6-axis IMU sensor family.
Supports polling, trigger (DRDY interrupt), RTIO async, and
streaming modes. Includes SPI bus access, burst read, decoder,
temperature and inertial data channels, decimation rate
configuration via devicetree, hardware reset, and diagnostic
status checking.

Signed-off-by: Iustin Stolniceanu <iustin.stolniceanu@analog.com>
2026-07-16 14:26:59 +02:00
Flavio Ceolin
6d63fac9b9 sensor: Remove redundant casts in syscall handlers
The syscall handler functions forward parameters with identical casts
that are redundant since the variables already have those types.  Drop
the casts to let the compiler type-check the arguments unobstructed.

Signed-off-by: Flavio Ceolin <flavio@hubble.com>
2026-07-15 19:04:12 -04:00
Vignesh Pandian
00d9a0da6f drivers: sensor: bmi270: add die temperature channel support
The BMI270 exposes an on-chip temperature sensor in registers
TEMPERATURE_0/1 (0x22/0x23). Add support for SENSOR_CHAN_DIE_TEMP so
applications can read it through the standard sensor API.

bmi270_init() now sets PWR_CTRL.temp_en, bmi270_sample_fetch() reads
the 16-bit value, and bmi270_channel_get() converts it using the
datasheet formula T = raw / 512 + 23 degrees C, returned in micro-
degrees through val1/val2.

Signed-off-by: Vignesh Pandian <vignesh@aerlync.com>
2026-07-15 14:49:48 -05:00
Ryan McClelland
39ab71e612 drivers: sensor: adxl367: 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 f73d9b122431cd7bcfeb24b67c170241a1a61d98)
2026-07-14 16:39:38 -04:00
Ryan McClelland
d8eabd542d drivers: sensor: icm4268x: fix base_timestamp_ns to first sample time
Pre-count FIFO frames for the requested channel and adjust
base_timestamp_ns backward from trigger time by (N-1)*period so it
reflects the time of the first sample, matching the lsm6dsv16x
reference implementation.

Fixes: #98720
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
(cherry picked from commit 750d08206d5ec13a7c171ede9cea00dcc8aab9f6)
2026-07-14 17:59:17 +02:00
Ryan McClelland
7faec1e3d8 drivers: sensor: adi: adxl362: fix reading_count in stream decoder
adxl362 hardcoded reading_count = 1 despite its decode loop being
capable of filling multiple readings[] entries up to max_count.

The memset and header initialization were also inside the loop body,
which zeroed previously decoded readings on each iteration. Split the
decode into separate SENSOR_CHAN_DIE_TEMP and accel loops, moving the
memset and header setup (base_timestamp_ns, shift) before each loop and
setting reading_count to the actual decoded sample count afterwards.

While here, fix two coupled bugs exposed once multiple readings are
reported:
- the temperature path memset used sizeof(struct sensor_three_axis_data)
  on a struct sensor_q31_data buffer, zeroing past the end of the
  smaller struct; use sizeof(struct sensor_q31_data) instead.
- sample_num was never incremented in the loop, so every reading was
  given an identical timestamp_delta; increment it per decoded sample.

Assisted-by: Claude:claude-sonnet-4.6
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2026-07-13 16:17:46 -05:00
Ryan McClelland
a7bbae9c4c drivers: sensor: adi: adxl372: fix reading_count in stream decoder
adxl372 hardcoded reading_count = 1 despite its decode loop being
capable of filling multiple readings[] entries up to max_count.

Set reading_count to the actual decoded sample count after the loop
completes.

Assisted-by: Claude:claude-sonnet-4.6
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2026-07-13 16:17:46 -05:00
Ryan McClelland
24481b75c2 drivers: sensor: adi: adxl355: fix reading_count in stream decoder
adxl355 hardcoded reading_count = 1 despite its decode loop being
capable of filling multiple readings[] entries up to max_count.

Set reading_count to the actual decoded sample count after the loop
completes.

Assisted-by: Claude:claude-sonnet-4.6
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2026-07-13 16:17:46 -05:00
Ryan McClelland
a85e3b69fd drivers: sensor: adi: adxl345: fix reading_count in stream decoder
adxl345 hardcoded reading_count = 1 despite its decode loop being
capable of filling multiple readings[] entries up to max_count.

Set reading_count to the actual decoded sample count after the loop
completes.

Assisted-by: Claude:claude-sonnet-4.6
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2026-07-13 16:17:46 -05:00