refactor(sdm): move sleep retention config into driver layer

Move SDM regdma retention descriptors out of esp_hal_gpio and into
per-target
esp_driver_sdm sources so the driver owns its backup scope and restore
flow.
This commit is contained in:
morris
2026-07-06 15:09:37 +08:00
parent 442cc028b5
commit 4704a99af3
18 changed files with 305 additions and 235 deletions
@@ -10,11 +10,6 @@
#include <stddef.h>
#include "soc/soc_caps.h"
#include "soc/periph_defs.h"
#include "soc/regdma.h"
#if SOC_HAS(PAU)
#include "soc/retention_periph_defs.h"
#endif // SOC_HAS(PAU)
#ifdef __cplusplus
extern "C" {
@@ -32,18 +27,6 @@ typedef struct {
extern const soc_sdm_signal_desc_t soc_sdm_signals[SDM_CAPS_GET(INST_NUM)];
#if SOC_HAS(PAU)
typedef struct {
const periph_retention_module_t module; // ID of the SDM as a retention module
const regdma_entries_config_t *regdma_entry_array; // Array of regdma entries for retention
const size_t array_size; // Size of the regdma_entry_array
} soc_sdm_retention_desc_t;
extern const soc_sdm_retention_desc_t soc_sdm_retention_infos[SDM_CAPS_GET(INST_NUM)];
#endif // SOC_HAS(PAU)
#endif // SOC_HAS(SDM)
#ifdef __cplusplus