Commit graph zephyr/drivers/sensor/fcx_mldx5
Author SHA1 Message Date
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
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
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
sudarsan N
7312715975 drivers: sensor: fcx_mldx5: Fix potential buffer overflow in UART frame
Fix Coverity issue CID 363738 (CWE-120): A potential buffer overflow could
occur in fcx_mldx5_uart_send() due to unchecked memcpy() when copying
command data into a fixed-size frame buffer.

This patch ensures that the length of the data being copied validated
against the remaining buffer size to prevent overruns. Also replaces a
redundant strlen() call with the precomputed cmd_data_len.

Fixes: #92634

Signed-off-by: sudarsan N <sudarsansamy2002@gmail.com>
2025-07-25 23:29:04 +02:00
Jeppe Odgaard
dffbd4fc88 license: fix copyright owner
Change license owner to Prevas due to initially wrong owner due to company
mix-up during co-development.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2025-06-26 10:56:48 -05:00
Pieter De Gendt
a553af738d drivers: sensor: Place API into iterable section
Add wrapper DEVICE_API macro to all sensor_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:04:55 +00:00
Jilay Pandya
6a0d7351d5 drivers: sensor: fcx_mldx5 fix string_overflow issue
This commit fixes Copy into fixed size buffer (STRING_OVERFLOW) by checking
the cmd_data_len

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-11-16 13:38:00 -05:00
Jeppe Odgaard
83957729dd drivers: sensors: add fcx-mldx5 o2 sensor
Add driver for Angst+Pfister O2 sensors FCX-MLD25 & FCX-MLD95 and maybe
more. Tested with FCX-MLD25.

Supports get O2 value, get status, and power management.

Note that in suspended power mode heating output is at 20 %, thus
probably not suited for a battery powered device.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-03-26 10:46:30 -04:00