Skip to content

Commit 908a41c

Browse files
committed
[nrf toup][nrfconnect] Add Kconfig for ExternalFlashManager
Add `CONFIG_CHIP_EXTERNAL_FLASH_MANAGER` Kconfig that guards power state handling for nRF QSPI NOR external flash. Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no>
1 parent d2cceb5 commit 908a41c

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

config/nrfconnect/chip-module/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,4 +529,12 @@ config CHIP_CHIPOBLE_SINGLE_CONNECTION
529529
Limit support for chip-over-BLE (CHIPoBLE) to a single connection.
530530
When set, CHIPoBLE advertisements will stop while a CHIPoBLE connection is active.
531531

532+
config CHIP_EXTERNAL_FLASH_MANAGER
533+
bool "External flash manager support"
534+
default y
535+
depends on PM_DEVICE && NORDIC_QSPI_NOR
536+
help
537+
Enables handling external flash power state transitions for operations
538+
that use the nRF QSPI NOR external flash.
539+
532540
endif # CHIP

src/platform/nrfconnect/ExternalFlashManager.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,16 @@ class ExternalFlashManager
4545

4646
void DoAction(Action aAction)
4747
{
48-
#if defined(CONFIG_PM_DEVICE) && defined(CONFIG_NORDIC_QSPI_NOR)
48+
#if defined(CONFIG_CHIP_EXTERNAL_FLASH_MANAGER)
4949
// utilize the QSPI driver sleep power mode
5050
const auto * qspi_dev = DEVICE_DT_GET(DT_INST(0, nordic_qspi_nor));
5151
if (device_is_ready(qspi_dev))
5252
{
5353
const auto requestedAction = Action::WAKE_UP == aAction ? PM_DEVICE_ACTION_RESUME : PM_DEVICE_ACTION_SUSPEND;
5454
(void) pm_device_action_run(qspi_dev, requestedAction); // not much can be done in case of a failure
5555
}
56+
#else
57+
(void) aAction;
5658
#endif
5759
}
5860

0 commit comments

Comments
 (0)