change(esp_hw_support): update some modules sleep retention init dependency bitmap

This commit is contained in:
Li Shuai
2024-09-19 12:55:48 +08:00
parent 00a6f825b0
commit bde6b9141f
22 changed files with 50 additions and 50 deletions

View File

@@ -867,7 +867,7 @@ esp_err_t spi_bus_initialize(spi_host_device_t host_id, const spi_bus_config_t *
.arg = ctx,
},
},
.depends = BIT(SLEEP_RETENTION_MODULE_CLOCK_SYSTEM),
.depends = RETENTION_MODULE_BITMAP_INIT(CLOCK_SYSTEM)
};
_lock_acquire(&ctx->mutex);
@@ -971,11 +971,11 @@ esp_err_t spi_bus_free(spi_host_device_t host_id)
#if SOC_SPI_SUPPORT_SLEEP_RETENTION && CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP
const periph_retention_module_t retention_id = spi_reg_retention_info[host_id - 1].module_id;
_lock_acquire(&ctx->mutex);
if (sleep_retention_get_created_modules() & BIT(retention_id)) {
assert(sleep_retention_get_inited_modules() & BIT(retention_id));
if (sleep_retention_is_module_created(retention_id)) {
assert(sleep_retention_is_module_inited(retention_id));
sleep_retention_module_free(retention_id);
}
if (sleep_retention_get_inited_modules() & BIT(retention_id)) {
if (sleep_retention_is_module_inited(retention_id)) {
sleep_retention_module_deinit(retention_id);
}
_lock_release(&ctx->mutex);