Skip to content

Commit 6453957

Browse files
nordic-krchmstasiaknordic
authored andcommitted
[nrf fromlist] drivers: pinctrl: Allow keeping pinctrl sleep state
When PM or PM_DEVICE is enabled pinctrl sleep state is using for device suspension. However, there are cases where power management is not used but we still want to be able to put pins to sleep state, e.g. device deinit. Upstream PR #: 93273 Signed-off-by: Krzysztof Chruściński <[email protected]>
1 parent 9a8c5b0 commit 6453957

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

drivers/pinctrl/Kconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ config PINCTRL_DYNAMIC
3434
runtime. This can be useful, for example, to change the pins assigned to a
3535
peripheral at early boot stages depending on a certain input.
3636

37+
config PINCTRL_KEEP_SLEEP_STATE
38+
bool "Keep sleep state"
39+
default y if PM || PM_DEVICE
40+
3741
source "drivers/pinctrl/Kconfig.b91"
3842
source "drivers/pinctrl/Kconfig.bflb"
3943
source "drivers/pinctrl/Kconfig.ambiq"

include/zephyr/drivers/pinctrl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ struct pinctrl_dev_config {
7878

7979
/** @cond INTERNAL_HIDDEN */
8080

81-
#if !defined(CONFIG_PM) && !defined(CONFIG_PM_DEVICE)
81+
#if !defined(CONFIG_PINCTRL_KEEP_SLEEP_STATE)
8282
/** Out of power management configurations, ignore "sleep" state. */
8383
#define PINCTRL_SKIP_SLEEP 1
8484
#endif

0 commit comments

Comments
 (0)