Skip to content

Commit 64e9bb2

Browse files
adigieLuDuda
authored andcommitted
[nrf toup][nrfconnect] Add Kconfig for nRF QSPI NOR power management
Add `CONFIG_CHIP_QSPI_NOR_POWER_MANAGEMENT_SUPPORT` 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 64e9bb2

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_QSPI_NOR_POWER_MANAGEMENT_SUPPORT
533+
bool "nRF QSPI NOR power management support"
534+
default y
535+
depends on PM_DEVICE && NORDIC_QSPI_NOR
536+
help
537+
Enables management of nRF QSPI NOR external flash power state
538+
transitions during Matter operations.
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)
4948
// utilize the QSPI driver sleep power mode
49+
#if defined(CONFIG_CHIP_QSPI_NOR_POWER_MANAGEMENT_SUPPORT)
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)