Actually, the parameter is the number of bytes to read, not the number
of double words.
Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
The parsing of the number of bytes to read in the read command was being
done in hexadecimal, causing unexpected behavior.
Now the number can be interpreted in decimal or hexadecimal if prefixed
with 0x.
Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
This patch runs clang-format on the flash_shell.c file before the
real patch gets applied, otherwise the changes would be hard to
read.
Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
This option already depends on BT_PER_ADV_RSP being enabled, so we should
have a more reasonable default for it. This way e.g. the existing PAwR
sample app should work without additional changes.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
During configuration the base->ICR1 or base->ICR2 register is written
without an IRQ lock. This can result in unwanted side-effects if the status
bit isn't cleared, or the edge select still needs to be updated.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Check the return value of adxl372_set_op_mode() in
adxl372_submit_stream() and abort on error.
Fix CID: 516239
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Add a 'U' suffix to the interrupt status mask passed to
lan9250_write_sys_reg() to make the constant explicitly unsigned.
This avoids signed/unsigned ambiguity and addresses a SonarQube
static analysis warning.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
The lan9250_thread() function declares a local variable that may be
used without being initialized, triggering a -Wmaybe-uninitialized
warning when building with -Werror.
Initialize the variable at declaration to ensure deterministic
behavior and avoid build failures.
No functional change intended.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Several LAN9250 helper functions ignored return values from register
access and wait routines, potentially hiding SPI or timeout
failures.
Propagate error codes from read/write/wait helpers throughout the
driver so failures are detected and handled by callers.
This improves robustness and makes error conditions visible during
initialization, PHY access, RX/TX paths, and MAC configuration.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Set multiline on pixel pipes to 128 lines to limit slave IP hardware
handshakes and so reduce the number of interrupts received by slave IP.
Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
Log number of interrupts, including fuse interrupts at each
key frame and at the end of encoding.
Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
Fix wait of hardware encoding completion by using
interrupt signaling instead of polling on irq status.
Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
This adds optional clock control support to the spi_dw driver. The
support currently assumes that the clock control binding uses clkid for
the clock cell name.
Signed-off-by: Łukasz Kędziora <lkedziora@antmicro.com>
Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
Signed-off-by: Andreas Weissel <andreas.weissel@synaptics.com>
The ethernet DMA driver code was causing the silent dropping of packets
with length 125, 126 and 127. The root cause of the problem is that the
DMA engine performs an extra four bytes transfer corresponding to the
Receive Status Word. For those particular packet lengths, the previous
code incorrectly calculated the last fragment size.
The new code avoids that pitfall by decrementing the total frame size as
the fragments are being collected, while avoiding the creation of an
extra fragment on the extracted network packet.
Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
dai_dmic_probe() and dai_dmic_probe_wrapper() never reports errors
and always returns 0.
The error check at the call site is therefore dead code.
Make functions void and drop the unused error handling.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Under RTIO SPI behaves differently and thus FS26 didn't work and
would reset the board. This changes to add 8-bit transfer support
and doesn't lock the irq anymore since the SPI driver got changed.
Which would yield an assertion, best it ensure feed callee priority
is high enough.
Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
Add explicit clock configuration and enable calls during driver
initialization. The driver now attempts to configure the clock
subsystem before enabling it.
Note: -ENOSYS is temporarily ignored as not all clock control
drivers currently implement the configure API. This handling
should be removed once all clock drivers support configure.
Signed-off-by: Albort Xue <yao.xue@nxp.com>
EVDMA register access has been cleaned up to remove redundant macros.
EVDMA_PLAIN_DATA enum has also been added of value 0x3F which previously
had been assumed to be a masking of all the other values but isn't, it's
its own distinct value. Other enums still exist for future use.
Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
- add SDHC driver code to support both SDMMC and SDIO fucntion
- add SDHC dts node and Kconfig
- add clock configuration for SDHC
Signed-off-by: Kevin Chan <kevin.chan3@infineon.com>
In sensor_shell_stream.c, cmd_sensor_stream() checks for valid trigger
types, but it is missing SENSOR_TRIG_TIMER option.
Signed-off-by: Brandon Edmonds <bedmonds91@gmail.com>
- Add SPI driver for Microchip SERCOM g1
- Add and update Kconfig files to support the driver
- Update CMakeLists.txt to include the new driver
Signed-off-by: Mohamed Azhar <mohamed.azhar@microchip.com>
Modifies the CS40L5x driver to use the error callback mechanism
added to the haptics API instead of a device-specific API
extension.
Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
This patch just formats the uart_xmc4xxx.c file before the real
patch, otherwise the changes would be hard to read.
Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
The current PMS7003 sensor driver in Zephyr only supports reading the
basic PM1.0, PM2.5, and PM10 concentration values.
This update extends the driver to support additional data provided by the
PMS7003 sensor, including:
- Standard particle concentration values (CF=1) for PM1.0, PM2.5, and PM10
- Particle counts for particles greater than or equal to 0.3 µm, 0.5 µm,
1.0 µm, 2.5 µm, 5.0 µm, and 10.0 µm per 0.1 liter of air
Adding support for these readings allows applications to access more
detailed particulate data, improving the sensor’s usability in air quality
monitoring and analysis scenarios.
Signed-off-by: Hanan Arshad <hananarshad619@gmail.com>
Add clock control and UART support for PSOC 4 family:
- Clock control drivers with PSOC 4 compatibility
- PSOC4xx clock source bindings and definitions
- HF clock divider configuration support
- UART FIFO trigger level configuration for PSOC 4100S Max
series with 8-deep FIFO (RX trigger=7, TX trigger=0)
Signed-off-by: Braeden Lane <Braeden.Lane@infineon.com>
Extend RTC driver to handle STM32U3 series specifics:
- Include STM32U3X in condition where RTC Alarm event is not routed to EXTI
- Use LL_RCC_RTC_ClockEnable call for STM32U3 instead of LL_RCC_EnableRTC
- Adapt counter_stm32_rtc driver for STM32U3 clock and EXTI handling
Signed-off-by: Antoine Pradoux <antoine.pradoux@st.com>
The JESD216_DW15_QER_VAL_S2B1v5 case had incorrect status register
read/write logic. It was reading only SR2 but writing both SR1 and SR2,
which could corrupt SR1 if not read first.
Merge the S2B1v5 case with S2B1v1/v4 cases since they all set bit 1 of
SR2. Update the common path to properly handle both single-byte (SR2 only)
and two-byte (SR1+SR2) read/write operations by:
- Reading SR1 first when rd_size is 2, saving it temporarily
- Reading SR2 using the scratch command
- Combining both bytes with SR2 in the upper byte when needed
- Writing the combined value with the QE bit set
Remove the now-redundant S2B1v5-specific case and simplify the LUT
sequence to read SR2 directly instead of reading SR1 first.
Signed-off-by: Albort Xue <yao.xue@nxp.com>
Remove local Tx buffer allocated in the
bt_hci_stm32wba_send() function.
Get Event buffer resource to store data returned
by lower layer and provide it to Host in case of
Tx packet is an HCI Command type.
Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
When uart_rx_disable is called, or rx gets otherwise disabled,
UART_RX_DISABLED event should be emitted.
Signed-off-by: Miika Karanki <miika.karanki@vaisala.com>
uart_bcm2711_poll_in() incorrectly returned the received byte
instead of writing it to the provided buffer.
Update the implementation to store the character in *c and
return 0 on success, matching the UART poll_in API.
Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
Instead of reading calibration data (device-unique, but never changing!)
as part of each conversion, perform the read once and cache the value.
This notably avoids frequently an ICACHE disable/enable cycle on STM32H5,
which is a somewhat slow operation.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Using a union enables accessing the calibration data using member names
instead of an array index, which makes the code more readable.
As long as the layout of struct { T m1; ... T mN; } and array A[N] is the
same (implementation-specific?), usage of the union type as done should
be Standard-compliant: accessing through either member of the union will
use an lvalue with compatible type to the same underlying object, which
is one of the allowed aliasing situations listed in §6.5.7 of N1548.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Various fields were stored in the instance data despite being initialized
at compile-time to a constant value.
Move these fields to the instance configuration instead.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The raw "12" constant was used in a place where the "CAL_RES" define should
have been used instead.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
When no trigger was chosen case statement fell through to
default which causes the return code to -ENOTSUPP
Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>