From 63fb3d8f2dd8c1aa62a2ad39d3d1dc41b57cb364 Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Sun, 18 Jul 2021 10:52:04 -0700 Subject: [PATCH] kernel: Enable Chrome platform modules They were enabled in 5.4 but then removed. Let's enable them explicitly here. To keep the version constraints simple, we match kernel >5.4 even though some of them are available since 4.x. --- pkgs/os-specific/linux/kernel/common-config.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index 09117a8525d0..1cf5596024c5 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -881,6 +881,22 @@ let # Keeping it a built-in ensures it will be used if possible. FB_SIMPLE = yes; + } // optionalAttrs (versionAtLeast version "5.4" && (stdenv.hostPlatform.system == "x86_64-linux" || stdenv.hostPlatform.system == "aarch64-linux")) { + # Required for various hardware features on Chrome OS devices + CHROME_PLATFORMS = yes; + CHROMEOS_TBMC = module; + + CROS_EC = module; + + CROS_EC_I2C = module; + CROS_EC_SPI = module; + CROS_EC_LPC = module; + CROS_EC_ISHTP = module; + + CROS_KBD_LED_BACKLIGHT = module; + } // optionalAttrs (versionAtLeast version "5.4" && stdenv.hostPlatform.system == "x86_64-linux") { + CHROMEOS_LAPTOP = module; + CHROMEOS_PSTORE = module; }; }; in