_handle_device_abort is only called in one place and it basically does
two instructions. Just remove it.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
On smp environment, we cannot do device power management based only on
the state the current core. For example, do not suspend devices if
there are other cores active, or resume devices if there are other
cores already active.
This change ensure that devices are only suspend when the last active
core become idle and that these devices are resumed only when the first
core becomes active.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Instead of returning PM_STATE_ACTIVE for when the cpu didn't enter a
low power state and a different state when it entered, but has
already left the state and is active again, it changes
pm_system_suspend to return true when the cpu has entered a low power
state and false otherwise.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Each CPU can have its own set of states. Update the policy to get them
from DT and account it when return the best state to the kernel.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Currently power management subsystem uses a global variable to hold
power state. On multicore environment this is a problem and we have to
have this information per core.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
CONFIG_UART_MUX_DEVICE_NAME is used as a prefix for the uart muxes
name. Pointer comparison will always return false
Fix#39774
Signed-off-by: Guillaume Lager <g.lager@innoseis.com>
drivers: modem: gsm: Quectel EC21 and BG9x act as a gsm modem without
problem, but COPS commands can returns just one value with 'mode'.
Format and oper are not mandatory. This modification reads 'mode'.
Also a modification on modem_cmd_read_cops_cmd is needed.
Signed-off-by: Jair Jack <jack@icatorze.com.br>
With the maximum number set to 20, the sample fails to build for
both platforms set as allowed for this sample and mentioned in its
documentation, i.e. 96b_carbon_nrf51 and nrf51dk_nrf51422 (a build
attempt ends up with an SRAM region overflow). Use a lower number
to prevent this failure and set both those boards as integration
platforms, so that such problem, if it was to appear again, could be
caught by CI.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
When Device use pb-gatt bearer provisioning, and first
provisioning failed due to some reasons(invalid oob etc..).
Which cause `proxy:gatt_disconnectd` incorrected write `conn_count`
Cause this var euqals `-1`.
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
As from this PR, Zephyr has no I2C_X references
and this notes presented in the documentation
can be removed.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Use i2c_hal functions to enable support for
multiple SoCs.
Use DT compat to enable I2C from device
tree configuration
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Arduino Nano 33 board has undefined I2C_0 and I2C_1
configs. This removes it as I2C_TWIN kconfig already
handles it by its DTS file.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Add a few minor improvements to the NEORV32 board documentation based on
community feedback.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
PCA9633 driver does not cunnetly support multiple devices.
Updated the driver to use DT_INST_FOREACH_STATUS_OKAY to
configure all devices defined in the device tree.
Convert driver to use `i2c_dt_spec` helpers.
Fixes#40076
Signed-off-by: Daniel N. Hansten <dnh2000@gmail.com>
This lets the toolchain header files determine how to use "restrict"
instead of having that decision down in the minimal libc library.
Signed-off-by: Bradley Bolen <bbolen@lexmark.com>
To better handle all possible definitions of restrict
or __restrict keyword and avoid redefinition errors, use
the ZRESTRICT pre-processor defined in toolchain.h
Signed-off-by: Nicholas Lowell <nlowell@lexmark.com>
restrict keyword is not supported in C++, however
GNUC does support __restrict for C/C++ so we can use that,
however the complexity of toolchains requires a ZRESTRICT
symbol that should be used throughout the codebase to not
cause any conflicts or redefinition errors
Signed-off-by: Nicholas Lowell <nlowell@lexmark.com>
To restrict the job to the upstream repository a new `if` entry was
added, however, another `if` was already present (violates yaml).
Combined the conditions into a single expression.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This joins all clock control handling to same source
by using hal clock functions. It also brings ESP32C3
clock support.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
As part of the work to support multiple IPC instances / backends using
IPC service, the static vrings mi code must be reworked to resemble a
classic device driver.
Fix also the sample using it.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
The IPC service code is currently assuming that only one IPC instance
does exist and the user can use the IPC service API to interface with
that singleton instance.
This is a huge limitation and this patch is trying to fix this
assumption introducing three major changes to the IPC service API:
- All the IPC instances are now supposed to be instantiated as a struct
device. A new test is introduced to be used as skeleton for all the
other backends.
- ipc_service_register_backend() is now removed (because multiple
backends are now supported at the same time).
- All the other ipc_service_*() functions are now taking a struct device
pointer as parameter to specify on which instance the user is going to
act and operate.
In this patch the documentation is also extended to better clarify the
terminology used.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Rename the macro used to initialize the runtime fields to
Z_PM_DEVICE_RUNTIME_INIT (emphasize it is internal and follows parent
macro naming).
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Some macros were helpers for the state initializers (e.g. to assist
UTIL_LISTIFY). In order to make the API more clear, they have been
prefixed with Z_ to emphasize they are internal and they have also been
removed from documentation.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Z_PM_DEVICE_INIT is used as a static initializer, so all non-specified
fields will already be set to zero.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add a dummy implementation for the wakeup API, so that it can still be
used when no PM_DEVICE is enabled.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The PM flags are only used internally, so there is no need to include
them in the documentation.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Document the deprecated functions and macros, tag them with @deprecated
command to inform about the replacement.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
- Add a new `subsys_pm` group, part of `subsys`
- Improve group naming
- Include conditional code using __DOXYGEN__, it allows to have better
control of inclusion.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add an external group definition file. It can be used to create high
level group for things like subsystems, as there is no header such as
"subsys.h" where these type of logical groups can be defined.
This approach is followed by projects such as pipewire to organize
Doxygen modules.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>