Commit Graph

2487 Commits

Author SHA1 Message Date
Benedikt Schmidt
6bc67ba541 tests: drivers: adc: increase RODATA region size
Increase the rodata section for build_all/adc to
successfully build on the platform atsame54_xpro.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-09-14 08:32:46 -05:00
Benedikt Schmidt
02dabecbd1 tests: drivers: adc: add MAX11102-MAX11117
Add instances of the ADC family MAX11102-MAX11117
to the build all tests.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-09-14 08:32:46 -05:00
Gerard Marull-Paretas
691facc20f include: always use <> for Zephyr includes
Double quotes "" should only be used for local headers.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-14 13:49:58 +02:00
Yuval Peress
23d051537b rtio: Simplify the mempool handling
It's not necessary to cache the block size, instead it can be computed
from blk_sz_shift

Signed-off-by: Yuval Peress <peress@google.com>
2023-09-13 17:34:47 -04:00
Andreas Wiesinger
cb76aab9d3 dts: sensor: bosch,bmi270: Move interrupt handling to parent binding
Moved the interrupt handling code from a bus-specific binding file to
the parent binding file. This modification ensures that interrupt
handling, which is inherently independent of the type of BUS used
(either i2c or spi), is located in the appropriate location within
the code.

Previously, this code was found in a bus-specific file, despite its
functionality being applicable to all buses. This change ensures a
more logical placement and will help to maintain coherence within the
codebase.

This change aligns with the existing implementation where the interrupt
handling code already operates independently of the BUS type.

Tested this on a nrf52840 with a bmi270 on spi bus with the sample from
zephyr/samples/sensor/bmi270 by adding an interrupt handler in main.c
which uses the bmi270_trigger.c implementation and verified this with
breakpoints and log output.

Added the irq-gpios to tests/drivers/build_all/sensor/i2c.dtsi and
tests/drivers/build_all/sensor/spi.dtsi and fixed whitespace formatting.

Fixes: #58843

Signed-off-by: Andreas Wiesinger <awiesing90@gmail.com>
2023-09-13 16:26:24 +02:00
TOKITA Hiroshi
5119af0422 tests: counter: counter_basic_api: Add support for rpi_pico boards
Add support for rpi_pico board.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-09-13 16:18:44 +02:00
Weiwei Guo
2779dd9d9b drivers: sensor: bmm150: Add trigger support for bmm150 magnetometer sensor
Add bmm150 magetometer sensor data ready trigger support.

Signed-off-by: Weiwei Guo <guoweiwei@syriusrobotics.com>
2023-09-13 12:07:57 +02:00
J.P. Hutchins
477ff70230 test: drivers: flash: build spi_nor.c wp & hold
Test spi_nor.c driver builds with or without wp-gpios and hold-gpios.

Signed-off-by: J.P. Hutchins <jp@intercreate.io>
2023-09-13 12:07:27 +02:00
Daniel DeGrasse
fdd7e78d3c boards: arm: mimxrt1060_evk: added additional PWM outputs
Added PWM outputs to arduino header, to make testing PWM support with
this EVK simpler. These PWM outputs are enabled by the pwm_api test,
although they are not used. The user can enable the PWM shell in order
to test these PWM outputs.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-09-13 12:06:23 +02:00
Nick Ward
43be17a5fe tests: drivers: build all: sensor: add current_amp
Add current sense amplifier driver to tests.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2023-09-13 12:05:52 +02:00
Marcel Krüger
387f3c2092 drivers: fuelgauge: Add TI BQ27z746 driver
Add driver for the Texas Instruments BQ27z746 fuel gauge

Signed-off-by: Marcel Krüger <marcel.krueger@ithinx.io>
2023-09-13 12:05:04 +02:00
Krzysztof Chruściński
3168623abb tests: drivers: clock_control: nrf_lf_clock_start: Clean up
After 31767a0bc there is no need to disable boot banner because
initial clock state is read in POST_KERNEL stage before the boot
banner is printed.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2023-09-13 11:36:30 +02:00
Aaron Massey
8035ec69fa emul: Add syscall support for fuel gauge emulators
In order to ease user thread testing with fuel gauges, enable syscalls for
the fuel gauge emulator backend API.

Signed-off-by: Aaron Massey <aaronmassey@google.com>
2023-09-12 17:23:00 +01:00
Daniel DeGrasse
77998b2171 tests: drivers: adc: support sampling more than 2 channels with test
Support sampling more than 2 channels using the ADC API test. This
requires updates to the repeated samplings test, which samples using 2
channels even when more channels are defined by the ADC test overlay.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-09-12 17:22:35 +01:00
Sreeram Tatapudi
fd04f8cc81 drivers: spi: Initial version of the Infineon CAT1 SPI driver
Initial version of Infineon CAT1 SPI Driver supporting synchronous
and asynchronous data transfer API

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2023-09-12 10:55:01 +02:00
Henrik Brix Andersen
37f4cb16f1 tests: drivers: build_all: can: add compile test for the tcan4x5x driver
Add a compile test for the TI TCAN4x5x series CAN controller driver.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-09-11 19:55:44 +02:00
Albort Xue
4d9fb55d5e tests: drivers: dac: Verify dac on lpcxpresso55s36 board
Added overlay for lpcxpresso55s36 to verify dac driver.

Signed-off-by: Albort Xue <yao.xue@nxp.com>
2023-09-11 19:55:26 +02:00
Rick Talbott
a07b79a8bf drivers: sensor: tsl2540
Add the tsl2540 sensor to drivers.

Signed-off-by: Rick Talbott <richard.talbott1@t-mobile.com>
2023-09-11 19:54:59 +02:00
Martin Jäger
fe1c341ae2 boards: arm: nucleo_f091rc: enable CAN support
This MCU has a classical CAN controller, which was previously not
enabled.

I2C2 is disabled by default because it uses the same pins as CAN and
there are no other free pins that can be used for CAN.

Signed-off-by: Martin Jäger <martin@libre.solar>
2023-09-11 11:09:26 +02:00
Keith Short
ea40f3af24 mfd: Add NCT38xx multi-function driver
The Nuvoton NCT38xx is a multi-function device providing a TCPC
controller and a I/O expander (GPIO driver).  Add a multi-function
driver to manage exclusive access to the device.

Tested with "twister -T tests/drivers/build_all/gpio".

Signed-off-by: Keith Short <keithshort@google.com>
2023-09-11 11:00:47 +02:00
Ricardo Rivera-Matos
aee815f19d charger: Sample sbs charger driver with tests
Adds a sample sbs charger driver and basics tests.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2023-09-07 13:03:13 -04:00
Benedikt Schmidt
ac02559447 tests: drivers: dac: add AD56xx
Add instances of the DACs AD56xx to the build all tests.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-09-07 08:48:32 -05:00
Paweł Anikiel
43668c6416 drivers: sensor: Add F75303 driver
Add driver for F75303 temperature sensor IC.

Signed-off-by: Paweł Anikiel <pan@semihalf.com>
2023-09-07 09:42:59 +02:00
Najumon B.A
7597bc1de4 test: arch: x86: update with new acpica interface
modified existing x86 tests app with the new acpica interface

Signed-off-by: Najumon B.A <najumon.ba@intel.com>
2023-09-07 09:42:38 +02:00
Hein Wessels
582995359a tests: drivers: pwm_capture: nucleo_h743zi: add four channel capture
At least one of this test cases in pwm_capture needs to verify
the working of four-channel-capture-support.

Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
2023-09-07 09:42:25 +02:00
Daniel Gaston Ochoa
d8fab9e435 stm32h7: spi: Add SPI loopback tests for 16 bits frames
Enable these tests only for H7 and if DMA is not enabled, as
running them with DMA would require modifying the dmamux
configuration in devicetree to move half-words instead of
bytes.

Signed-off-by: Daniel Gaston Ochoa <dgastonochoa@gmail.com>
2023-09-06 11:44:28 +02:00
Gerard Marull-Paretas
b7ff64d91c tests: drivers: build_all: adc: add support for native_posix_64
To catch any potential issues when building for 64-bit platforms.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-05 11:57:44 +02:00
Gerard Marull-Paretas
26ba7b03b4 tests: drivers: build_all: optimize built drivers
All generic drivers, ie, emulators/SPI/I2C based devices, were defined
in app.overlay, meaning the overlay is picked by all builds. However,
what was defined in app.overlay was only used by the native_posix build.
This will save some CI time, as generic drivers were being built more
than strictly necessary.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-05 11:57:44 +02:00
Bindu S
8350fc2c63 tests: drivers: spi: spi_loopback: Added intel_adl_crb overlay
Added overlay and conf to enable SPI tests on intel_adl_crb board.

Signed-off-by: Bindu S <bindu.s@intel.com>
2023-09-05 11:41:46 +02:00
Fabian Blatz
10ca5216bb samples: subsys: display: lvgl: Remove lvgl-pointer-input in overlays
After adding the lvgl pointer device into the board dts the custom overlays
are not needed anymore.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-09-05 10:05:50 +02:00
Carles Cufi
8c748fd005 kernel: Modify the signature of k_mem_slab_free()
Modify the signature of the k_mem_slab_free() function with a new one,
replacing the old void **mem with void *mem as a parameter.

The following function:
void k_mem_slab_free(struct k_mem_slab *slab, void **mem);

has the wrong signature. mem is only used as a regular pointer, so there
is no need to use a double-pointer. The correct signature should be:
void k_mem_slab_free(struct k_mem_slab *slab, void *mem);

The issue with the current signature, although functional, is that it is
extremely confusing. I myself, a veteran Zephyr developer, was confused
by this parameter when looking at it recently.

All in-tree uses of the function have been adapted.

Fixes #61888.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2023-09-03 18:20:59 -04:00
Alberto Escolar Piedras
69643d575d tests drivers.flash.common.default: Fix allow list
qemu_x86 was listed as an integration platform but not in the
allow list causing twister to fail:

Error found:
tests/drivers/flash/common/drivers.flash.common.default
on qemu_x86 (Not in testsuite platform allow list but is one
of the integration platforms)

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-09-01 08:59:49 -04:00
Hake Huang
903a79431a tests: driver: flash_default limited on tier one boards
remove mcux test scenario, which is overlapped with default
limit test to boards listed in the boards list

fixing: #62067

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2023-09-01 13:22:42 +02:00
cyliang tw
0afe4bb980 tests: drivers: pwm: pwm_loopback: support numaker_pfm_m467
Add support for Nuvoton numaker board numaker_pfm_m467.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2023-08-31 10:19:31 +02:00
Jakub Michalski
f54a7b1602 drivers: mb85rc: support use of multiple modules as a single one
Allow use of multiple mb85rc frams at contiguous i2c addresses as a single
big fram module.
Tested on mb85rc1mt used as two 32K modules, where the first one was at
mb85rc1mt's first i2c address and the second one at mb85rc1mt's second i2c
address.

Signed-off-by: Jakub Michalski <jmichalski@internships.antmicro.com>
Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
2023-08-30 17:38:21 +02:00
Jakub Michalski
a5c0a9656d drivers: add mb85rc fram driver
Add fujitsu mb85rc i2c fram driver.
Tested on mb85rc1mt.

Signed-off-by: Jakub Michalski <jmichalski@internships.antmicro.com>
Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
2023-08-30 17:38:21 +02:00
Bjarki Arge Andreasen
bfdd382ffc tests/drivers/build_all/modem: Add modem_cellular driver
Add modem_cellular driver to build_all. Since the driver
is generic, supporting 4 different modems, it builds an
instance for all 4 as they exist in the devicetree.

Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
2023-08-30 13:48:51 +02:00
Jeroen van Dooren
772e6fd423 tests: drivers: uart: Adding wide data async tests
Extending async tests with wide data support.

Signed-off-by: Jeroen van Dooren <jeroen.van.dooren@nobleo.nl>
2023-08-30 10:17:17 +02:00
Jeroen van Dooren
930edd8ed4 tests: drivers: uart: Resetting uart state
Resetting uart state before every testcase.

Signed-off-by: Jeroen van Dooren <jeroen.van.dooren@nobleo.nl>
2023-08-30 10:17:17 +02:00
Jeroen van Dooren
c3a1730c99 tests: drivers: uart: Adding wide data cfg tests
Extending configuration tests with wide data support.

Signed-off-by: Jeroen van Dooren <jeroen.van.dooren@nobleo.nl>
2023-08-30 10:17:17 +02:00
Jeroen van Dooren
41339562c6 tests: drivers: uart: moving struct declaration
Moving struct in preparation of wide test.

Signed-off-by: Jeroen van Dooren <jeroen.van.dooren@nobleo.nl>
2023-08-30 10:17:17 +02:00
Eric Holmberg
f5b78270bc drivers: sensor: ina230: fix current sign issue
Fix sign handling for ina230 current calculation.

Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
2023-08-29 09:44:20 -05:00
Eric Holmberg
5a6610240e test: sensor: ina230: add emulator unit test
Add emulator unit test of the INA230.

Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
2023-08-29 09:44:20 -05:00
Eric Holmberg
f0f7f8b146 dt-bindings: sensor: ina230: add configuration properties
Add properties to replace the configuration register value.

Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
2023-08-29 09:44:20 -05:00
Eric Holmberg
19e44ae9a0 drivers: sensor: ina237: add shunt voltage support
Add ability to retrieve the shunt voltage if the end user wants to do
the power calculation manually to handle negative power values.

Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
2023-08-29 09:44:20 -05:00
Eric Holmberg
a70d056513 drivers: sensor: ina237: add high-precision mode
The current-shunt calibration requires a factor of 4x if high-precision
mode is selected.

Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
2023-08-29 09:44:20 -05:00
Eric Holmberg
2d3a391191 drivers: sensor: ina237: fix current sign issue
Fix current sign extension logic and consolidate sensor scaling code
into a single block.

Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
2023-08-29 09:44:20 -05:00
Eric Holmberg
19da119c17 test: sensor: ina237: add emulator unit test
Add emulator unit test of the INA237.

Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
2023-08-29 09:44:20 -05:00
Eric Holmberg
c7135a2ac5 dt-bindings: sensor: ina237: add configuration properties
Add properties to replace the configuration register values.

Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
2023-08-29 09:44:20 -05:00
Guillaume Gautier
8a9b33729b tests: drivers: watchdog: wdt_basic_api: add nucleo_wba52cg board
Add Nucleo WBA52CG board in the allowed platform for STM32 watchdog tests

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-08-29 10:25:23 +02:00