Commit graph zephyr/drivers/sensor
Author SHA1 Message Date
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
Gobi M
cd2c862c85 drivers: sensor: bme280: return error on pressure compensation failure
Avoid silently reporting an invalid pressure value when pressure
compensation encounters a division-by-zero condition.

Use the existing return value 0 from bme280_compensate_press() to
detect a compensation failure in bme280_sample_fetch_helper(), Log an
error, and return -EIO instead of storing an invalid pressure reading.

This ensures callers to receive an appropriate error when pressure
compensation cannot be completed successfully.

Signed-off-by: Gobi M <gobi@aerlync.com>
2026-07-13 16:17:05 -05:00
Mathieu Choplain
23c84fa1ef drivers: *: stm32: replace COND_CODE_1() chains with COND_CASE_1()
The COND_CASE_1() allows writing chained/nested COND_CODE_1() checks in
a simpler way. Replace such patterns in the STM32 drivers with this new
utility macro.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-07-12 20:02:10 -04:00
Ryan McClelland
ff07e42fba drivers: sensor: bmi08x: gyro: fix timestamps in FIFO stream
Add gyro_odr to the encoded header so the decoder knows the sample
rate. Fix base_timestamp_ns to reflect the time of the first FIFO
sample (trigger_time - (N-1)*period) 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 396a5615ee758c156fc340b3e2a496b6d1590ffc)
2026-07-07 17:41:40 -04:00
Ryan McClelland
b458174118 drivers: sensor: bmi08x: accel: fix timestamps in FIFO stream
Add accel_odr to the encoded header so the decoder knows the sample
rate. Fix base_timestamp_ns to reflect the time of the first FIFO
sample (trigger_time - (N-1)*period) 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 674f1aff9143bbd8191eff4844fd5d84c938e421)
2026-07-07 17:41:40 -04:00
Ryan McClelland
78f1218532 drivers: sensor: adxl372: 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 6fa8569d5ded7c6a2578ea3b30a5033861224497)
2026-07-07 17:41:31 -04:00
Ryan McClelland
6547604b18 drivers: sensor: adxl355: 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 beb67e32e8e91250ec1ed877c89e4b140fd95673)
2026-07-07 17:41:20 -04:00
Ryan McClelland
576586e9fa drivers: sensor: adxl345: 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 31e23771424d99a99392a94ae459be836d91dc3c)
2026-07-07 17:41:12 -04:00
Ryan McClelland
1f4adc265c drivers: sensor: bma4xx: fix base_timestamp_ns to first sample time
Record base_timestamp_ns as the time of the first sample in the FIFO
by adjusting backward from the trigger timestamp using the total frame
count and ODR period, matching the lsm6dsv16x reference implementation.

Fixes: #98720
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
(cherry picked from commit 36386844a6a0da009cca6bc730034f849e4b9dcf)
2026-07-07 17:41:04 -04:00
Matthias Alleman
c37125204c drivers: sensor: lis2dh: Add down event int to any motion configuration
Lis2dh interrupts were only fired for up events. Fixed it by adding
down event enable bits to the ANYM_CFG.

Signed-off-by: Matthias Alleman <matthias.alleman@basalte.be>
2026-07-06 11:29:30 -04:00
Mathieu Choplain
4175bed67f drivers: sensor: st: stm32_vbat: add broader VDDCORE support
Extend the VBAT driver to support VDDCORE channel on more STM32 series:
- STM32H7R/S
- STM32MP2
- STM32N6
- STM32U3

This is achieved by using different LL APIs which seem more portable
(with the exception of STM32H5 series on which they are not available!)

Adding actual DTSI nodes for the sensors will be done in other commits.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-07-03 13:58:15 -04:00
Felix Wang
a961b551c5 drivers: sensor: nxp: add MCUX eQDC driver
Add a sensor driver for the NXP MCUX Enhanced Quadrature Decoder (EQDC)
using the fsl_eqdc HAL. The PHASEA/PHASEB decoder inputs are routed
through the on-chip INPUTMUX, described by an "inputmux-connections"
phandle-array following the nxp,inputmux convention.

The driver exposes SENSOR_CHAN_ROTATION, SENSOR_CHAN_RPM,
SENSOR_CHAN_ENCODER_COUNT and SENSOR_CHAN_ENCODER_REVOLUTIONS; the last
channel is added to the sensor API. Velocity uses the EQDC period
measurement (POSDH/POSDPERH), so a prescaler keeps the 16-bit period
counter from saturating at the sample rate.

A single-phase-mode property selects single-phase decode (one count per
PHASEA pulse, with the direction taken from PHASEB) instead of the
default quadrature X4 decoding, with the counts-per-revolution scaling
adjusted accordingly.

Co-authored-by: bnina-ayoub <ouba.bnina@gmail.com>
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
2026-07-03 10:05:43 +02:00
Tomas Groth Christensen
bfdbdae877 driver: sensor: maxim: Add support for Max31826 temperature sensor
Based on the DS18B20 driver. Only the temperature sensor functionality is
exposed by this driver, not eeprom access nor parasite power configuration.

Signed-off-by: Tomas Groth Christensen <tgc@foss.dk>
2026-07-02 21:32:05 -04:00
Nicolas Belin
e9f4c9c95f drivers: sensor: flow_meter: add initial driver
Add Hall-effect pulse-output flow meter driver. An ISR increments a
64-bit pulse counter implemented as two 32-bit atomics (low word and
high word) with wraparound detection.

Volume thresholds are stored as a snapshot of the low pulse counter at
arm time plus a delta in pulses. The ISR fires when the unsigned 32-bit
difference (current - snapshot) reaches the delta, which is inherently
wraparound-safe. Sub-pulse thresholds are clamped to one pulse. The
threshold trigger is one-shot: it disarms on firing or when a NULL
handler is registered. Work is deferred to the system workqueue to avoid
running the handler in ISR context.

SENSOR_CHAN_VOLUME reports accumulated volume in liters since boot.
SENSOR_CHAN_FLOW_RATE reports instantaneous flow in L/min, computed at
sample_fetch time from the delta pulse count and elapsed time since the
previous fetch. SENSOR_ATTR_CALIBRATION provides a runtime override for
the pulses-per-liter calibration value. An optional power GPIO can be
asserted at init to enable the sensor module.

Signed-off-by: Nicolas Belin <nbelin@baylibre.com>
2026-07-02 12:58:57 -04:00
Nicolas Belin
ea25f77271 include: drivers: sensor: add SENSOR_CHAN_VOLUME channel
Add SENSOR_CHAN_VOLUME for sensors that report accumulated flow volume in
liters.

Signed-off-by: Nicolas Belin <nbelin@baylibre.com>
2026-07-02 12:58:57 -04:00
Jordan Yates
5b4b30456c sensor: st: lps22hh: one-shot mode unless CONFIG_LPS22HH_TRIGGER
Transition the driver over to one-shot operation by default unless
`CONFIG_LPS22HH_TRIGGER` is enabled to actually make use of periodic
measurements. By using one-shot mode and polling on the status register,
this fixes the following code flow, which is currently broken due to
no periodic samples being available immediately after resuming.
```
pm_device_runtime_get(dev);
sensor_sample_fetch(dev);
sensor_channel_get(dev, ...);
pm_device_runtime_put(dev);
```

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-07-01 14:31:41 -04:00
Etienne Carriere
b0b25c35c9 drivers: use <> to include Zephyr headers instead of ""
Use <> operator to include a Zephyr header file instead of "" that
is intended to local header files, not header files relative to
specifically defined search paths.

This change was made running the sed shell command below:
$ sed -i -E 's/#include "zephyr\/([^"]+)\.h"/#include <zephyr\/\1.h>/g' \
    `grep -rsl "#include \"zephyr/" drivers/`

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-06-30 06:49:18 -04:00
Michael Zimmermann
e10af22991 tree-wide: replace usages of k_work_q thread with thread_id
The `thread` field is not initialized, if it's being animated via
k_work_queue_run instead of k_work_queue_start.

Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
2026-06-29 22:17:45 -04:00
Noah Luskey
0c7a90ce4c drivers: sensor: ti: ina2xx: fix INA228 SHUNT_CAL integer truncation
INA228_DRIVER_INIT sets CAL with
`.cal = (INA237_DT_CAL(inst) * 16)`, where INA237_DT_CAL ends in
`/ 10000000ULL`. C operator precedence runs the divide before the
*16, so the truncation residual gets amplified 16x — and for small
current_lsb * rshunt products (e.g. 191 nA LSB, 5 mOhm shunt) the
numerator is below 1e10 and CAL collapses to 0, leaving the CURRENT
register stuck at zero (datasheet section 8.1.2).

Replace both CAL macros with a single parameterized
INA2XX_DT_CAL(inst, scaling) so the *16 (folded into
INA228_CAL_SCALING) happens inside the product, and the divide is the
last operation. INA237 path is functionally unchanged.

Signed-off-by: Noah Luskey <luskey@meta.com>
2026-06-23 08:35:58 +02:00
Jan Carlo Roleda
5e610f91f0 tests: drivers: sensor: Add ADT7420 Emulated Driver Tests
Adds Driver emulation tests to validate configuration,
data fetching and temperature edge case checks.

Signed-off-by: Jan Carlo Roleda <jancarlo.roleda@analog.com>
2026-06-22 20:31:12 -04:00
Jan Carlo Roleda
f62e280b20 drivers: sensor: adi: Fix ADT7420 negative temperature decoding
Fixes a computation issue that causes negative temperature values
to be erroneously parsed from the device driver.

Signed-off-by: Jan Carlo Roleda <jancarlo.roleda@analog.com>
2026-06-22 20:31:12 -04:00
Anas Nashif
ea1fbf3588 driver: fix various typos
Fixed various typos under drivers/

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-06-17 10:12:27 -04:00