Previously both temperature and pressure were updated regardless of
which one was requested.
Fixes CID: 392519, GH: 74779.
Fixes CID: 392497, GH: 74777.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
During initialization, zero is returned if an unexpected device ID is
read because the returned variable is not written to after a previous
non-zero check. Return -EIO instead to indicate an error occurred.
Detected with the following Coccinelle script:
@@
identifier I;
@@
*if (I) {
...
return ...;
}
if (...) {
... when != I
when any
* return I;
}
Signed-off-by: Jared Kangas <kangas.jd@gmail.com>
In case where the system is overloaded, net stack buffer
could fail to allocate next packet. That scenario requires
wifi internal Wi-Fi driver to free current rx buffer. This is
currently not being called. This fixes it by making sure
esp_wifi_internal_free_rx_buffer() is called in all scenarios.
Fixes#63043
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Converts the `<inf> i2c_ll_stm32_v2: I2C TIMING` message
displayed by the driver to a LOG_DBG. Also makes an actual
error message a LOG_ERR instead of a LOG_DBG.
Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
RTIO expects the CHAINED flag to be set when ordering of operations is
important. The callbacks in the icm42688 stream handling were not
chained into, meaning the callbacks would have occured immediately
rather than *after* the SPI reads/writes.
Update all the spi transactions to chain into the desired callbacks in
the driver.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Updated nxp lpadc driver, because the phandle type property
'nxp,reference-supply' was removed, and a new phandle-array
type property 'nxp,references' added.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
When CONFIG_NET_STATISTICS=y is enabled, build fails
due to wrong interface pointer.
Fixes#75515
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Fixes: #75390
A wrong bit mask (wrong: IOMUXC_SW_PAD_CTL_PAD_PUS_MASK = 0x8) was used.
That bit mask is for PUE/PUS-type gpio registers, but this is the
section for registers with alternative PULL (PDRV) type layout.
Right bit mask: IOMUXC_SW_PAD_CTL_PAD_PULL_MASK
Signed-off-by: Nils Larsen <nils.larsen@posteo.de>
Don't zero initialise the static data structure, as statics are
explicitly initialised to 0 per the C standard, and checkpatch normally
complains about the pattern.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Return the documented error if `wdt_install_timeout` is called after
`wdt_setup`, instead of triggering the state assertion inside of
`nrfx_wdt_channel_alloc`.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Return an error code if `wdt_feed` is called before `wdt_setup`, instead
of triggering the state assertion inside of `nrfx_wdt_channel_feed`.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Target SSID buffer might not be NULL terminated, so use memcpy() instead of
strncpy() for copying it from temporary (AT response fragment) buffer.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
Close file descriptor returned by accept() in error path of
nsos_adapt_accept(), so that file descriptor is not leaked.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
This commit fixes a bug with the declaration of the Kconfig option
MEMC_STM32.
The option is defined in two files:
- `drivers/memc/Kconfig.stm32`, wich depends on
- `MEMC`
- `DT_HAS_ST_STM32_FMC_ENABLED`
-`soc/st/stm32/Kconfig.defconfig`, wich depends on
- `MEMC`
- `SOC_FAMILY_STM32`
So, if you have `CONFIG_MEMC=y` in your Kconfig options and you are on a
STM32 SoC, `CONFIG_MEMC_STM32` will be enabled, even if there is no
STM32 FMC enabled.
This Kconfig option causes the driver for the STM32 FMC to be compiled,
regardless of the presence of an enabled node for the FMC.
However, the driver fails to compile if there is no FMC node in the
devicetree. So, if you compile a project with `CONFIG_MEMC=y` on a board
with an STM32 SoC and no enabled FMC, the build will fail.
This commit deletes the Kconfig declaration in the `Kconfig.defconfig`,
as it isn't useful and is the one provoking the bug.
It also add in the `Kconfig.stm32` the compatible `st,stm32h7-fmc`, wich
use the same driver and so need to be enabled by the same Kconfig
option.
Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
The top-level driver comment states that a uint16_t is used to store
changes if the EEPROM size is smaller than 64kB, or uint32_t otherwise.
However, the 64kB threshold is represented as 2^16 in the actual code,
which is a bitwise XOR instead of an exponent. This causes a uint16_t
to be used only if the size is less than or equal to 18 bytes. Correct
this by using KB(64) instead of 2^16.
Signed-off-by: Jared Kangas <kangas.jd@gmail.com>
Solves two identical issues listed below:
Issue 1: I2C scanner example for DesignWare hardware gets stuck
indefenitely resulting in system hang up.This is because DW I2C driver
does not handle 0 byte transfer correctly which is the case for I2C
scan example.
Fixed it by overwriting the msg length to 1 if it is 0 and the
buffer is not NULL.
Issue 2: Similarly, if the I2C pins are not pulled up (nothing connected
to I2C pins), the DW hardware does not actually send the data
(assuming contention on the bus) hence not releasing the semaphore
resulting in calling thread waiting forever.
Fixed it by adding a timeout to k_sem_take call and return error if
cannot successfully acquire it.
Tested scenarios where nothing was connected on the bus and saw the
I2C scan example complete the whole scan command. Then connected
two different sensors on the I2C bus and saw both the address on the
console. Tested both the uses cases on Raspberry Pi Pico.
Fixes#70332.
Found that micropython tackles the same issue by implementing I2C scan
commands with Soft I2C because the same reason mentioned in Issue 1.
Signed-off-by: Dev Joshi <quic_devbhave@quicinc.com>
Fix ism330dhcx_gyro_fs_map[] and ism330dhcx_gyro_fs_sens[] arrays
initialization in order to be able to correctly convert from dps
to register raw value through the array index.
Fix: #72617
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Loop inside the odr array until we find the first
value which is "<=" (amd not "==") the argument.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
- Defined 'api_configure' function outside of
'CONFIG_UART_USE_RUNTIME_CONFIGURE' macro because it is the only
configuration function and used in device initialization function.
- Removed unnecessary 'IF_ENABLED' part.
Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
There are 2-level switch statements (one switch inside another) which were
not properly terminated with 'break' statements, leading to implicit
fallthrough. Fix that.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
Issue:
When there are two similar SSIDs (e.g. MySSID and MySSID_Guest),
the current implementation may use the wrong (truncated) SSID
for the connection. See issue#74910 for details.
Fix:
Updated airoc_wifi_scan_cb_search to filter all SSID where
length is different than the user-entered SSID.
Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
During channel reads, zero is returned on CRC mismatches: the returned
error variable is not written to after a previous non-zero check. Return
-EIO to mirror other drivers' checksum validation behaviors.
Signed-off-by: Jared Kangas <kangas.jd@gmail.com>
Seems like not all stm32 devices define USBD_HS_SPEED in the HAL, only
check for USBD_HS_SPEED if defined. Fixes a build failure with the new
stack on F1 MCUs.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
In fixed-link mode, mdio remains unconfigured. This results in a null
pointer dereference, triggering a bus fault
Signed-off-by: Benjamin Bigler <benjamin.bigler@securiton.ch>
A function, such as CDC ECM, can set the ZLP flag to handle a
class-specific protocol. This is not to be confused with the ZLP role in
control transfers.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
For STM32H7, U5 and WBA, check the LDORDY bit of the ADC ISR register
after enabling the internal regulator. This method is safer than the
delay.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
As of recent update of stm32f7 HAL to cube version V1.17.2
the workaround for misspelled HAL_ETH_PTP_CONFIGURATED macro
is not needed anymore, and causes PTP support to fail to compile.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The KBS_KSOH1 register contains both keyboard and GPIO output settings.
Not all bits are for the keyboard will be driven, so a critical section
is needed to prevent race conditions.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Setting the number of memory wait cycles must take place while the clock
is set to 32MHz or less. This patch ensure the MEMWAIT register is
changed before the clock is changed from its default value (of 8MHz).
Note that in order to set MEMWAIT to 1 the power control mode must be
set to high speed (which is why the lines of code interacting with the
OPCCR register have also been moved).
Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
Instead of mixing floats and doubles, convert the code to
use double so that we avoid float->double conversion warning
from compiler.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
This commit catch the return code of the spi_config function and
early returns on error so that high level spi transfer api gets
the error too.
Signed-off-by: Adrien MARTIN <adrienmar@kickmaker.net>
Add CANXL MRU handler, use the same RX, TX IRQ number.
Update the error priority that is lower priority than
the the tx_rx_mru priority incase the error interrupt
happens continuously, mru interrupt priority must be
higher to get report error counter. Otherwise the mru
interrupt can be delayed by error interrupt and
never call to MRU handler. This fixes#75022.
Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>