Commit graph

23353 commits

Author SHA1 Message Date
Jordan Yates
0425b04fc3 serial: uart_nrfx_*: update tx_ready return codes
Update nrfx drivers with the minimum number of bytes that can be sent
in a single call to `uart_fifo_fill`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-02 09:56:45 +02:00
Jordan Yates
3e5c72a0ee serial: async_to_irq: update tx_ready return
The async IRQ shim supports writes of any size up to the TX buffer size.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-02 09:56:45 +02:00
Jordan Yates
81352d011f serial/usb: update struct ring_buf users
Update the interrupt driver UART drivers that use `struct ring_buf`
internally to report the number of bytes that can be pushed in
`uart_fifo_fill` without fragmentation.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-02 09:56:45 +02:00
Raffael Rostagno
724376de33 drivers: clock_control: esp32: Fix for UART baud
Fixes UART baud rate adjustment for ESP32 devices.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-10-02 09:52:23 +02:00
Ian Morris
92ec60f5ab drivers: sensor: renesas: Move to vendor subdirectory
Moves all Renesas sensor drivers into a vendor specific subdirectory
matching the organization used for other drivers.

Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
2024-10-02 09:51:54 +02:00
TOKITA Hiroshi
1f30346d4f drivers: dac: Add dummy driver for vnd,dac
Add dummy driver for "vnd,dac" to use in build_all tests.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-02 09:51:19 +02:00
TOKITA Hiroshi
00eaa850b2 drivers: input: sbus: Fix incorrect index reference of INPUT_SBUS_INIT
The argument of INPUT_SBUS_INIT is named `n,` but there are some places
where it references `id.`  Correcting these.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-02 09:50:22 +02:00
TOKITA Hiroshi
e9adbe4077 drivers: input: sbus: Remove unused pinctrl.h including
This source does not reference any pinctrl functions.
Removing the unused header.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-02 09:50:22 +02:00
Alberto Escolar Piedras
3ee9b40a5a eeprom sim: Enhance & refactor native part so it works w emb libCs
For the parts of the simulator which are dedicated for the native
platforms (POSIX arch based):
* Refactor the parts that interacts with the host, so it is possible to
  use it also with embedded libCs
* Enhance it with more options to allow:
  * Keeping the content just in RAM
  * Erasing the EEPROM file at exit
  * Clearing the file at boot
* Also show in the command line help the default file name.

As part of this:

* Update the kconfig dependencies, so we allow building it with other
  C libraries in the native targets
* Update the table in the native_sim docs to indicate all C libraries
  are supproted now

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-02 09:48:12 +02:00
Vladislav Pejic
fe5bfc9eb2 driver: sensor: adxl372: Bug fix for status2 reg
This is a bug fix for adxl372_get_status function.
This function is used to get STATUS1, STATUS2, FIFO_ENTRIES2
and FIFO_ENTRIES1 registers (they are continuously present
in the memory in this order). User can choose if it wants
STATUS2 and/or FIFO registers by passing pointers where
to store received values. Bug was when user doesn't want
STATUS2 and want FIFO regs. In that case calculated length
would be 3 which will result in reading of STATUS1, STATUS2
and FIFO_ENTRIES2 regs and not expected STATUS1, FIFO_ENTRIES2
and FIFO_ENTRIES1.

Signed-off-by: Vladislav Pejic <vladislav.pejic@orioninc.com>
2024-10-02 09:47:12 +02:00
Tom Chang
080787f5b7 drivers: espi: npcx: update the parsing function for espi taf
This commit updates the FLASHRXBUF parsing functionality of eSPI TAF.
It ensures that data can be read correctly from FLASHRXBUF[0].
And, the eSPI TAF request can be parsed correctly.

Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
2024-10-01 10:48:43 +01:00
Alberto Escolar Piedras
517d51e33a drivers/timer native_posix: Allow without BOARD_NATIVE_POSIX
This driver works both with native_posix and native_sim.
native_sim will eventually not set NATIVE_SIM_NATIVE_POSIX_COMPAT
(i.e. not pretend to be native_posix) so let's correct the
dependencies.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-01 10:47:55 +01:00
Francois Ramu
ff34d575bc drivers: flash: stm32 qspi flash driver with unprotect command
Add the write_unprotect command to the stm32 qspi flash driver
to un protect flash before any write operation to the external quad-NOR

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-10-01 09:52:34 +02:00
Francois Ramu
76740ae1d1 drivers: flash: qspi stm32 driver supporting requires_ulbpr
Add the support of the requires_ulbpr property when a Microchip
quad-spi flash is mounted.
Set the CONFIG_USE_MICROCHIP_QSPI_FLASH_WITH_STM32=y flag to access
the command

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-10-01 09:52:34 +02:00
Lucas Tamborrino
6c99888bfe drivers: video: esp32: Fix unused variables
Fix build warning for unused variables.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-10-01 09:51:46 +02:00
Raffael Rostagno
565005c27a drivers: wifi: esp32: Check blobs dependency
Checks blobs presence as dependency to allow driver build.
Goal is to avoid building in environment where blobs won't
be present (e.g GitHub CI environment).

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-09-30 16:57:50 -05:00
WenBin Zhang
48eb944e4d input: gpio_keys: fix gpio_pin_get_dt error handling
When gpio_pin_get_dt returns an error, the report event should not
be generated

Signed-off-by: WenBin Zhang <freey7955@gmail.com>
2024-09-30 16:57:06 -05:00
Ryan McClelland
22571f32bf drivers: i3c: shell: add shell cmd for ccc setbuscon
Add a i3c shell command for the i3c ccc setbuscon.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-30 16:56:04 -05:00
Ryan McClelland
901044f1e7 drivers: i3c: add ccc setbuscon
Add helpers and defines for the i3c ccc setbuscon.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-30 16:56:04 -05:00
Ryan McClelland
507e8170fa drivers: i3c: shell: fixup rstact
Both #78823 and #78807 merged at around the same time. This made it so
the shell didn't compile when #78823 was stacked on top as it did not run
with the test build. This fixes the compile issues.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-30 16:56:04 -05:00
Ryan McClelland
7e21f2e1ce drivers: i3c: shell: add parse args func for rstact
Add the parse args function for the rstact

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-30 16:56:04 -05:00
Fabio Baltieri
5e2203a6cd stepper: shell: fix uninitialized variable compiler warning
Fixes:

/__w/zephyr/zephyr/include/zephyr/drivers/stepper.h:429:16: error:
'direction' may be used uninitialized [-Werror=maybe-uninitialized]

found with:

west build -p -b esp32s3_touch_lcd_1_28/esp32s3/appcpu -T
tests/drivers/stepper/shell/drivers.stepper.shell

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-09-30 17:13:07 +01:00
Aksel Skauge Mellbye
d82acdc4e4 drivers: spi: gecko: Use clock control on Series 2
Use clock control driver to configure peripheral clock on
Series 2 devices.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-09-30 17:12:01 +01:00
Aksel Skauge Mellbye
00270d0d12 drivers: serial: gecko: Use clock control on Series 2
Use clock control driver to configure peripheral clock on
Series 2 devices.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-09-30 17:12:01 +01:00
Aksel Skauge Mellbye
bda8ae8c3f drivers: clock_control: silabs: Add clock control driver
Add clock control driver for Silicon Labs Series 2 and newer.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-09-30 17:12:01 +01:00
Gerard Marull-Paretas
9f0ebb64a6 drivers: i2c: nrfx_twim: simplify PM by using pm_device_driver_init
- Driver always initializes the device in the suspended state
- If CONFIG_PM_DEVICE_RUNTIME=n, device PM callback will be called with
  RESUME action, thus setting up pins to default state and enabling the
  peripheral

NOTE: when CONFIG_PM_DEVICE=n, the pinctrl sleep state will not be
available (-ENOENT) and so never applied, thus avoiding a pin
suspended->active transition.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-09-30 17:11:20 +01:00
Dominik Lau
5ec39011cc drivers: disk: sdmmc: enabled SDMMC DMA for stm32f7x
This enables the usage of DMA for stm32f7x in the sdmmc driver.

Co-authored-by: Maciej Sobkowski <msobkowski@antmicro.com>
Signed-off-by: Dominik Lau <dlau@internships.antmicro.com>
2024-09-30 17:10:56 +01:00
Dominik Lau
1e1c14cfee drivers: dma: stm32: fix dma_stop stream busy handling for HAL override
For DMA channels overridden by HAL DMA, there was no way of
resetting stream busy variable.

Co-authored-by: Maciej Sobkowski <msobkowski@antmicro.com>
Signed-off-by: Dominik Lau <dlau@internships.antmicro.com>
2024-09-30 17:10:56 +01:00
Dominik Lau
744fe5284a drivers: disk: sdmmc: stm32: add missing DMA stream deinitialization
Due to deinitialization not happening, reinitialization
of the disk did not happen as the streams were marked busy.

Signed-off-by: Dominik Lau <dlau@internships.antmicro.com>
2024-09-30 17:10:56 +01:00
Fabrice DJIATSA
6b167f2596 drivers: clock_control: add calibration for h7 pllx_hsi
This will calibrate the HSI's PLLX clocks if enabled
The value rcc_hsicalibartion_default is 0x40U for h7/h7rs.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-09-30 17:10:48 +01:00
Gero Schwäricke
a50e0d9b3b kscan: input: fix multiple kscan inputs
The kscan input callback does not use an instance specific name, so we
can only ever have one instance of this type.

Signed-off-by: Gero Schwäricke <gero.schwaericke@posteo.de>
2024-09-30 12:10:29 +01:00
Armin Brauns
6ba6c66ab5 hci_spi_st: send ACI config synchronously
There's no reason to send these async, and since the reply isn't waited for
anywhere, this can cause the HCI buffer pool to be exhausted and
`bt_enable()` to fail.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2024-09-30 12:10:20 +01:00
TOKITA Hiroshi
5fe5126913 driver: gpio: rt1718s: Create a log module with LOG_MODULE_REGISTER
Since the log module entity is not defined anywhere,
LOG_MODULE_REGISTER should be used here instead of LOG_MODULE_DECLARE.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-30 09:04:58 +02:00
TOKITA Hiroshi
01d3312d07 drivers: gpio: emul: Fixed return type of get_pending_int
`get_pending_int` should return a uint32_t value as defined in
`struct gpio_driver_api`.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-30 09:04:58 +02:00
TOKITA Hiroshi
663c7bc181 drivers: power_domain: gpio_monitor: Add PM_DEVICE dependency
Since "power_domain,gpio_monitor" depends on PM_DEVICE,
specify it in Kconfig.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-29 21:22:34 +02:00
TOKITA Hiroshi
a511f519b8 drivers: power_domain: gpio_monitor: Fix compilation error
The fix 25173f71cd created
`struct pm_device_base` and moved `usage` to it.
This has been overlooked so that I fixed it.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-29 21:22:34 +02:00
Declan Snyder
fb3fce570f drivers: pwm_mcux_tpm: support pause level feature
Support TPM devices with the pause level selection feature

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-09-29 21:21:34 +02:00
Florian Grandel
f55cf43ddf drivers: ieee802154: ieee802154_uart_pipe: replace magic number
Replaces a magic number by the appropriate definition.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-09-29 21:20:20 +02:00
Josuah Demangeon
1596ee0415 drivers: video: gc2145: set_fmt: branch on failure rather than success
This aims to make the code more linear by having the for loop
validates the input format rather than search for a match.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2024-09-28 11:30:08 -05:00
Josuah Demangeon
9174cb75e9 drivers: video: gc2145: return 0 at the end of functions
After the error code is checked to be zero, it is possible to return 0
explicitly to help with readability. Also, when available, forward the
return code from the failing function instead of a locally chosen error
code like -EIO.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2024-09-28 11:30:08 -05:00
Josuah Demangeon
81f5725839 drivers: video: gc2145: check format compatibility before applying
While applying the format, the pixel format and drv_data->fmt were set
immediately, and the resolution was set only if it had a matching
entry on the "caps".

This commit makes sure the requested format matches the caps before
applying the format as well as drv_data->fmt. This does not guards
against partial failure (i.e. only pixelformat set and not
resolution).

Signed-off-by: Josuah Demangeon <me@josuah.net>
2024-09-28 11:30:08 -05:00
Ioannis Damigos
d7497507cf i2c_smartbond: Don't set STOP flag to last message
Setting STOP flag to last message it's done by z_impl_i2c_transfer().

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-09-28 08:20:41 -05:00
Benedikt Schmidt
f54a97c117 drivers: fpga: configure CDONE for ICE40 as input
Configure the GPIO CDONE of the ICE40 as GPIO_INPUT.
Fixes #78934.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-09-28 08:18:49 -05:00
Ryan McClelland
d00684b28e drivers: i3c: shell: add ibi disable/enable commands
Add shell commands for the `i3c_ibi_enable` and `i3c_ibi_disable` apis.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-28 08:16:13 -05:00
Gang Li
caf86128b7 drivers: wifi: nxp: add AP configuration cmd support
Implement NXP AP configuration parameter operations.

Signed-off-by: Gang Li <gang.li_1@nxp.com>
2024-09-27 10:56:57 +01:00
Vidar Berg
d943e22f94 drivers: flash: spi nor: Allow the init priority to be configurable
Some applications may require the SPI NOR driver to be initialized
earlier. This commit enables the user to change the default
initialization priority.

Signed-off-by: Vidar Berg <vidar.berg@nordicsemi.no>
2024-09-27 10:56:41 +01:00
Fabrice DJIATSA
bfa6c32e07 divers: adc: update adc driver to integrate stm32u0
add u0 config_soc conditions in adc driver to handle
news peripherals.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-09-27 10:55:56 +01:00
TOKITA Hiroshi
a29c27f050 drivers: adc: ads1112: Remove unused variables
Remove unused variables for suppress warnings

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-26 17:43:52 -04:00
TOKITA Hiroshi
a873c73701 driver: adc: ads1112 Fix missing default y in config ADC_ADS1112
The `default y`, which is coupled with
depends on DT_HAS_TI_ADS1112_ENABLED to link the settings with DeviceTree,
which was missing, so I added it.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-26 17:43:52 -04:00
Andrew Davis
93a6f694db drivers: ipm: Add IPM over MBOX driver
The Multi-Channel Inter-Processor Mailbox (MBOX) framework can be seen
as a more general version of the Inter-Processor Mailbox (IPM) framework.
An MBOX driver provides for multiple channels, where IPM provides for
only a single channel of communication.

Currently many applications are written to use IPM, while some are now
being written to use MBOX. This means if a platform wants to support both
types of apps a given it must have a driver for both frameworks. As MBOX
is the newer and more generic framework, new drivers are being added for
this framework only and older IPM drivers are being migrated to MBOX.
This leads to the situation where applications need to be written twice,
once for each framework, to run across all platforms.

The solution is to add a gasket driver that exposes the IPM interface
while using a MBOX driver in the back-end. This shim driver allows
platforms to only need an MBOX driver to support both types of
application. This IPM driver can be used when an application only
supports IPM but the platform only supports MBOX.

This will allow platforms and applications to be ported over to MBOX
independently of each other. Add this driver here.

Signed-off-by: Andrew Davis <afd@ti.com>
2024-09-26 09:17:48 -05:00