about summary refs log tree commit diff
path: root/pkgs/os-specific/linux/kernel/common-config.nix
diff options
context:
space:
mode:
authorLordMZTE <lord@mzte.de>2024-04-01 12:18:47 +0200
committerLordMZTE <lord@mzte.de>2024-04-01 12:18:47 +0200
commitd8489497c31f3b08eea1487466004f1f00c42668 (patch)
treebbdaa251b46bce0fd1ee1600f9df66884d88ef4c /pkgs/os-specific/linux/kernel/common-config.nix
parent9078780158b1a7364735c133eb8cb5d6276d7ccf (diff)
linux: enable POWER_RESET_GPIO and POWER_RESET_GPIO_RESTART modules
These modules are very useful for power management via GPIO pins on
embedded platforms such as the Raspberry Pi. The POWER_RESET_GPIO module
has been tested on a Raspberry Pi 3B+.
Diffstat (limited to 'pkgs/os-specific/linux/kernel/common-config.nix')
-rw-r--r--pkgs/os-specific/linux/kernel/common-config.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix
index 4cfc548f952d8..7e47a07f9604c 100644
--- a/pkgs/os-specific/linux/kernel/common-config.nix
+++ b/pkgs/os-specific/linux/kernel/common-config.nix
@@ -122,6 +122,10 @@ let
       # Default SATA link power management to "medium with device initiated PM"
       # for some extra power savings.
       SATA_MOBILE_LPM_POLICY           = whenAtLeast "5.18" (freeform "3");
+
+      # GPIO power management
+      POWER_RESET_GPIO                 = option yes;
+      POWER_RESET_GPIO_RESTART         = option yes;
     } // optionalAttrs (stdenv.hostPlatform.isx86) {
       INTEL_IDLE                       = yes;
       INTEL_RAPL                       = whenAtLeast "5.3" module;