public inbox for linux-efi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] Save Brightness on Macs
@ 2026-03-15 22:19 Atharva Tiwari
  2026-03-15 22:19 ` [PATCH v3 1/2] efi: Save Brightness using EFI " Atharva Tiwari
  2026-03-15 22:20 ` [PATCH v3 2/2] platform/apple-gmux: use apple_brightness to save brightness to EFI Atharva Tiwari
  0 siblings, 2 replies; 5+ messages in thread
From: Atharva Tiwari @ 2026-03-15 22:19 UTC (permalink / raw)
  Cc: Atharva Tiwari, Ard Biesheuvel, Hans de Goede, Ilpo Järvinen,
	open list, open list:EXTENSIBLE FIRMWARE INTERFACE (EFI),
	open list:X86 PLATFORM DRIVERS

We fix this by writing the brightness value to efivar 'backlight-level'
at shutdown only, when it is changed since the last boot.

Changes in v3:
- Fixed a bug, in which apple_brightness_shutdown is still called on
   non-supported devices.
Changes in v2:
- Saved the brightness only when it is different than the previous boot.

Link to v2:
https://lore.kernel.org/all/20260315215302.24087-1-atharvatiwarilinuxdev@gmail.com/
Link to v1:
https://lore.kernel.org/all/20260206125641.12983-1-atharvatiwarilinuxdev@gmail.com/

Atharva Tiwari (2):
  efi: Save Brightness using EFI on Macs
  platform/apple-gmux: use apple_brightness to save brightness to EFI

 drivers/firmware/efi/Kconfig                  | 10 +++
 drivers/firmware/efi/Makefile                 |  1 +
 drivers/firmware/efi/apple-brightness.c       | 67 +++++++++++++++++++
 drivers/platform/x86/apple-gmux.c             | 21 ++++++
 .../linux/platform_data/apple-brightness.h    | 20 ++++++
 5 files changed, 119 insertions(+)
 create mode 100644 drivers/firmware/efi/apple-brightness.c
 create mode 100644 include/linux/platform_data/apple-brightness.h

-- 
2.43.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-03-16 10:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-15 22:19 [PATCH v3 0/2] Save Brightness on Macs Atharva Tiwari
2026-03-15 22:19 ` [PATCH v3 1/2] efi: Save Brightness using EFI " Atharva Tiwari
2026-03-15 22:47   ` Randy Dunlap
2026-03-15 22:20 ` [PATCH v3 2/2] platform/apple-gmux: use apple_brightness to save brightness to EFI Atharva Tiwari
2026-03-16 10:16   ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox