From nobody Sat Feb 7 15:22:24 2026 Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E53CB2D5957 for ; Fri, 6 Feb 2026 12:57:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770382632; cv=none; b=qNhk/CswODh7/l9+oZMAfuOv/vpSNa+uau+mypikaEvnSO8odlucLFNzTEbfefKSsI0PHH3N6P2eB7FMipg2B6RWntRAzx8pJKBQuWn0vIJqytUhG2jTjLVnEFlKseuHv51wGJgVJnT8TXENsVvcfdl84ikmCwM9wRYYS4Xl8O8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770382632; c=relaxed/simple; bh=kPU1oBukxMqix0koJHcd3VsVzH9ya8xnAlosPcBArvI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BbhYMoozpsXrZGIhE1oeZtqmNFwpuXd6VDJ4uPD2ZiZ1rPrA1CGHzJO7pI7d+yKMDIdDrjCXNfdr5Czzc+Kc59PHIq3u5OHjdb5EwrsTP7ooU9/4bV61kAxmrIHLu9KZIZaaH17O/bBKQ6st1q8FagSmXoQCTb8vLR8dwr5S54s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=NJ3kS5bX; arc=none smtp.client-ip=209.85.214.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NJ3kS5bX" Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-2a09757004cso18327565ad.3 for ; Fri, 06 Feb 2026 04:57:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770382631; x=1770987431; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=IoKTueZpXQx3gpN23ycBzI2bHPCHbPRI2wSorpiDz6Q=; b=NJ3kS5bX97a2RutqDdSY0DnIeuiHI9hhqnYAglQ3yi5bBtQIhsp1wX/vvb1FO6cfNf Fst3Mvkd5GGGhGMltn7qqDEfLtA6/M4uajanTJuIy5OacJR8hkRS551JIsR0aDkKKfF6 Rgl9Csg5SEWakaFCUf2Fpt84HT5s+MtFbOINUB918o0Qd51zmSSC6aJ6LSD3xhY75q0A rzBnYktnmIxvu+rZtj745YChVjaCcNsifiP6ODxVrordDaPFQL8xDBX3ZosbHViypgMs stgqa/apiVqQw662mHU2FmZq/6tNSdY/t/btz/8ZIvyb48D/9vX8DDH/6bugIYl3VBCF OWow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770382631; x=1770987431; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=IoKTueZpXQx3gpN23ycBzI2bHPCHbPRI2wSorpiDz6Q=; b=rZt/2YN4yTbt82QwPjRW31EweM7gvQqePdYH3o3i27sEaHDRZA2BsaDRQ8bA7XFzlI iUTmS5CSxo/fD5WjnWk5RQgszWOpMANJ1VoRFx8E+8hGH0gPiTa7a1iTLwRhZ83UTHKE NVW6by+Z5KTvd7hw8jVphAqGs4qF/Uw3Y0J+8MdYVkExaUyVa2Gu1P2fWpqFQSkxCqSa xXKj3luB8oGXmClkaKZP6LgxkrxIEU8wKzF+DNT69IZUJPx4OJXowx3KQJMz39D3kJ5A t9R9V0rqf9qyUxDok0Kwlvxuxt+GRdHxpG1ZZ9bUnxJtTA214zeB+VwArj2L09A/2aAO bpYg== X-Forwarded-Encrypted: i=1; AJvYcCXpbaqB1FJkJWz5h2MCVAYoAGUUDgiSJ1zzY571jB5z+y/otPoNI8p6BT0599ZbFEj5EYNtxsoL6udKtMw=@vger.kernel.org X-Gm-Message-State: AOJu0YyRxNbeuv85/i16geZq1Lr96QwutlW01DJFurFr3JTFIb1IK6eC ILSX5zEd1hl2ljmGZ0rvlDGkUF2sgOdnkgZgsiF8TG3dswwjIjIXwXY= X-Gm-Gg: AZuq6aITa0QHH0pphEdmm4tMf2P8CUuYO4v95BvXLFTXUk1a8kGY2osjZgRuyVmDPoh g/o4p5+gBiMcTkwt4IC8Kofa9nlj2wkLXD9Ok3/8Nn4cjZRgvJbXvZ5UZAFGT4+BPs0sMMWiNgu NW3aARUlp+DYyM3MOt1HwP62FTXpww82K6ZErrpEHnsILH6sX/4iZsVlviT5Zt/qQxrO8OrDQC7 djQUOkfurIS0tvYcomvCi/dlAMnKaHUrWG2JIe1Fbx4jrJHxwoW0NMa6BevMp/McsSwYMKRjtqZ WMkwgTuhJmpGctvn/hNxQK6Tsbk6WPhASy0CUdJ1uedBofD0NXu/EZ4i3niUulD8LJi11/St0O1 n1K4fR8CeW+kmdRtEaSnku26H1efkGWENSxe0SPwt/teoMWcxGlExFx394vnpZJpYTjWRGJ6ysi tOqLroIP9mo2eXDOs= X-Received: by 2002:a17:903:1b2e:b0:2a9:32c7:92db with SMTP id d9443c01a7336-2a951971b6fmr26541095ad.61.1770382631199; Fri, 06 Feb 2026 04:57:11 -0800 (PST) Received: from at.. ([171.61.167.190]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a951a636aasm23336005ad.12.2026.02.06.04.57.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Feb 2026 04:57:10 -0800 (PST) From: Atharva Tiwari To: Cc: Lukas Wunner , Atharva Tiwari , Ard Biesheuvel , Hans de Goede , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org, platform-driver-x86@vger.kernel.org Subject: [PATCH 1/2] efi: Save Brightness using EFI on Macs Date: Fri, 6 Feb 2026 12:56:21 +0000 Message-ID: <20260206125641.12983-2-atharvatiwarilinuxdev@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260206125641.12983-1-atharvatiwarilinuxdev@gmail.com> References: <20260206125641.12983-1-atharvatiwarilinuxdev@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Currently when a Mac reboots, the brightness is not the same as the previous boot instead its the same as the last time the Mac booted macOS. We can fix this issue by saving the brightness level to the efivar backlight-level. We use delayed work instead of a shutdown callback, as it still applies the brightness even during forced shutdowns and at 0% battery. (tested on iMac20,1) Suggested-by: Lukas Wunner Signed-off-by: Atharva Tiwari --- drivers/firmware/efi/Kconfig | 10 ++ drivers/firmware/efi/Makefile | 1 + drivers/firmware/efi/apple-brightness.c | 91 +++++++++++++++++++ .../linux/platform_data/apple-brightness.h | 21 +++++ 4 files changed, 123 insertions(+) create mode 100644 drivers/firmware/efi/apple-brightness.c create mode 100644 include/linux/platform_data/apple-brightness.h diff --git a/drivers/firmware/efi/Kconfig b/drivers/firmware/efi/Kconfig index 29e0729299f5..dd0a9c9a772a 100644 --- a/drivers/firmware/efi/Kconfig +++ b/drivers/firmware/efi/Kconfig @@ -167,6 +167,16 @@ config APPLE_PROPERTIES =20 If unsure, say Y if you have a Mac. Otherwise N. =20 +config APPLE_BRIGHTNESS + bool "Apple Backlight control for EFI" + depends on X86 + help + This will save the brightness level to EFI, so brightness + level is preserved across reboots and shutdows. allowing + for improved support of Apple hardware. + + If unsure, say Y if you have a Mac, Otherwise N. + config RESET_ATTACK_MITIGATION bool "Reset memory attack mitigation" depends on EFI_STUB diff --git a/drivers/firmware/efi/Makefile b/drivers/firmware/efi/Makefile index 8efbcf699e4f..1f5705cc87a2 100644 --- a/drivers/firmware/efi/Makefile +++ b/drivers/firmware/efi/Makefile @@ -26,6 +26,7 @@ obj-$(CONFIG_EFI_BOOTLOADER_CONTROL) +=3D efibc.o obj-$(CONFIG_EFI_TEST) +=3D test/ obj-$(CONFIG_EFI_DEV_PATH_PARSER) +=3D dev-path-parser.o obj-$(CONFIG_APPLE_PROPERTIES) +=3D apple-properties.o +obj-$(CONFIG_APPLE_BRIGHTNESS) +=3D apple-brightness.o obj-$(CONFIG_EFI_RCI2_TABLE) +=3D rci2-table.o obj-$(CONFIG_EFI_EMBEDDED_FIRMWARE) +=3D embedded-firmware.o obj-$(CONFIG_LOAD_UEFI_KEYS) +=3D mokvar-table.o diff --git a/drivers/firmware/efi/apple-brightness.c b/drivers/firmware/efi= /apple-brightness.c new file mode 100644 index 000000000000..c32e365dc511 --- /dev/null +++ b/drivers/firmware/efi/apple-brightness.c @@ -0,0 +1,91 @@ +// SPDX-License-Identifier: GPL-2.0-only OR MIT +/* + * apple-brightness.c - EFI brightness saver on Macs + * Copyright (C) 2026 Atharva Tiwari + */ + +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + +#include +#include +#include +#include +#include +#include + +static DEFINE_MUTEX(apple_brightness_mutex); +static struct delayed_work apple_brightness_work; + +static u32 efi_attr; +static u16 last_saved_level; + +static int (*get_brightness)(struct backlight_device *bl); +static struct backlight_device *bl_dev; + +static void apple_brightness_workfn(struct work_struct *work) +{ + u16 level; + efi_status_t status; + + mutex_lock(&apple_brightness_mutex); + + level =3D (u16)get_brightness(bl_dev); + + if (level =3D=3D last_saved_level) + goto out; + + status =3D efivar_set_variable(APPLE_BRIGHTNESS_NAME, &APPLE_BRIGHTNESS_G= UID, + efi_attr, sizeof(level), &level); + if (status !=3D EFI_SUCCESS) + pr_debug("Unable to set brightness: 0x%lx\n", status); + else + last_saved_level =3D level; + +out: + mutex_unlock(&apple_brightness_mutex); + + mod_delayed_work(system_wq, &apple_brightness_work, + msecs_to_jiffies(APPLE_BRIGHTNESS_POLL)); +} + +int apple_brightness_probe(struct backlight_device *bl, + int (*get_brightnessfn)(struct backlight_device *bl)) +{ + efi_status_t status; + unsigned long size =3D sizeof(last_saved_level); + int ret; + + guard(mutex)(&apple_brightness_mutex); + + bl_dev =3D bl; + get_brightness =3D get_brightnessfn; + + if (!efi_rt_services_supported(EFI_RT_SUPPORTED_SET_VARIABLE)) + return -ENODEV; + + ret =3D efivar_lock(); + if (ret) + return ret; + + status =3D efivar_get_variable(APPLE_BRIGHTNESS_NAME, &APPLE_BRIGHTNESS_G= UID, + &efi_attr, &size, &last_saved_level); + + efivar_unlock(); + + if (status !=3D EFI_SUCCESS) + return -ENODEV; + + bl_dev =3D bl; + get_brightness =3D get_brightnessfn; + + INIT_DELAYED_WORK(&apple_brightness_work, apple_brightness_workfn); + mod_delayed_work(system_wq, &apple_brightness_work, + msecs_to_jiffies(APPLE_BRIGHTNESS_POLL)); + + return 0; +} +EXPORT_SYMBOL(apple_brightness_probe); + +MODULE_AUTHOR("Atharva Tiwari "); +MODULE_DESCRIPTION("EFI Brightness saver for Macs"); +MODULE_LICENSE("Dual MIT/GPL"); diff --git a/include/linux/platform_data/apple-brightness.h b/include/linux= /platform_data/apple-brightness.h new file mode 100644 index 000000000000..4cf5e2d346cb --- /dev/null +++ b/include/linux/platform_data/apple-brightness.h @@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: GPL-2.0-only OR MIT */ +/* + * apple-brightness.h - EFI brightness saver for Macs + * Copyright (C) 2026 Atharva Tiwari + */ + +#ifndef _APPLE_BL_H_ +#define _APPLE_BL_H_ + +#include +#include + +#define APPLE_BRIGHTNESS_NAME L"backlight-level" +#define APPLE_BRIGHTNESS_GUID EFI_GUID(0x7c436110, 0xab2a, 0x4bb= b, 0xa8, 0x80, 0xfe, 0x41, 0x99, 0x5c, 0x9f, 0x82) + +#define APPLE_BRIGHTNESS_POLL 300 + +int apple_brightness_probe(struct backlight_device *bl, + int (*get_brightnessfn)(struct backlight_device *bl)); + +#endif /* _APPLE_BL_H */ --=20 2.43.0 From nobody Sat Feb 7 15:22:24 2026 Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E752F2FD697 for ; Fri, 6 Feb 2026 12:57:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770382640; cv=none; b=qkgIs7XgzzUU24t36KQWQLFIuTLI37FRggEErzvioDfMCHY2hec5QoDhZWUC2bOydG0gr6aVBxdSJ9pZ6OSCGlm9N4fqcaH5fwkVAgkcHcxpGyytKISB16Nf0/o1PsEVCTSu3EI5d4w8yf6iztRRnKHPe38GbhRlOM4X5hYKRuA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770382640; c=relaxed/simple; bh=Gm/45C6aiyq1VubFEgZhyjA7HQmfRnDcaftZAQwtYDk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Pwh6ZmVg5CN7JHEkS6mfOhOlGdCXFw0WcV8M0tp0p+sNp43qSJeM4UpDKHc5VwqG+o3yLXJf1RfO/WjdRwnMvxj0IssZ4FxoIX2Tp58Qirx58dFFI2pifhcM78r4S7J5+srQiKlmbfn8EyI62XXKHbGODTqsp7zhPo9xY/F1jbU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=YWOqyAHo; arc=none smtp.client-ip=209.85.214.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YWOqyAHo" Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-2a743050256so14561665ad.3 for ; Fri, 06 Feb 2026 04:57:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770382639; x=1770987439; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9Nj7rTmIxrIyoM/Zv2E7TPav3Q6NYtriqtqId7+NMO4=; b=YWOqyAHo5FT1cTWCmeiUcL3s80iYsRy0X6JKYQWHTuO3yGnzO9HYtu99CrIPywTpeZ wlaxUVbfyvqo5mnLljSlHou7F0Mgk0pCLcY+xLTuh0FTorwc+ujO9LX98Pn/3kMsyb6i 8cO1yqWFD7ksKuCtQBME7C9//3pF2PKGlnySQ/QKKyTQ5Dn4S3hCUBH27heoV4D+Swww Wk1CT33aYego5MOwZNtsKi92RzaeVIwqCqnuZvI7BhRG+NNwnjVjMaRH4+fLktKexpyd SFKjke4g3qo831W3IXzs7t0CgM17ZmE4uwaLH8BWOySe63B0/dBsy1E7gtqXwUDp4WPx f2sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770382639; x=1770987439; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=9Nj7rTmIxrIyoM/Zv2E7TPav3Q6NYtriqtqId7+NMO4=; b=gDSiIGl+CsOCAbwqnxGdUO3BRLZdxFrh+AwJroJ1zYADJwnwxt0aTgZF+khS0nDeDH NMq9W5BfSvAr8EQwcsdxtTei7TaNGnuLFvKcwgr8VpmhhcIyYsj8H6PQ2S4Q6BzDRPk2 R7xWmTxtGM5LeAovnKpwgrchO/w6u6Br89d+kxjiRa1pcHgrFW8KPTdyXbCkisBmRoOw pgpL0jjtIv0+QuS3D02p1Qhyu0wFvU+bvf0Z/BSnoFytym5n9EeR44QpET9ffAvHl2r+ 76aZ+aBaqnzJ9tCzoL6BPWFk2dImRqgUN2Rk0tndtheKqYeTy5l3zeUPZB/hiT5/Bep7 F7hA== X-Forwarded-Encrypted: i=1; AJvYcCUCCQ1exw2ks6o0mPIy5wbO9ySDprEKMcZBTv6TPfhU/R75dNn8kdIKodKXTyh1eZaEDD1TpXeJQmGONVg=@vger.kernel.org X-Gm-Message-State: AOJu0Yxo0QvFMNyvHwGx+vnxUxu1IucADoiTUzqetGE7W3flbhHuyCo9 Js7KB1UXQky/664iwDlZ0P/oHAfs3tIyGZzvYsJ1uCGdXmShv8PDlrc= X-Gm-Gg: AZuq6aIsCPulmxMZmHjz3Ql4d+rgxly1CS7ekYmaxEBO3yRkkUY6hvdCzzSVYsGr0fe QEpKwdJ8GpLNVq690iok9Zo/xCmIY/Ilg4QJr6hW99tJZ4UpFDLzxQaXrxtcv8cD8lKP/KynjHw 8QIvHV7T1nbuf9sHvd5RlQSL95l3oR0jIaZQHfJvRNH3VDwGRZAfzcg0FbommDg6Fg7ZxGE6GJ2 W6peFi7zXJCTpy/T7fDjUZm77u6Z5pR5DIXA/zNQuzLbkDM580MyJVX/6VWGvICMjzcMxV/4Z5c H7v9R4uHrtcQA1xWeoUfwuPvBsh+VesLyWf3lW9pvRQU55jSIxcScLFgWu/y3ItyAiGVR2Dc/aL ftrGNOJgAkAgD2cp1SLBB7KJf6QQyPhxgYiVfbfOpMPvOY2k6MgPxoYbtVO3WGNCfAPiIBPDwg5 HShN0RwQnw+t7R6qsGiuK0b4cXOQ== X-Received: by 2002:a17:902:da91:b0:2a0:c5a6:c8df with SMTP id d9443c01a7336-2a9516cd2fbmr27802775ad.21.1770382639301; Fri, 06 Feb 2026 04:57:19 -0800 (PST) Received: from at.. ([171.61.167.190]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a951a636aasm23336005ad.12.2026.02.06.04.57.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Feb 2026 04:57:18 -0800 (PST) From: Atharva Tiwari To: Cc: Lukas Wunner , Atharva Tiwari , Ard Biesheuvel , Hans de Goede , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org, platform-driver-x86@vger.kernel.org Subject: [PATCH 2/2] platform/apple-gmux: use apple_brightness to save brightness to EFI Date: Fri, 6 Feb 2026 12:56:22 +0000 Message-ID: <20260206125641.12983-3-atharvatiwarilinuxdev@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260206125641.12983-1-atharvatiwarilinuxdev@gmail.com> References: <20260206125641.12983-1-atharvatiwarilinuxdev@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" use apple_brightness to save brightness to EFI. (tested on iMac20,1) Signed-off-by: Atharva Tiwari --- drivers/platform/x86/apple-gmux.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/platform/x86/apple-gmux.c b/drivers/platform/x86/apple= -gmux.c index 1417e230edbd..cfb20c115eb0 100644 --- a/drivers/platform/x86/apple-gmux.c +++ b/drivers/platform/x86/apple-gmux.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include =20 @@ -960,6 +961,12 @@ static int gmux_probe(struct pnp_dev *pnp, const struc= t pnp_device_id *id) } =20 gmux_init_debugfs(gmux_data); + if (IS_ENABLED(CONFIG_APPLE_BRIGHTNESS)) { + ret =3D apple_brightness_probe(gmux_data->bdev, &gmux_get_brightness); + if (ret) + pr_warn("Unable to Enable EFI brightness saver: %d\n", ret); + } + return 0; =20 err_register_handler: --=20 2.43.0