pm: device: remove CONFIG_PM_MAX_DEVICES

When a device is defined a new pointer to a device will be created in
the "z_pm_device_slots" region, effectively creating a device array with
the same size as the number of system devices. This array is then used
by the device PM subsystem to keep track of suspended devices during
power transitions.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
Gerard Marull-Paretas 2021-05-27 21:00:22 +02:00 committed by Anas Nashif
commit c708a17b8e
4 changed files with 29 additions and 14 deletions

View file

@ -37,6 +37,15 @@
__device_end = .;
} GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
#if CONFIG_PM_DEVICE
SECTION_DATA_PROLOGUE(pm_device_slots, (NOLOAD),)
{
__pm_device_slots_start = .;
KEEP(*(".z_pm_device_slots"));
__pm_device_slots_end = .;
} GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
#endif
SECTION_DATA_PROLOGUE(initshell,,)
{
/* link in shell initialization objects for all modules that