Refactor the `MIN_HEAP_FOREACH` macro to use a cleaner
for-loop style removing the need for a third `body` argument.
Update the sample application with the new macro changes.
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
Remove using `swap()` which was using VLA and replace it
with `byteswp()`.
Reduce the scope of local variables in `heapify_up/down` to
the smallest necessary block.
Replace `while(true)` loop in `heapify_down()` with a bounded `for`
loop.
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
Test for power domains driver based on TISCI API added. This test is
for the target am243x_evm/am2434/r5f0_0.
Signed-off-by: Dave Joseph <d-joseph@ti.com>
Support added for power domain regulation using TISCI added for
devices using the binding ti,sci-pm-domain.
This driver relies on the TISCI layer to make calls to the
device manager core to perform power management.
Signed-off-by: Dave Joseph <d-joseph@ti.com>
The clock startup latency is now obtained from the clock driver and the
nrf-802154 is now set to a value that matches hardware capabilities.
Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
The nrf-802154 component of hal_nordic is updated.
The CCA threshold configuration is now done in dBm units, instead of
hardware-dependent scale.
Fixed a bug, where the CONFIG_NRF_802154_CCA_ED_THRESHOLD units were
different from the NRF_802154_CCA_ED_THRESHOLD units. Now all
configuration is done in dBm.
Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
Change license owner to Prevas due to initially wrong owner due to company
mix-up during co-development.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
There were a lot of places where the return value was sum'ed up
which can be slightly easier to read, but can give an odd return
value in the end. This changes it to just return immediately if
an error is seen.
There was also runtime NULL checking of input arguments that are
rather programmer clown prevention. Change these to asserts.
The return value didn't have a consistant type through the file,
make it consistently an int.
This changes the name of the return value of fix_sign to be
signed_value differenating it from the ret name used elsewhere.
Use the sizeof(buffer) as the argument for reg reads and writes
rather than a hard number.
Some log messages ended with '\n'. Remove all these.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
Add configurations for setting the pad drive strength and the
interrupt active high/low and od/pp.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
There is a race condition where an interrupt can fire before the
drdy_handler is registered. The drdy_handler will tradionaly
callback the sample get clearing the interrupt... but if it's not
configured and NULL, the interrupt will stay forever latched. Read
the interrupt status to clear the interrupt flag allowing it to
trigger again.
Also, move the serial api function helpers in to the header
allowing them to be used from other c files.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
Fix the oversampling value to be 1 from 0 for no oversampling to be
consistant with other sensor drivers.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
Add the attr_get api. Also rename functions where they implied
accelerometer to imply magnetometer.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
Describe the magnetometer part of the lsm9ds1 sensor, available in the
Arduino Nano 33 BLE through I2C.
Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
This driver supports the magnetometer in the ST lsm9ds1 sensor, on the
I2C bus.
This driver does not support the triggers.
This driver use the stmemsc HAL.
link: https://www.st.com/resource/en/datasheet/lsm9ds1.pdf
Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
Test added for new nrf2_auxpll driver. Frequency checks are
against known usecases of the auxpll (USB, CAN and AUDIO).
Also update test to be more modular, only running certain tests
if in the devicetree.
Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
Added new binding for macros of possible auxpll frequency settings.
Will be used in future products also.
Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
Currently twister complains:
benchmark.kernel.footprints.pm on siwx917_rb4342a/siwg917m111mgtba
error (CMake build failure - warning: SILABS_SLEEPTIMER_TIMER (defined
at soc/silabs/silabs_s2/Kconfig.defconfig:17,
drivers/timer/Kconfig.silabs:4) has direct dependencies
(SOC_FAMILY_SILABS_S2 || SOC_FAMILY_SILABS_SIWX91X) &&
DT_HAS_SILABS_GECKO_STIMER_ENABLED && SYS_CLOCK_EXISTS with value n,
but is currently being y-selected by the following symbols:)
So, SILABS_SLEEPTIMER_TIMER can't be selected because
DT_HAS_SILABS_GECKO_STIMER_ENABLED is not selected.
We just have to enable the proper timer in the DT of rb4342s to fix the
issue.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
The test benchmark.kernel.footprints.pm currently generate these warnings
during the link:
[204/209] Linking C executable zephyr/zephyr_pre0.elf
.../ld.bfd: warning: orphan section `.udma_addr1' from \
`zephyr/libzephyr.a(UDMA.c.obj)' being placed in \
section `.udma_addr1'
[209/209] Linking C executable zephyr/zephyr.elf
.../ld.bfd: warning: orphan section `.udma_addr1' from \
`zephyr/libzephyr.a(UDMA.c.obj)' being placed in \
section `.udma_addr1'
Last version of hal_silabs provide a workaround for this issue.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Commit removes unused host hci custom functionality
that was moved to mesh by misinterpretation of it.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
As the net_dhcpv4_stop() will now properly remove DNS servers, remove
the loop check so that the add event gets tested again.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Add information how the DNS reconfiguration API functions
dns_resolve_reconfigure() and dns_resolve_reconfigure_with_interfaces()
have changed.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Print information which DNS servers were added by DHCP when
listing DNS servers in "net dns" command. This helps debugging
DNS server issues.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Remember which DNS server was added by a source like DHCPv4 or v6
message. This will allow system to remove DNS servers that were added by
that source. Then when stopping for example DHCP, we can remove those
specific DNS servers and not leaving DNS servers hanging in the system.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Pins can be configured to retain their config even when the power
domain they belong to is suspended. Update pinctrl_nrf to enable
retain only if the pin has been configured and is not in use
(pincnf is low-power/sleep), disable retain otherwise.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
The usage of nrf_gpio_port_retain_disable/_enable, in cases where
the soc pins support retention, every pin must be
retained/unretained regardless of what power domain the pad is in.
This patch ensures retain is applied to all pins in all domains by
the gpio_nrfx device driver, not only pins specifically in the
fast_active_1 domain. Without this patch, pinctrl will correctly
retain pins, while gpio_nrfx will fail to unretain them when
again.
We no longer check the output state either, which was passed with
the flags arg of gpio_nrfx_gpd_retain_set() so this arg has been
removed.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
The STM32MP13 clock control has set and clear registers
for the clocks. So clearing the set register won't have any effect.
Instead, we should write on the clear register.
Signed-off-by: Julien Racki <julien.racki@st.com>
Use 64 bit values for accumulating idle time and measurement window
as it was possible to get overflow if window was long enough.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
From Zephyr SDK 0.17.1 the RX architecture is supported so
update the documentation of RX130 board to reflect this
Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
Excluding this test for qemu_rx because it's failing randomly
Root cause not identified yet, #92213 is created to keep track
of this
This test case is working fine on actual RX HW so issue might be
in the inside the qemu environment
Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
Ignore gapfill for RX target as some RX toolchains generate wrong
output image when running gapfill for binary format.
Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>