Merge branch 'feat/sleep_retention_expand_module_bitmap_v5.4' into 'release/v5.4'

backport v5.4: expand the number of sleep retention modules supported on different chips

See merge request espressif/esp-idf!34691
This commit is contained in:
Jiang Jiang Jian
2024-11-20 14:50:52 +08:00
49 changed files with 733 additions and 583 deletions
@@ -998,10 +998,9 @@ static esp_err_t ieee802154_sleep_init(void)
{
esp_err_t err = ESP_OK;
#if CONFIG_PM_ENABLE
sleep_retention_module_init_param_t init_param = {
.cbs = { .create = { .handle = ieee802154_sleep_retention_init, .arg = NULL } },
.depends = BIT(SLEEP_RETENTION_MODULE_BT_BB) | BIT(SLEEP_RETENTION_MODULE_CLOCK_MODEM)
};
sleep_retention_module_init_param_t init_param = { .cbs = { .create = { .handle = ieee802154_sleep_retention_init, .arg = NULL } } };
init_param.depends.bitmap[SLEEP_RETENTION_MODULE_BT_BB >> 5] |= BIT(SLEEP_RETENTION_MODULE_BT_BB % 32);
init_param.depends.bitmap[SLEEP_RETENTION_MODULE_CLOCK_MODEM >> 5] |= BIT(SLEEP_RETENTION_MODULE_CLOCK_MODEM % 32);
err = sleep_retention_module_init(SLEEP_RETENTION_MODULE_802154_MAC, &init_param);
if (err == ESP_OK) {
err = sleep_retention_module_allocate(SLEEP_RETENTION_MODULE_802154_MAC);