This commit fixes the bug in the prescaler configuration formula.
Prescaler enumarations values are not consecutive numbers, so this
formula does not work correctly. This commit adds prescaler enums into
an array and sets PWM prescaler from this array with using
prescaler_index parameter.
Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
Disable VHT (Wi-Fi 5) capabilities when building with softAP support
to ensure consistent Wi-Fi 4 only behavior across all channels and
frequency bands.
Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
STM32L4xx series shares several SAI & DMA configurations with
the other platforms. These changes aim to remove specific
DMA & SAI configurations which are not used by STM32L4xx
Signed-off-by: Mario Paja <mariopaja@hotmail.com>
TDM should have clock divider bypass enabled when calculated clock divider
exceeds maximum allowed value which is `CKDIV2`.
Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
When the loop completes without breaking, tries would be
BMI270_CONFIG_FILE_RETRIES + 1 so the error check was never hit.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The call to k_sleep() is not safe as dai_dmic_probe() is called
from PM dmic_pm_action() and k_can_yield() may be false.
Problem was caught on Intel WCL ADSP platform with SOF as application
and a Zephyr build with asserts enabled.
Fix the issue by using k_busy_wait() instead.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Fixes minor issues of the max17048 driver, which came up during
another PR.
This was tested with the CI and the Adafruit ESP32-S3 Reverse TFT Feather.
Signed-off-by: Philipp Steiner <philipp.steiner1987@gmail.com>
Format existing drivers according to clang-format rules.
Not all drivers were formatted, according to the clang-format rules,
this commit resolves this.
Signed-off-by: Philipp Steiner <philipp.steiner1987@gmail.com>
Refactor drivers so all have the same clean public interface.
With this change, all drivers have the same coding style.
This change does not change how the driver works and was tested with
the "fuel-gauge-build all test"
Signed-off-by: Philipp Steiner <philipp.steiner1987@gmail.com>
Add wsen_isds_2536030320001 driver with
the corrected name and compatibility with
the hal update as well as added new features.
Signed-off-by: Wajdi ELMuhtadi <wajdi.elmuhtadi@we-online.com>
Add a num_of_allocated_channels field to struct dma_mcux_lpc_config. Add
a a capacity check for dma_X_channel_data_arr in dma_mcux_lpc_configure.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
Enable Link-Up and Link-Down interrupts. On the interrupt handling
the monitor work is scheduled to update the link status and calling
corresponding callback routine.
Signed-off-by: Tony Han <tony.han@microchip.com>
Call ksz8081_init_int_gpios() after phy_mc_ksz8081_reset() due to
keep the configurations for interrupt.
Signed-off-by: Tony Han <tony.han@microchip.com>
Update the internal driver flags to avoid setting DO_AUTONEG_FLAG
unconsciously when setting LINK_STATE_VALID.
Signed-off-by: Tony Han <tony.han@microchip.com>
Add a stupid binding for doc purposes. Terrible coupling when we have to
configure DT in order to generate documentation properly. At least we
get rid of one of the stupid HAS_MCUX_ kconfigs in the process.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
When USDHC_Reset fails, we should be more verbose about it failing. Add
the error prints here so that we can observe the failure in logs.
Signed-off-by: Bas van Loon <bas@arch-embedded.com>
1.Update dts bindings to move clock-source properties from
nxp,ftm-pwm.yaml to nxp,ftm.yaml.
2.Provide counter driver based on FTM driver from NXP mcux-sdk-ng
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
The following error is issued by clang when building with
SPI_NOR_SFDP_RUNTIME enabled:
error: fields must have a constant size:
'variable length array in structure' extension will never be supported
1379 | uint32_t dw[MIN(php->len_dw, 20)];
Instead, hardcode the array length to 20 32-bit words (it's instantiated
in the stack anyway).
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Re-configure the registers if they re erased because of a STOP2 low power
mode.
Return the error code when re-initializing the UART after a STANDBY low
power mode.
Fix few typos and comments.
Run clang format on uart_stm32_pm_action()
Signed-off-by: Mickael Bosch <mickael.bosch@linux.com>
In both lsm9ds1 and lsm9ds1_mag drivers, the device data structure is
generally referenced with the variable name data.
However, in the initialization functions, the variable was named
lsm9ds1 (or lsm9ds1_mag for the magnetometer), which breaks this
convention.
Rename these variables to data for consistency across the driver.
Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
Adds support for device PM for the lsm9ds1 sensor, putting the sampling
frequency of both the accelerometer and the gyroscope at 0 when the device
is suspended.
Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
Controllers that use buffers directly must always allocate the length of
the control OUT buffer as a multiple of the control endpoint MPS.
Kinetis UDC driver explicitly checks the remaining buffer size and
finishes the transfer earlier.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Fix typo und remove unused variable, add a check for buffer allocation.
Do not disable controller on udc_disable.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Some controllers, such as those used in Kinetis devices, do not provide
a way to reset the buffer descriptor flags for each endpoint. Do not
reset the odd flag on endpoint enable, as this will cause it to become
out of sync with the hardware.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Until recently this driver wasn't built in CI. Now that it is, clang
is complaining about `err` possibly being uninitialized in case
`bitmask` is 255. Fix it by actually removing code that was
unnecessarily trying to access the uninitialized variable.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
In HAL based stm32 drivers, dma handling is done internally to HAL.
Though, in order to avoid a dma_config() call is done to ensure stream
will be set as busy in zephyr dma driver to avoid potential resource
sharing conflict.
This dma_config() call was done while taking into account
STM32_DMA_STREAM_OFFSET, which is wrong as it will prevent zephyr dma
driver to set the right stream as busy.
Fix this in impacted drivers.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
To ease code understanding of offset handling within the driver,
harmonize its treatment within impacted functions.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
STM32_DMA_STREAM_OFFSET is defined as 0 in case "dma u5" is in use.
Clean up code relating to this define.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
On STM32L4, similarly to other STM32 series, enable DMA directly based
on dt configuration and avoid need to configure it at application level.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
This change fixes STM32H7xx dma configuration.
PeriphInc and MemInc should be the same for both directions.
MemDataAlignment should be set to DMA_MDATAALIGN_HALFWORD
Signed-off-by: Mario Paja <mariopaja@hotmail.com>
Fix Coverity issue CID 524766: A potential integer overflow could occur
in paj7620_set_sampling_rate() due to multiplication of
sensor_value->val1 instance(which is of type int32_t) with 1000000
without typecasting it to int64_t.
Fixes#90482
Signed-off-by: Aditya Chopra <adityachopra2912@gmail.com>
Set mem_block to NULL after the STOPPING command in order to exit
TX callback at the end of the buffer transmission.
Signed-off-by: Mario Paja <mariopaja@hotmail.com>
Check `explorir_m_uart_transceive`'s return value in `explorir_m_init` and
return the value if not 0.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>