If CONFIG_GPIO_NRFX_INTERRUPT is disabled then nrfx_gpiote driver API
shall no be accessed at all (driver can be disabled).
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Adds a Kconfig option to detect if checksum offloading
is supported by any driver and one to activate it.
Main benefit is that `net_if_need_calc_rx_checksum()` and
`net_if_need_calc_tx_checksum()` are now inline and therefore the
compiler can optimize more, when checksum offloading is not supported.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Remove the unconditional `conn_mgr_if_used` call on data reception.
Receiving data ends up being a poor metric for "interface in use" in
many situations. This is especially the case when connected to networks
with broadcast packets that are not necessarily relevant for us, such as
ARP discovery requests.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Use micro-units when converting readings to struct sensor_value.
The previous implementation used 100000-based scaling for fractional
values, while sensor_value expects 10^-6 units. As a result, converted
magnetic field values were reported as 10x the expected gauss value
instead of gauss, and the incorrect scaling caused apparent jumps in
the reported sensor readings.
Fix the conversions by using 1000000-based scaling and
sensor_value_from_micro().
Signed-off-by: Bernhard Reiter <bernhard.reiter@swarovskioptik.com>
Extend the PWM API with optional API functions for enabling DMA requests
Possible solution for #88670
Signed-off-by: Vincent Surkijn <vincent.surkijn@siemens.com>
Update the dwmac_stm32h7x ethernet driver to use the same default
MAC address as the STM32 HAL driver.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Change return value of dwmac_platform_init to int and return error code
in case of failure. This allows to report errors from platform init and
fail the driver probe if platform init fails.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Infineon PSOC4 parts share many ports with a single IRQ line. Using the
SHARED_INTERRUPT handler feature of Zephyr results in a very large IRQ
vector table. Instead structure in DT the idea that the ports are
sharing an interrupt with a sort of pseudo interrupt controller.
This also rectifies the need to ifdef on CAT1C/M0+. I added a note
making it clear that in those cases we likely need to rework the way
interrupts are done anyways as there's secondary interrupt
muxes/controllers involved.
Signed-off-by: Tom Burdick <thomas.burdick@infineon.com>
Use IF_ENABLED when possible to keep code indents looking nicer rather
than ifdef's. Rename everything to be ifx (drop the cat1 naming). Drops
the unused intc_prio config member.
Signed-off-by: Tom Burdick <thomas.burdick@infineon.com>
Per MIPI I3C spec Table 38, RSTACT defining bytes >= 0x80 are only
valid for get operations (Format 3). Reject attempts to use them with
set (Format 2) early with -EINVAL rather than sending an invalid CCC
on the bus.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
The reattach command takes <device> <target> [<old_dyn_addr>], so the
optional old dynamic address is argv[3], not argv[2]. The check also
used argc > 2 which is always true since the minimum argc is 3.
This caused the target device name string to be parsed as a hex
address via strtol, resulting in incorrect old_dyn_addr values.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
i3c_read_to_buffer printed the controller device name (s_dev_name)
instead of the target device name (s_tdev_name) when the target
device lookup failed.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
cmd_i3c_ibi_hj_response used device_get_binding() while every other
function in the file uses shell_device_get_binding(). Use the correct
shell variant for consistent device lookup semantics.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
The cancel-and-wait loop uses `while (retry_count--)` with a post-loop
check of `retry_count == 0`. This is broken in two ways:
1. When all retries are exhausted, the final post-decrement wraps the
uint32_t from 0 to UINT32_MAX, so the timeout check never fires and
the error is silently ignored.
2. When the controller goes idle on the last retry, retry_count is
legitimately 0 after the break, causing a false timeout report.
Replace with a simple for-loop and a bool flag to correctly distinguish
between the idle and timeout cases.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
CONF_STATUS1_IBI_DEPTH extracts bits [12:10] from the CONF_STATUS1
register, but cfg0 (CONF_STATUS0) was being passed instead of cfg1.
This resulted in reading the wrong bits and computing an incorrect
IBI FIFO depth.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
The IBIR depth field occupies bits [7:6], a 2-bit field, but was
right-shifted by 7 instead of 6. This lost the lower bit of the
field, causing incorrect IBIR FIFO depth calculation for half of
the possible hardware configurations.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
The DDR preamble macros were missing parentheses around the shift
expressions. Without them, using these in bitwise OR expressions
produces wrong results due to C operator precedence, since | binds
tighter than <<.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
CMD1_FIFO_DB masked bits [15:8] then shifted left by 8, which always
produced zero when the input is a byte value (0-255) since bits [15:8]
are zero for a uint8_t. The defining byte field is at bits [15:8] of
the command word.
Use FIELD_PREP with the correct field mask to place the defining byte
in the right position.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
The #endif comments for CONFIG_I3C_CONTROLLER and
CONFIG_I3C_TARGET were swapped, and the outermost #endif
was missing its CONFIG_I3C_USE_IBI comment.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
Add missing parentheses around macro parameter `m` in
REV_ID_VERSION to prevent operator precedence issues when
a complex expression is passed.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
Add driver support for NXP MCUX Quadrature Decoder (QDC) sensor.
The driver provides:
- Position tracking via SENSOR_CHAN_ROTATION channel
- Configurable counts per revolution
- Single phase and normal decoder work modes
- Input filtering with configurable count and sample period
- INPUTMUX integration for flexible signal routing
- Modulo count mode support
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
There are many lm75 variants differing in temperature resolution.
Typical values are 9, 10, 11, and 12 bit. They all use the same
format (16 bit signed integer with LSB at 1/256 degree C).
Depending on the on the actual variant some of the LSB are not
defined. The new calculation scheme uses all 16 bits independent
on the actual sensor resolution. In the worst this leads to
some pseudo-resolution in case the undefined bits are not
reported as 0 by the sensor.
Signed-off-by: Lutz Dittrich <dittrich@netwake.com>
The parameter page is not ECC protected, but can return ECC errors under
some conditions. These errors should be ignored so drivers can
initialize.
Signed-off-by: Atilla Filiz <atilla@fi-tech.be>
SDK 1.0.0's GCC compiler flags a warning about 'cfg' being used without
being set. The compiler is wrong, but let's assign the variable to NULL
to avoid the warning.
Signed-off-by: Keith Packard <keithp@keithp.com>
Add an entropy driver for Bouffalo Lab BL70X that reads
random data from the SEC TRNG block and wires it into
Zephyr's entropy API.
Signed-off-by: William Markezana <william.markezana@gmail.com>
Add the support of DBI bus color coding configuration, also
pass down height/width/pitch of the frmae buffer descriptor
during frame update. Some DBI controller may need this configuration.
Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
Fixes the counter running after initialization and the counter running
after calling counter_set_top_value, regardless of previous state.
Also adjusts the tests.
Signed-off-by: Jan Behrens <jan.behrens@navimatix.de>
Add software state check (!data->wdt_started) to wdt_feed() validation
to ensure feed operations are only allowed after wdt_setup() has been
called.
Signed-off-by: Harini T <harini.t@amd.com>
Add systimer compensation for time spent in light sleep while stalled.
Add sys_clock_idle_exit() for dticks announcement when leaving
light sleep.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
Add support for the Sony IMX219 CSI sensor.
This sensor supports resolution of 3280x2464 in RGGB bayer format
either 8 or 10 bits and using 2 or 4 CSI lanes.
Only 10 bits on 2 CSI lanes is currently supported, and only in
1920x1080 pixel resolution using cropping using the video_set_format(),
and will need to be converted to video_set_selection() instead.
Signed-off-by: Josuah Demangeon <me@josuah.net>
Co-authored-by: Alan Shaju <alanshaju@rideltech.com>
Co-authored-by: Alain Volmat <alain.volmat@foss.st.com>
Switch to zephyr-keep-sorted-start/stop to keep checking the new
driver imports are always sorted, which reduces chances of git
conflict while adding new drivers from separate branches.
Signed-off-by: Josuah Demangeon <me@josuah.net>
Only VIDEO_CID_ANALOGUE_GAIN and VIDEO_CID_GAIN were defined. Also add
the complementary VIDEO_CID_DIGITAL_GAIN.
Signed-off-by: Josuah Demangeon <me@josuah.net>
MRAM programs via direct memory-mapped writes, which the ARM MPU
blocks unless MPU_ALLOW_FLASH_WRITE is enabled. Fixes a Data Access
Violation on ra8x2 when running the flash common test suite.
Signed-off-by: Khai Cao <khai.cao.xk@renesas.com>
Set register bit GMAC_NCFGR.GBE to configure GMAC for 1000Mbps operation.
Gigabit mode is not supported by SAM E70/S70/V70/V71 family, it is
supported by SAMA7G54.
Signed-off-by: Tony Han <tony.han@microchip.com>
When IPED encryption is enabled, AHB-mapped reads can hang.
Switch flash_flexspi_nor_read() to use FlexSPI IP read
transactions and handle unaligned requests with aligned
chunk reads plus memcpy to the caller buffer.
This removes the SoC-specific workaround and avoids
hangs in encrypted regions.
Signed-off-by: Albort Xue <yao.xue@nxp.com>