Fix compilation error when reset-gpios is enabled.
Undefined reference to dev_cfg variable.
Reset gpio duration needs to be defined, but is not in binding file.
Signed-off-by: Joakim Andersson <joerchan@gmail.com>
Use some new kernel features to make the experience of finding and
dealing with GPIO devices much more ergonomic by allowing the use of
devicetree node labels to identify GPIO devices by default.
Users who wish to avoid the associated footprint penalty can set
CONFIG_DEVICE_DT_METADATA=n by hand, but I think the convenience is
worth the price as a default. If we're running a shell, then we've
already paid a heavy footprint penalty.
Example output for qemu_cortex_m3:
uart:~$ gpio devices
Device Other names
gpio@40004000 gpio0
gpio@40005000 gpio1
gpio@40006000 gpio2
gpio@40007000 gpio3
gpio@40024000 gpio4
gpio@40025000 gpio5
gpio@40026000 gpio6
Signed-off-by: Martí Bolívar <mbolivar@amperecomputing.com>
Release buffer allocated in dwc2_ctrl_feed_dout() on endpoint deactivate
to prevent the buffer from leaking on USB stack disable.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
This change marks each instance of the `gnss_xxx_config` and
`gnss_driver_api` as `const`.
By using `const`, we ensure immutability, leading to usage of only
`.rodata` and a reduction in the `.data` area.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Change the get_config API for the stm32 I2C V2 driver.
It will also return the value of the content of TIMING register
for the I2C V2 bus.
This is hold by a i2c_config_timing structure of the device data
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Define Macro to fix the compliance check warning :
"DEEP_INDENTATION: Too many leading tabs - consider code refactoring
in the i2c_compute_scll_sclh() function
in the i2c_compute_presc_scldel_sdadel() function
Signed-off-by: Francois Ramu <francois.ramu@st.com>
This PR is implementing a new formula to calculate the I2C timing
value from the I2C clock source and the bit rate.
This is done under flag CONFIG_I2C_STM32_V2_TIMING.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
According to the Zephyr documentation, the number of bytes available
for read should be returned if the input data and length parameters are
NULL and zero, respectively. This commit corrects this behavior.
Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
Since the fifo control register and ready bit are checked in ISR
function, this commit locks IRQ when accessing these registers to
prevent racing conditions.
Tested with: Google spikyrock project
Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
This commit addresses some issues during the extended endpoint(ep
number is larger than 4) access. There are enable and ready bits for
each endpoint on the IT82xx2 chip. The transaction completion should be
determined by the ready and enable bits of the corresponding endpoint.
Additioinally, for non-control endpoint, the FIFO control register is
selected before writing data and cleared when the IN transaction is
completed. When an IN token interrupts, the FIFO control register
should be checked if it's selected to prevent fake tokens.
Tested with: Google spikyrock project
Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
Adds get_status API for clock_stm32_ll_u5 driver
Signed-off-by: Adam Berlinger <adam.berlinger@st.com>
Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
Make sure to feed control OUT endpoint with at least 8 bytes buffer to
make it possible to always receive SETUP data. This solves the assertion
failure in net_buf_add() called inside dwc2_handle_evt_setup() when a
host decides to start new control transfer immediately after it has
issued control transfer with Data Stage from host to device with wLength
less than 8.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Set RTS/CTS flow control pins as NC in cyhal
UART object so cyhal will skip to try initialize
those pins.
Initialization of RTS/CTS is done via
PINCNTRL driver.
Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
If an immediate return on error is used, an additional result check in
sample_fetch can be neglected. Since they are now treated as errors,
also changed logging type.
Signed-off-by: Juliane Schulze <juliane.schulze@deveritec.com>
Remove unused includes and gpio pins from st7796s driver, which were
leftover from before this driver used the MIPI DBI API class.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Replace CONFIG_ESPI_SLAVE by CONFIG_ESPI_TARGET
Replace CONFIG_ESPI_SAF by CONFIG_ESPI_TAF
Replace ESPI_BUS_SAF_NOTIFICATION with ESPI_TAF_BUS_NOTIFICATION in API
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
Removed the unnecessary initialization of the `ret` variable in
`gpio_stm32_clock_request` where its value is guaranteed to be
overwritten by subsequent operations, then simply returned `ret`.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Introduced `GPIO_DEVICE_INIT_STM32_IF_OKAY` which utilizes `COND_CODE_1`
to reduce the chain of #if DT_NODE_HAS_STATUS(...) #endif
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
My students are using a disco_l475_iot1 board with HTS221 sensor.
When logging is enabled, the following log message is always emitted:
"HTS221: Cannot enable trigger without drdy-gpios"
This message is confusing to my students as they are not using the
HTS221 sensor in their projects. However since HTS221 is enabled in
the devicetree it gets initialized on boot and the log message
appears.
It doesn't seem necessary to tell people that they haven't enabled
CONFIG_HTS221_TRIGGER at log level INF. I'd be amenable to changing
this to LOG_DBG, but I don't think it needs to exist at all.
Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
Convert the slz_hci.c HCI driver to use the new HCI driver API. This also
fixes the HCI bus type to correctly indicate VIRTUAL instead of UART.
Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
Convert the hci_nxp.c HCI driver to use the new HCI driver API. Also move
the driver binding under dts/bindings/bluetooth, like all other HCI driver
bindings.
Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
Convert the hci_stm32wba.c driver to the new HCI API. Unlike in most cases,
the devicetree node is already enabled on the SoC level (rather than board
level). This is in order to mirror how the Kconfig option was originally
enabled, i.e. on the SoC level.
Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
Convert the spi.c and hci_spi_st.c drivers to use the new HCI driver API.
Both drivers are converted in one go since one derives from the other's
devicetree binding.
Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
With the new HCI driver model it's not always critical if a single
instance fails to initialize. This is especially true for many test
applications which provide their own HCI drivers. Instead of causing a
complete failure, simply fail to initialize the driver instance.
Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
The drivers should be independent after the move to the new HCI driver
API. Having them as a choice also has unexpected consequences with some
drivers being unexpectedly enabled.
Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
Update the native controller to the new HCI driver API. The devicetree
node is placed under existing `radio` nodes, which seemed like the most
intuitive option.
Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
Convert the H4 driver to the new HCI driver API. This includes updating
also any boards that use the driver, i.e. adding the appropriate
devicetree node and chosen property to them.
Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
nxp,unique-mac actually is not meant to be universally
unique, the LAA bit should therefore be set, and fix the
description of the property in the binding to clarify
the intended usage of this property.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
As it is up to a driver implementation if a partial filled buffer is
released, this behavior can be configured during runtime to allow testing
for this edge case.
Signed-off-by: Ruben Völl <ruben.voell@grandcentrix.net>
This structure is bad style and not needed. Instead get the surrounding
`struct uart_emul_data` with `CONTAINER_OF()` directly.
Signed-off-by: Ruben Völl <ruben.voell@grandcentrix.net>