-
Notifications
You must be signed in to change notification settings - Fork 630
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[nrf fromlist] drivers: retained_mem: nrf: make ram_ctrl variant expl…
…icit Updated retained_mem driver variant exposes vendor-specific API, rather than executing implicitly during boot. Upstream PR #: 82262 Signed-off-by: Nikodem Kastelik <[email protected]>
- Loading branch information
1 parent
2e974fb
commit 0819c8e
Showing
2 changed files
with
38 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright (c) 2024 Nordic Semiconductor ASA | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#ifndef ZEPHYR_INCLUDE_DRIVERS_RETAINED_MEM_NRF_RETAINED_MEM_H | ||
#define ZEPHYR_INCLUDE_DRIVERS_RETAINED_MEM_NRF_RETAINED_MEM_H | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
#include <zephyr/drivers/retained_mem.h> | ||
|
||
#if defined(CONFIG_RETAINED_MEM_NRF_RAM_CTRL) || defined(__DOXYGEN__) | ||
/** @brief Apply memory retention settings. | ||
* | ||
* Memory retention settings to apply are derived from devicetree configuration. | ||
* | ||
* @retval 0 if the retention settings were applied successfully. | ||
* @retval -ENOTSUP if retention configuration is not present in devicetree. | ||
*/ | ||
int z_nrf_retained_mem_retention_apply(void); | ||
#else | ||
static inline int z_nrf_retained_mem_retention_apply(void) | ||
{ | ||
return -ENOTSUP; | ||
} | ||
#endif | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* ZEPHYR_INCLUDE_DRIVERS_RETAINED_MEM_NRF_RETAINED_MEM_H */ |