From d8489497c31f3b08eea1487466004f1f00c42668 Mon Sep 17 00:00:00 2001 From: LordMZTE Date: Mon, 1 Apr 2024 12:18:47 +0200 Subject: [PATCH] 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+. --- pkgs/os-specific/linux/kernel/common-config.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index 4cfc548f952d..7e47a07f9604 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;