Commit graph zephyr/drivers
Author SHA1 Message Date
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
Daniel DeGrasse
d4a941962d drivers: flash: soc_flash_rv32m1: use legacy method to get flash node
Use legacy method to get the SOC flash node for the rv32m1 flash driver,
because users of this flash driver define multiple child nodes with the
soc-nv-flash compatible. This prevents use of the
SOC_NV_FLASH_CHILD_NODE helper macro, which relies on one compatible
with the child being present.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@analog.com>
2026-07-13 11:36:19 -07:00
Michael Zimmermann
b24720772d drivers: entropy: gecko_trng: init on read for gecko-sdk as well
When the trng peripheral is not enabled, the read becomes an infinite loop
for gecko-sdk based SoCs.

I don't have a reliable way to reproduce this and thus don't know what the
root cause is. The only thing I found, is that while it's stuck in an
infinite loop, the clock is enabled in the CMU register, but the TRNG is
disabled in it's control register. So hopefully, this fixes the issue.

Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
2026-07-13 16:45:00 +02:00
Holt Sun
8e0ba3bb3c drivers: counter: mcux_ctimer: add capture support
Add support for the counter capture API to the MCUX CTIMER driver.
The driver stores capture callbacks per channel, maps Zephyr edge
flags to CTIMER capture modes, enables capture interrupts, and reports
captured TC values from the CTIMER CR registers.

Capture is mutually exclusive with alarms on the same channel because
both features share the counter channel namespace. Add optional
pinctrl and INPUTMUX routing support so boards can route CTIMER capture
sources from devicetree without changing the public counter API.

Signed-off-by: Holt Sun <holt.sun@nxp.com>
2026-07-13 16:43:16 +02:00
Daniel DeGrasse
7acfb6145f drivers: flash: unify SOC_NV_FLASH_NODE logic
Many drivers in tree use a similar pattern to find their child node with
the compatible "soc-nv-flash". Rather than continuing to duplicate this
logic, define a common handler that is instance based in the flash_priv
header file, and include this from each flash driver.

Assisted-by: Claude: claude-opus-4-6
Signed-off-by: Daniel DeGrasse <daniel.degrasse@analog.com>
2026-07-13 16:42:32 +02:00
Zhaoxiang Jin
c6e5329d7b drivers: regulator: nxp vref: add new vref variant support
update nxp vref driver to support new variant.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-07-13 16:39:17 +02:00
Alain Volmat
22b33e9a25 drivers: video: ensure to enable GPIO when needed by modules
Ensure to select GPIO whenever a driver requires a gpios
line for reset or powerdown.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2026-07-13 10:23:19 +01:00
Phi Bang Nguyen
e8a80a3117 drivers: video: Improve video_import_buffer
Return the whole video_buffer structure instead of just the index.
This helps to make index transparent to application and also make the
buffer accessible from the application.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2026-07-13 10:22:19 +01:00
Pieter De Gendt
26572fc0db drivers: wifi: nrf_wifi: Hold interface dormant until authorized
In STA mode the interface was brought operational at association, before
the controlled port was authorized, so the IP stack transmitted data
during the 802.1X handshake window which the driver then dropped with
-EPERM.

Advertise WPA_DRIVER_FLAGS_CONTROL_PORT and implement the tx_control_port
op so EAPOL frames are handed to the driver directly instead of going
through the networking stack. With EAPOL off the data path, keep the
interface dormant from association until the controlled port is
authorized, withholding data TX during authorization while the handshake
still completes.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Assisted-by: Claude:claude-opus-4.8
2026-07-13 10:22:07 +01:00
DineshKumar Kalva
21958f13cf dts: amd: acp_7_x: add TDM DAI and DMA device tree nodes
Add three TDM DAI instances (tdm_dai0/1/2) and one unified
acp_tdm_dma DMA controller node to the ACP 7.X device tree.

Update dma-channels default to 6 (2 per instance x 3 TDM
instances) in Kconfig.acp_tdm.

Signed-off-by: DineshKumar Kalva <DineshKumar.Kalva@amd.com>
Signed-off-by: Sneha Voona <sneha.voona@amd.com>
2026-07-13 10:21:57 +01:00
DineshKumar Kalva
dd529c2824 drivers: dma: amd: tdm: add ACP 7.X TDM DMA support
Extend the ACP TDM DMA driver for ACP 7.X:
- Include ACP 7.X chip headers (acp7x_fw_scratch_mem.h,
  acp7x_chip_offsets.h, acp7x_chip_reg.h).
- Update ACP_TDM1_FIFO_SIZE from 512 to 768 bytes
- Add ACP_PDM_2_Enable check in acp_pdm_streams_stopped() for
  ACP 7.X (2 PDM instances)
- Guard acp_sdw_all_streams_stopped() under CONFIG_SOC_ACP_7_0
  since ACP 7.X has no SDW logic implemented.
- Add acp_get_sample_len_from_frame_fmt() helper for 7.X
- Propagate frame_fmt from acp_tdm_context into dma_start for
  per-sample-length ITER/IRER configuration
- Default channel count changed from 8 to 6 (2 per TDM instance
  x 3 instances for ACP 7.X)

Signed-off-by: DineshKumar Kalva <DineshKumar.Kalva@amd.com>
Signed-off-by: Sneha Voona <sneha.voona@amd.com>
2026-07-13 10:21:57 +01:00
DineshKumar Kalva
46c81149a9 drivers: dai: amd: tdm: add ACP 7.X TDM DAI support
Extend the existing TDM DAI driver for ACP 7.X:
- Add tdm_dai.h header with shared struct definitions
  (dai_amd_tdm_params, acp_tdm_dai_config) and include guard
- Include ACP 7.X chip headers via #elif for CONFIG_SOC_ACP_7_X
- Add sample_format field to dai_amd_tdm_params for per-format
  clock configuration (16/24/32-bit slots)
- Configure tdm_lrclk_div_val/tdm_bclk_div_val per sample_format
  under CONFIG_SOC_ACP_7_X
- Use acp_tdm_frmt union for TXFRMT/RXFRMT register access

Signed-off-by: DineshKumar Kalva <DineshKumar.Kalva@amd.com>
Signed-off-by: Sneha Voona <sneha.voona@amd.com>
2026-07-13 10:21:57 +01:00
Aleksandrs Sevastjanovs
1f97fa9d32 drivers: display: ssd16xx: enable SSD1680 RAM ping-pong
SSD1680 supports RAM ping-pong for display mode 2 through the display
option register. Enable F[6] when switching to the partial refresh
profile so partial updates can use the controller's buffer swap behavior.

Expose this as a "ram-ping-pong-mode2" devicetree property on the
SSD1680-specific binding.

Signed-off-by: Aleksandrs Sevastjanovs <sevalks@gmail.com>
2026-07-13 09:49:22 +02:00
Allen Zhang
537f952b2f drivers: clock_control: nxp_mcxw7x: gate SIRC on DT sirc-supported
Replace the CONFIG_SOC_MCXW70AC / CONFIG_SOC_MCXW716C Kconfig guards
that conditionalize SIRC hardware access with a new DT boolean
property 'sirc-supported' on the nxp,mcxw7x-clock binding.

MCXW70 and MCXW71 carry the SIRC hardware block; MCXW72 (MCXW727C)
does not - its SIRCCSR register block was removed from the SDK
headers, making kCLOCK_ScgSircClk, CLOCK_UnlockSircControlStatusReg,
scg_sirc_config_t, kSCG_SircEnableInSleep and CLOCK_InitSirc
undefined at build time for frdm_mcxw72.

Set sirc-supported in the MCXW70 and MCXW71 clk_ctrl DT nodes.
Leave it absent on MCXW72 so DT_INST_PROP(0, sirc_supported)
evaluates to 0 at compile time, bypassing all three affected sites:
  - get_rate() FRO_6M: fall back to the fixed 6000000U constant
  - clock_control_init(): skip CLOCK_UnlockSircControlStatusReg()
  - clock_control_init(): skip the SIRC LP-mode init block,
    which also bypasses enable_sirc_in_lp_mode

Move enable-sirc-in-lp-mode out of nxp_mcxw7x_common.dtsi (where
it was incorrectly inherited by MCXW72) into the MCXW70/MCXW71
per-variant DTS nodes.

Tested: west build -p=always -b frdm_mcxw72 tests/lib/cpp/cxx
builds cleanly after this change.

Signed-off-by: Allen Zhang <chunfeng.zhang@nxp.com>
2026-07-13 09:46:57 +02:00
Sylvio Alves
4b1e696ed0 soc: espressif: fix undefined kconfig references
Zephyr driver and soc code referenced five CONFIG symbols that were
only declared in the hal module, so a compliance run without the
module in place flagged them as undefined.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-07-12 20:02:20 -04:00
Mathieu Choplain
b35b9456d4 drivers: usb: udc: stm32: use DT_ENUM_HAS_VALUE()
Replace IS_EQ() + DT_ENUM_IDX() with the simpler and more explicit
DT_ENUM_HAS_VALUE() macro.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-07-12 20:02:10 -04: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
Mathieu Choplain
e43da5f205 drivers: *: stm32: replace COND_CODE_1() with IF_ENABLED() when relevant
In some STM32 drivers, the COND_CODE_1() macro is used with an empty
expression as the `_else` expansion. The `IF_ENABLED()` macro should be
used in this situation since it allows simplifying the code, so perform
the replacement.

While at it, in `dsi_stm32.c`, fix leakage of empty expressions due to
misplaced `;` symbols (outside the block guarded by `IF_ENABLED()`).

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-07-12 20:02:10 -04:00
Fin Maaß
69268c3972 net: ethernet: add NET_L2_ETHERNET_EXTRA_TX_PKT_HEADROOM
add a Kconfig, that has to be selected by the
ethernet driver, when extra headroom on tx
is needed, that way we don't need to include that
code when only using NET_L2_ETHERNET_RESERVE_HEADER.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-07-12 20:01:40 -04:00
Flavio Ceolin
ef10214f20 crypto: ataes132a: Fix counter reg
Use shift operand instead of wrong boolean operator
to access (16) counter addresses [0xf100 - 0xf17f]
properly.

Signed-off-by: Flavio Ceolin <flavio@hubble.com>
2026-07-12 20:01:09 -04:00
Flavio Ceolin
bd2b24cd7a crypto: ataes132a: Fix zone config reg
Use shift operand instead of wrong boolean operator
to access (16) zone config addresses [0xf0d0 - 0xf0ff]
properly.

Signed-off-by: Flavio Ceolin <flavio@hubble.com>
2026-07-12 20:01:09 -04:00
Flavio Ceolin
d0e0dff28f crypto: ataes132a: Fix counter config reg
Use shift operand instead of wrong boolean operator
to access (16) counter config addresses [0xf060 - 0xf07f]
properly.

Signed-off-by: Flavio Ceolin <flavio@hubble.com>
2026-07-12 20:01:09 -04:00
Flavio Ceolin
583c64670e crypto: ataes132a: Remove unused field in device_data
All I2C access in crypto_ataes132a goes through
ataes132a_device_config.  The i2c field in ataes132a_device_data
field is never written or read.

Signed-off-by: Flavio Ceolin <flavio@hubble.com>
2026-07-12 20:01:09 -04:00
Flavio Ceolin
bf54b7c26e crypto: ataes132a: Fix key config reg
Table 14-1. ATAES132A Configuration Memory Map says
that key config spans from 0xf080 to 0xf0bf for a total of
16 keys. (0xF080 + (keyid < 2)) uses the boolean operator
instead of bit shift operator and produces values.

Signed-off-by: Flavio Ceolin <flavio@hubble.com>
2026-07-12 20:01:09 -04:00
Flavio Ceolin
dd705f51a8 crypto: ataes132a: Fix invalid bit mask
EncryptOK is represented by bits 1 and 2 and the proper
mask is (BIT(1) | BIT(2)) and not (BIT(1) & BIT(2)) that
evaluates always to 0b00.

Signed-off-by: Flavio Ceolin <flavio@hubble.com>
2026-07-12 20:01:09 -04:00
Flavio Ceolin
b0cab05152 crypto: ataes132a: Fix possible linkage error
Make static the function ataes132a_atmel_crc implemented in
the private header to avoid possible linkage error if the file
is inlcluded ina different object unit.

Signed-off-by: Flavio Ceolin <flavio@hubble.com>
2026-07-12 20:01:09 -04:00
CHEN Xing
c6da46432a drivers: gpio: mchp: sam_pio4: fix gpio_sam_port_toggle_bits()
Fix gpio_sam_port_toggle_bits() and gpio_sam_port_set_masked_raw()
PIO_MSKR need to be set before configure PIO_ODSR.

Signed-off-by: CHEN Xing <xing.chen@microchip.com>
2026-07-12 20:00:17 -04:00
Muhammad Waleed Badar
005ca62f3c drivers: pinctrl: bcm2711: add ngpios devicetree property
Add a required ngpios property to the BCM2711 pinctrl binding
and set it in the SoC dtsi. Update the driver to read the number
of GPIOs from devicetree via DT_INST_PROP.

This makes the GPIO count explicit in devicetree and avoids
hardcoded assumptions in the driver.

Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
2026-07-11 07:30:36 -04:00
Robert Lubos
3c37a5308a drivers: modem: nrf93m1: Fix setting custom APN
Update the modem script to activate the flight mode before setting the
APN (AT+CGDCONT), otherwise the APN is not configured properly in the
modem and network connection may fail.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2026-07-10 22:32:47 +02:00
Axel Le Bourhis
22ed52d7b0 drivers: clock_control: mcxw7x: fix OSC32K load cap and coarse gain
The MCXW7x clock controller configured the OSC32K 32 kHz crystal
oscillator with an 8 pF internal load capacitance (cap value 4) on
both the XTAL and EXTAL pins, and hardcoded the amplifier coarse
gain to Range0. This configuration leads to a clock precision issue
of around 180 ppm on the 32 kHz clock.

A 16 pF internal load capacitance is the best configuration to
achieve the best precision, together with a per-SoC coarse amplifier
gain. Fix the default configuration:
- Use a 16 pF internal load capacitance on XTAL and EXTAL.
- Add an osc32k-coarse-adjustment devicetree property so the coarse
  amplifier gain is configurable (the driver previously forced
  Range0), and wire it into the CCM32K oscillator config.
- Set the coarse gain per SoC: Range3 on MCXW72, Range1 on MCXW71.
  MCXW70 is aligned with MCXW72 (Range3).

Also add named dt-bindings macros for the OSC32K load capacitance
(MCXW_CLK_OSC32K_CAP_*pF, value N maps to 2*N pF) and coarse gain
(MCXW_CLK_OSC32K_COARSE_RANGE*) so the devicetree no longer relies
on opaque magic numbers.

Built samples/hello_world for frdm_mcxw70, frdm_mcxw71 and
frdm_mcxw72 and verified the generated devicetree resolves to 16 pF
caps with coarse gain Range3 (W70/W72) and Range1 (W71).

Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
2026-07-10 08:55:36 -05:00
Tim Pambor
7a620d9d87 ethernet: dwc_mac: do not discard pkts with dribbling error
Packets with dribbling error flag set but with valid CRC
should not be discarded, as they are valid.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2026-07-10 08:54:44 -05:00
Seppo Takalo
218e7c6c36 modem: ppp: fix init priority of PPP net device
For most cellular modem drivers, the PPP net device was
initialized at POST_KERNEL priority 98,
which is after net_if_init() runs at POST_KERNEL priority 90

After PR #112499 net_if_init() skips interfaces whose device is
not yet ready, so the PPP interface was never initialized
and cellular drivers failed to start.

Remove the _prio parameter from MODEM_DEV_PPP_DEFINE,
MODEM_DT_INST_PPP_DEFINE and MODEM_PPP_DEFINE, replacing the
hardcoded 98 with CONFIG_KERNEL_INIT_PRIORITY_DEFAULT (default
40). This matches the priority already used by drivers/net/ppp.c
and ensures the PPP device is ready before net_if_init() checks
it.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2026-07-10 08:54:04 -05:00
Laura Carlesso
dc3af391c5 drivers: flash: Correct secure/nonsecure alias for registers
The flash_controller node is defined using the non secure
alias regster. Add a macro to switch between the secure
and non secure one correctly.
Also properly call the serial_memory_setup function to
init the object.

Signed-off-by: Laura Carlesso <laura.carlesso@infineon.com>
2026-07-10 08:52:54 -05:00
Swift Tian
ed16d687b5 drivers: mspi: update compat string in device drivers
The compat string is updated in device drivers to align with
changes in binding files.
Added depends on $(dt_compat_on_bus,$(DT_COMPAT_[DEVICE]),mspi)
to device Kconfig.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2026-07-10 08:51:14 -05:00
Alain Volmat
7ed2272765 drivers: display: st: reverse supported event check
Change check for unsupported event registration in order to avoid
having to update the LTDC driver everytime a new event is added.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2026-07-10 11:31:27 +01:00
Paulo Santos
0c8a97eea1 modem: cellular: make the script failure limit configurable
The consecutive chat-script failure limit, after which the driver gives up
on the current attempt and suspends, was a hard-coded define. Move it to
Kconfig so it can be tuned per application.

Signed-off-by: Paulo Santos <pauloxrms@gmail.com>
2026-07-10 11:31:12 +01:00
Paulo Santos
6d237a3b47 modem: cellular: bound the recovery loop
Init-script and CMUX-connect failures both enter a recovery that resets or
power-cycles the modem and re-runs the full bring-up, with no attempt cap
and no delay between attempts. A persistently failing modem therefore loops
through hardware resets indefinitely, thrashing the power rails, while the
per-script failure path already caps and suspends.

Add a recovery state that backs off before resetting (delay grows per
attempt, up to a ceiling) and cap the consecutive attempts: once the budget
is exhausted the driver suspends to idle instead of resetting forever,
matching the script-failure behaviour. The counter resets when CMUX
reconnects. The attempt cap, backoff step and ceiling are Kconfig-tunable,
and a zero cap keeps unlimited retries.

Signed-off-by: Paulo Santos <pauloxrms@gmail.com>
2026-07-10 11:31:12 +01:00
Zafer SEN
972a9bdb87 drivers: modem: hl78xx: map send preparation errors to errno
Propagate prepare_send_cmd() failures through validate_and_prepare() as
socket-style errors.

When send command preparation fails, translate the returned error code to
errno and return -1 so the socket send path reports failures consistently
with the rest of the offload API.

Keep successful command preparation returning 0.

Signed-off-by: Zafer SEN <zafersn93@gmail.com>
2026-07-10 11:29:57 +01:00
Zafer SEN
8a2465784e drivers: modem: hl78xx: keep GNSS NMEA match data first
Move the generic GNSS NMEA match data to the start of the HL78XX GNSS
runtime structure.

The generic gnss_nmea0183_match_* callbacks cast user_data directly to
struct gnss_nmea0183_match_data, so the embedded match_data member must
be at offset zero in struct hl78xx_gnss_data.

Add a static assertion to catch future layout changes that would break
that assumption.

Signed-off-by: Zafer SEN <zafersn93@gmail.com>
2026-07-10 11:29:57 +01:00
Zafer SEN
eff6a791c5 drivers: modem: hl78xx: harden socket helper paths
Harden selected HL78XX socket helper paths.

Move IPv4/subnet splitting earlier in the socket implementation and
validate its inputs before copying. Reject NULL inputs, zero-sized output
buffers, empty address/subnet parts, and output buffers that are too
small instead of silently truncating the parsed values.

Add defensive checks before accessing offload socket state in
modem_process_handler(), socket_notify_data(), and KTCP notification
handling so invalid or incomplete state cannot be dereferenced.

Validate send command arguments before formatting TCP or UDP send
commands, and reject UDP sends without a destination address.

Require socket data notifications to include both socket ID and queued
byte count before parsing them.

Signed-off-by: Zafer SEN <zafersn93@gmail.com>
2026-07-10 11:29:57 +01:00
Zafer SEN
b6a71b0f25 drivers: modem: hl78xx: wake socket before applying deferred error
Wake socket waiters before marking a drained TCP socket as errored.

Some modem socket wait paths do not signal data-ready semaphores after a
socket has been marked disconnected. Notify the waiter while the socket
is still considered connected, then apply the deferred TCP error and
clear the pending error state.

This lets blocked receive paths wake up and observe the deferred socket
error instead of remaining asleep after the modem reports a remote
disconnect with no unread data left.

Signed-off-by: Zafer SEN <zafersn93@gmail.com>
2026-07-10 11:29:57 +01:00
Zafer SEN
06a8df1bcf drivers: modem: hl78xx: expose binary string conversion helper
Move `binary_str_to_byte()` outside the low-power configuration guard
since it is used independently of `CONFIG_MODEM_HL78XX_LOW_POWER_MODE`.

This allows the helper to be shared by code that is built regardless of
low-power support while keeping `byte_to_binary_str()` scoped to the
low-power configuration.

Signed-off-by: Zafer SEN <zafersn93@gmail.com>
2026-07-10 11:29:57 +01:00
Zafer SEN
7a7c76d553 drivers: modem: hl78xx: accept quoted CEREG timer fields
Handle quoted active time and periodic TAU fields when parsing CEREG
responses.

The modem reports PSM timer fields as quoted 8-bit strings, but the
driver stores the raw 8-bit value without quotes. Strip matching quotes
before validating and copying the timer field.

Update the CEREG unit test to pass modem-style quoted timer fields and
expect the normalized unquoted values in the cached registration state.

Signed-off-by: Zafer SEN <zafersn93@gmail.com>
2026-07-10 11:29:57 +01:00
Zafer SEN
9a8a459f28 drivers: modem: hl78xx: clarify CEREG parser argument handling
Rename the CEREG parser boolean from is_urc to has_n_param.

The parser needs to know whether argv contains the query response <n>
parameter before <stat>. Query responses use:

  +CEREG: <n>,<stat>,...

while URCs use:

  +CEREG: <stat>,...

Use has_n_param to describe the actual parsing decision and update the
caller to pass true when both <n> and <stat> are present.

This avoids treating the flag as a generic URC indicator and makes the
status field index calculation clearer.

Signed-off-by: Zafer SEN <zafersn93@gmail.com>
2026-07-10 11:29:57 +01:00
Zafer SEN
a430536c99 drivers: modem: hl78xx: reject overlong PLMN values
Reject PLMN strings that contain more digits than the parser can store.

Previously the parser stopped collecting digits when the local buffer was
full and continued scanning the rest of the string. This could allow an
overlong numeric operator value to be truncated and parsed as if it were
valid.

Return false as soon as the digit buffer would overflow so invalid
operator strings are rejected instead of silently truncated.

Signed-off-by: Zafer SEN <zafersn93@gmail.com>
2026-07-10 11:29:57 +01:00
Zafer SEN
32f730907c drivers: modem: hl78xx: avoid modem chat include in public API
Remove the modem chat header include from the public HL78XX API header.

The public API only needs to expose pointers to struct modem_chat_match,
so forward declare the type instead of pulling in
<zephyr/modem/chat.h>. This reduces the header dependency surface for
users of the HL78XX API.

Include <zephyr/modem/chat.h> directly in hl78xx_apis.c, where the full
modem chat definitions are needed.

Also keep the GNSS auxiliary data types and callback registration macros
available from the public API header instead of hiding them behind
CONFIG_HL78XX_GNSS_AUX_DATA_PARSER, so code can compile against the API
types regardless of that build option.

Signed-off-by: Zafer SEN <zafersn93@gmail.com>
2026-07-10 11:29:57 +01:00
Zafer SEN
e80e405158 drivers: modem: hl78xx: split auxiliary GNSS parsers
Move auxiliary GNSS NMEA parsing helpers into a dedicated parser module.

Add hl78xx_gnss_aux_parse.c and hl78xx_gnss_aux_parse.h for parsing GSA,
GST, and PSEPU argument lists into HL78XX auxiliary GNSS data. Keep UTC
and optional milli-unit parsing private to that module.

Leave modem chat callback handling in hl78xx_gnss_parsers.c, where the
callbacks can update runtime GNSS state and publish auxiliary data. This
keeps the parsing logic testable without coupling it to modem chat
callback flow.

Build the new auxiliary parser module when HL78XX GNSS support is
enabled.

Signed-off-by: Zafer SEN <zafersn93@gmail.com>
2026-07-10 11:29:57 +01:00
Zafer SEN
ab0c8578aa drivers: modem: hl78xx: split GNSSLOC parser helpers
Move GNSSLOC-specific parser helpers into a dedicated source file.

Create hl78xx_gnssloc.c and hl78xx_gnssloc.h for parsing GNSSLOC DMS
coordinates, values with units, speeds, and GPS time strings. Keep the
NMEA parser file focused on NMEA sentence callbacks and shared NMEA
helper logic.

Build the new GNSSLOC parser file when HL78XX GNSS support is enabled,
and include the new header from the existing GNSS parser implementation.
This also lets unit tests target the GNSSLOC helpers directly without
pulling in unrelated NMEA callback code.

Signed-off-by: Zafer SEN <zafersn93@gmail.com>
2026-07-10 11:29:57 +01:00
ZF Yu
0dc139a4e0 drivers: led_strip: ws2812_gpio: derive GPIO base from devicetree
send_buf uses NRF_GPIO as the GPIO controller base address.
NRF_GPIO is defined as NRF_P0 in sdk-hal_nordic/nrfx/mdk,
so with pins not belong to GPIO0,
it causes data to be sent to the wrong pin.
At compile time get the GPIO controller register address
from devicetree, and calculate the OUTSET base address
with struct NRF_GPIO_Type.
Tested on nRF52833 hardware.
Signed-off-by: ZF Yu <ez4y2f@icloud.com>
2026-07-10 11:29:23 +01:00
Raffael Rostagno
8bb855d2eb drivers: i2c: esp32: Fix recover and NACK detection
Call i2c HAL init after HW FSM reset so i2c_recover_bus() leaves
the controller ready for the next transfer on C5/C6/H2/P4. Return
-EIO on master ACK errors per Zephyr I2C API.

Fixes testcase errors on `tests/drivers/i2c/i2c_at24` for the above
mentioned devices.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2026-07-09 18:08:51 -04:00