fix(ci): some digital peripherals support sleep retention attach and detach

This commit is contained in:
Li Shuai
2026-05-21 11:46:16 +08:00
committed by BOT
parent d1aaeb25e7
commit e28ee420ac
24 changed files with 196 additions and 26 deletions
@@ -42,6 +42,7 @@ parlio_group_t *parlio_acquire_group_handle(int group_id)
.arg = group,
},
},
.attribute = SLEEP_RETENTION_MODULE_ATTR_ATTACH,
.depends = RETENTION_MODULE_BITMAP_INIT(CLOCK_SYSTEM)
};
// we only do retention init here. Allocate retention module in the unit initialization
@@ -93,6 +94,7 @@ void parlio_release_group_handle(parlio_group_t *group)
if (do_deinitialize) {
#if PARLIO_USE_RETENTION_LINK
const periph_retention_module_t module_id = parlio_retention_infos[group_id].retention_module;
sleep_retention_module_detach(module_id);
if (sleep_retention_is_module_created(module_id)) {
assert(sleep_retention_is_module_inited(module_id));
sleep_retention_module_free(module_id);
@@ -185,6 +187,10 @@ void parlio_create_retention_module(parlio_group_t *group)
if (sleep_retention_module_allocate(module_id) != ESP_OK) {
// even though the sleep retention module create failed, PARLIO driver should still work, so just warning here
ESP_LOGW(TAG, "create retention module failed, power domain can't turn off");
} else {
if (sleep_retention_module_attach(module_id) != ESP_OK) {
ESP_LOGW(TAG, "attach retention module failed, power domain can't turn off");
}
}
}
_lock_release(&s_platform.mutex);