Add a CPU frequency scaling subsystem, allowing a policy
algorithm to control the frequency of a given SoC/MCU
automatically at runtime.
Implement a basic, "on-demand" policy algorithm which
iterates through the P-states supported by the SoC and
selects the first P-state where it's trigger threshold is
less than the CPU load.
The CPU frequency scaling subsystem does not currently
support SMP. The CPU load measurement can be made to support
SMP since statistics are measured from the scheduler.
Co-authored-by: Eric Hay <Eric.Hay@analog.com>
Signed-off-by: Sean Kyer <Sean.Kyer@analog.com>
Implement CPU load measurement subsystem. The statistics
used to calcualte the load are taken from the scheduler.
Specifically, the number of cycles used by the idle thread.
Co-authored-by: Sean Kyer <Sean.Kyer@analog.com>
Signed-off-by: Eric Hay <Eric.Hay@analog.com>
GIC ITS depends on kernel heap, so move GIC initialize to be behind of
heap which initialization priority is CONFIG_KERNEL_INIT_PRIORITY_OBJECTS
which is 30 by default.
MU mailbox and SCMI objects depend on GIC, so set their init priority
to be same with GIC, the initialization sequence decided by the dts
dependency although they use the same init priority.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
The comments for INPUT_BTN_GEAR_DOWN and INPUT_BTN_GEAR_UP were
incorrectly swapped. This commit fixes the documentation to match
the actual button definitions.
Signed-off-by: Niu Zhihong <zhihong@nzhnb.com>
Ensure all RST files only ever belong to one single toctree by means of
cleaning up existing in globs used in nested folders.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Main sample category page for CANbus contained "old" toctree alongside
zephyr:code-sample-category, causing doc build warning due to documents
belonging to multiple toctrees.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Ensure all RST files only ever belong to one single toctree by means of
cleaning up existing in globs used in nested folders.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
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>
For all GPIO headers/connectors, add a short mention of the header file
that can be used to access pin numbers macros.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Make use of `tabulate` to pretty print the results of the hardening tool
instead of custom formatting.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
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 build tests for the following missing devices:
- x-powers,axp2101-fuel-gauge
- onnn,lc709203f
- silergy,sy24561
This is important, because it guarantees that all drivers will be
build the driver during CI.
Signed-off-by: Philipp Steiner <philipp.steiner1987@gmail.com>
Updating standby exit latency time according worst case value
from stm32wba5 and stm32wba6 datasheets.
Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
soc power management rework to support power states
removing dependency on ST system clock manager (SCM).
Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.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>
These tests verify the expected returned value and device state for
error cases (-EALREADY, -errno) conform to the device_init()
documentation.
Signed-off-by: Loic Domaigne <tech@domaigne.com>
This fix makes sure that do_device_init() returns a negative value if
the device's initialization failed. Previously, it mistakely returned
+errno instead of -errno.
This oversight happened during the refactoring of z_sys_init_run_level()
to support deferred initialization, from which most of do_device_init()
code derives. The rc value computed and stored in dev->state->init_res
is the POSITIVE value of the resulting errno. Returning rc therefore
breaks the convention of a negative value to signal failure.
Signed-off-by: Loic Domaigne <tech@domaigne.com>
Rate limit the get_recv_buf() callback from the application to
reduce system trash when buffer pressure gets high.
Signed-off-by: Victor Brzeski <vbrzeski@gmail.com>
This is used for properly tracking if legacy or extended advertising
API is used and should not be changed if advertisign is enabled.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
If extended advertising was used GAP module was always creating
new instance on advertising start (while failing to stop it at
the same time).
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Refactored twister_main.py module to simplify the code and system tests.
Removed the need to patch `sys.argv` in blackbox tests.
Signed-off-by: Lukasz Fundakowski <lukasz.fundakowski@nordicsemi.no>
Add a Doxygen group for the GPIO pin headers macros and initially
document Arduino Uno (R3) header pin constants.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>