This addresses the coverity issue ID 363724.
This issue seems to have been a false positive, but the root complaint
from coverity was that within the callstack of ENET_Up, some functions
use the buffer config pointer as an array, whereas in the zephyr driver
it is declared as a singleton. Address it by redeclaring this as an
array of size 1 instead of a singleton.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
This commit fixes coverity issue 392512.
The issue was that the return value of clock_control_on was not being
checked. Fix by checking the return value.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
This commit should deal with
fixing the way USB_MCTLR_REG
is zeroed in order to disable
the USB controller along with
its tranceiver.
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
Update rx and tx ready function as per of its description.
For tx_ready if tx interrupt enabled AND tx fifo is not full
For rx_ready if rx interrupt enalbed AND rx fifo not empty
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
For each of the fdtable.h functions listed below, convert the
z_ prefixed semi-private functions to use the zvfs_ prefix.
ZVFS stands for Zephyr Virtual File System and
is intended to be a common library used by the C library,
POSIX API, Networking, Filesystem, and other areas.
There are already a few functions in fdtable.h that use the
zvfs_ prefix, so this change is mostly about unifying them in
a way that uses a suitable prefix ("namespace") so that it can
be considered a public API.
- z_alloc_fd
- z_fdtable_call_ioctl
- z_finalize_fd
- z_finalize_typed_fd
- z_free_fd
- z_get_fd_obj
- z_get_fd_obj_and_vtable
- z_get_obj_lock_and_cond
- z_reserve_fd
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
As pointed out on #57586: `LM75_TRIGGER_GLOBAL_THREAD` can't be enabled
without the int-gpios being present in the DTS node. This commit
requires at least one LM75 instance featuring it, otherwise it won't
work.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
The supported modems don't have the same number or assignment
of DLCI channels. For example, the NRF91_SLM only has DLCI
channel 3 assigned to GNSS tunneling, where the ublox sara r5
has DLCI 3 assigned to an additional AT channel, and DLCI 4
assigned to GNSS tunneling.
This commit updates the creation and assignment of DLCI
channels and pipelinks to match the capabilties of each modem.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
There was an error in calculation of LFXO INTCAP code that prevented
obtaining desired XTAL accuracy below 50PPM. The error was fixed
the accuracy should be within expected range.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Fix a build warning due to the enumerate for the trigger
polarity possibly being (from the point of the compiler)
also GPIO_INT_TRIG_WAKE.
We fix it by simply returning a not valid argument error
which is what most other drivers do if they do something
smart enough.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Burst mode enabled on an unused channel causes a freeze during a
conversion consisting of several channels (not including the one with
burst mode enabled).
Discovered on nRF52832 (nRF52-DK) using the following approach:
channels 0-3 are used for application purposes as a sequence
channel 4 is used for battery measurements with oversampling
After few successful conversions the sequence (channels 0-3) freezes the
thread while waiting for semaphore to end the conversion.
Signed-off-by: Maksim Salau <maksim.salau@gmail.com>
In i3c_ccc_do_getcaps(), there is a missing break statement
in the switch case for GETCAPS_FORMAT_2_CRCAPS. Add it.
Fixes#74764
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
When external PHY has crystal, ESP32 can be configured
to use custom GPIO as clock source for it. However, due to
latest clock subsystem and hal updates, current driver
fails to build and blocks its usage.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Both MDIO and Ethernet drivers share the same clock subsystem.
After clock control update in #73807, clock_control_on()
now returns -EALREADY for already initialized clock subsystem.
As a result, ethernet driver won't initialize as needed.
Fixes#74440
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Replace DIV_ROUND_CLOSEST() with a normal division to simplify
operation and avoid redundant handling of signed integer rounding
as the temp value is an unsigned value. The temp value is in nano
precision, so rounding is largely inconsequencial anyway compared
to the comparatively low precision sync prescaler.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Adding the support of the memoryMapped mode
to the flash_stm32_xspi driver through the CONFIG_STM32_MEMMAP
That will allow XiP from the external octo_flash
Erase and Write operation must Abort operations.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Move OA-related TX and RX buffers out from the device data.
Don't define the buffers without the `spi-oa` property. That
saves ~32KB when using generic spi protocol.
Rearrange device data fields to reduce byte holes found with
Pahole.
Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
Added force unblock psoc6 bless rx thread to process controller
events (at the end of psoc6_bless_send function)
Internal case: SWINTEGRAT-1767
Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
This commit should deal with fixing
various issues on the board's dts
overlay files:
1. PSRAM node was not enabled when
display buffers were stored in
psram and thus, raising linker
error (overflow memory section).
2. Remove MIPI DBI read operations
for the MIPI DBI driver. This is
because not all drivers support
read and most of the cases it does
not have any practical usage.
In addition, this might trigger
conflicts with SPI sensors.
If needed, users should explicitly
enable read operations by defining
an SPI device taking into consideration
conflicts with SPI devices connected
to the SPI bus.
3. Remove enabling the DMA driver.
It should be enabled by default.
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
This commit should deal with updating
the way USBD was handling the DMA
engine. Based on the #73803 request
DMA should be handled via the DMA
driver API class and not directly.
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
This commit should deal with fixing
the pending length value returned
upon requesting the status of a channel.
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
Erasing rram is very similar to partial erase on flash.
So we should use the same multiplier as there, 1.5.
0.1 multipler is way to low and was causing timeouts.
Signed-off-by: Martin Tverdal <martin.tverdal@nordicsemi.no>
After enabling interrupts, serial_esp32_usb_irq_tx_enable() calls the
interrupt handler to handle any old events that occurred while interrupts
were disabled. However, this happens in the callers context, so if an
interrupt arrives during the call, it will call the interrupt handler again
resulting in corruption if the interrupt handler is not reentrant.
Fixes#74569
Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
Problem:
re-plug USB (e.g cy8cproto_062_4343w kit) can cause that
CY43xx device become unresponsive (cy8cproto_062_4343w).
As result we catch ASSERTION FAIL (timeout) on HCI_Reset command.
Fix: added delay (BT_POWER_CBUCK_DISCHARGE_TIME_MS) to be sure
that BT CBUCK regulator to discharge.
Tested on:
cy8cproto_062_4343w, cy8ckit_062s2_ai and cy8ckit_062s2_43012 kits.
Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
Kconfig options in those drivers are visible and selectable
to any board/soc when it should not. This makes sure both
depends on proper family.
Fixes#74347
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Bits in the BBRAM status register (BKUP_STS) are write-1-to-clear bits.
The current driver writes 0 to clear those bits, which is incorrect.
Fix it in this commit.
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
According to the nrfx peripheral resource sharing example in
samples/boards/nrf/nrfx_prs it should be possible to share a resource
and apply the pins on peripheral that share resource ID.
However the sample only works since it only demonstrates UART and SPIM,
and by enabling both another SPIM driver, and UART is enabled for the
console. It would not be possible to enable a TWIM driver in addition.
Instead allow the PSELs if the configuration for NRFX has been enabled.
Signed-off-by: Joakim Andersson <joerchan@gmail.com>
Some functions in the bmm150 driver were depending on a define
that was never used. Changed it to the one that is actually defined.
Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
Confirming the Proximity Integration is an integer, we don't need to
pre-apply the Scaling factor to then be accounted for when the actual
meas_timeout_us is calculated.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Coverity found this legitimate issue: the datasheet specifies PS_IT
being 2-bits long (1, 2, 4, 8) and this driver assumes more steps are
available. Remove extraneous fields so the Proximity integration
setting fits in the expected 16-bit value.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
drivers/serial/uart_async_to_irq.c: In function 'get_rx_timeout':
drivers/serial/uart_async_to_irq.c:51:26:
warning: 'cfg.baudrate' may be used uninitialized
51 | baudrate = cfg.baudrate;
| ~~~~~~~~~^~~~~~~~~~~~~~
drivers/serial/uart_async_to_irq.c:45:28: note: 'cfg' declared here
45 | struct uart_config cfg;
Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
Renesas RA ICU driver requires to generate ISR tables.
Adding `select GEN_ISR_TABLES` to force enable it.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
i3c config need has i2x/i3c baudrate configured first.
so in i3c init we shall set the baudrate first
fixing: #65153
Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
When getting gpio info for a specific device with no line
names, invalid memory was accessed.
The check for the length of the line name array has been
corrected to avoid this.
Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
The unreset of ACE PDM controllers is moved to beginning of
void dai_dmic_start() and done side-by-side. This change is done
for adhering to recommended hardware initialization flow to
avoid intermittent failures on ARL-S.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch removes the traces printed inside spinlock protected
code. The DMIC capture start code is timing critical. Traces
leave an unknown delay into start sequence, so it's better to not
produce them.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The dai_dmic_update_bits() function is used in start trigger
code dai_dmic_start() and in capture runtime to control DMIC
IP in unmute sequence. Especially the start sequence is timing
critical so it's better not produce additional delay in this
function.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
When device was resumed from sleep OUT endpoints were most
likely not enabled due to condition that checked pending transfer.
Configured OUT endpoints should be enabled (ready for RX)
if they were enabled by interfaces.
Now separate bit field enabled is added and check to
see if OUT endpoint should be ready for reception after
sleep is done.
Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
Callback with USB_DC_EP_DATA_OUT was called directly from
interrupt handler (handle_ep0_rx()) while rest of the interrupt
conditions were not checked yet.
Some interfaces started next transfer directly from this callback
resulting in case where TX endpoint was still marked as busy
and transfer was eventually abandoned.
Now message is sent from all affected endpoints after every USB
pending interrupt is handled.
Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>