public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] ACPI: platform_profile: Let drivers dynamically refresh choices
@ 2025-01-06  4:45 Kurt Borja
  2025-01-06  4:45 ` [RFC PATCH 1/3] ACPI: platform_profile: Add ops member to handlers Kurt Borja
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Kurt Borja @ 2025-01-06  4:45 UTC (permalink / raw)
  To: platform-driver-x86
  Cc: josh, hridesh699, derekjohn.clark, Kurt Borja, Rafael J. Wysocki,
	Len Brown, Maximilian Luz, Hans de Goede, Ilpo Järvinen,
	Lee, Chun-Yi, Shyam Sundar S K, Corentin Chary, Luke D. Jones,
	Lyndon Sanche, Ike Panhc, Henrique de Moraes Holschuh, Armin Wolf,
	Mark Pearson, Mario Limonciello, Colin Ian King, Alexis Belmonte,
	Uwe Kleine-König, Ai Chao, Gergo Koteles, linux-acpi,
	linux-kernel, Dell.Client.Kernel, ibm-acpi-devel

Hello,

Some drivers may need to dynamically modify their selected `choices`.
Such is the case of the acer-wmi driver, which implemented their own
profile cycling method, because users expect different profiles to be
available whether the laptop is on AC or not [1].

These series would allow acer-wmi to simplify this custom cycling method
to use platform_profile_cycle(), as it's already being proposed in these
series [2]; without changing expected behaviors, by refreshing their
selected choices on AC connect/disconnect events, which would also solve
this discussion [3].

Additionally, I think the platform_profile_ops approach would enable us
to hide the platform_profile_handler in the future, and instead just pass
the class device to get/set methods like the HWMON subsystem does.

I think having this kind of flexibility is valuable. Let me know what you
think!

These series are based on top of pdx86/for-next branch.

~ Kurt

[1] https://lore.kernel.org/platform-driver-x86/6a9385e6-8c5a-4d08-8ff9-728ac40792d2@gmail.com/
[2] https://lore.kernel.org/platform-driver-x86/20250104-platform_profile-v2-0-b58164718903@gmail.com/
[3] https://lore.kernel.org/platform-driver-x86/20241210001657.3362-6-W_Armin@gmx.de/

Kurt Borja (3):
  ACPI: platform_profile: Add ops member to handlers
  ACPI: platform_profile: Add `choices` to platform_profile_ops
  ACPI: platform_profile: Add platform_profile_refresh_choices()

 drivers/acpi/platform_profile.c               | 39 ++++++++++++--
 .../surface/surface_platform_profile.c        | 24 ++++++---
 drivers/platform/x86/acer-wmi.c               | 35 ++++++------
 drivers/platform/x86/amd/pmf/sps.c            | 23 +++++---
 drivers/platform/x86/asus-wmi.c               | 24 ++++++---
 drivers/platform/x86/dell/alienware-wmi.c     | 19 ++++---
 drivers/platform/x86/dell/dell-pc.c           | 34 +++++++-----
 drivers/platform/x86/hp/hp-wmi.c              | 53 +++++++++++++------
 drivers/platform/x86/ideapad-laptop.c         | 23 +++++---
 .../platform/x86/inspur_platform_profile.c    | 22 +++++---
 drivers/platform/x86/thinkpad_acpi.c          | 23 +++++---
 include/linux/platform_profile.h              | 16 ++++--
 12 files changed, 237 insertions(+), 98 deletions(-)


base-commit: 6b228cfc52a6e9b7149cf51e247076963d6561cd
-- 
2.47.1


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

end of thread, other threads:[~2025-01-08  6:39 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-06  4:45 [RFC PATCH 0/3] ACPI: platform_profile: Let drivers dynamically refresh choices Kurt Borja
2025-01-06  4:45 ` [RFC PATCH 1/3] ACPI: platform_profile: Add ops member to handlers Kurt Borja
2025-01-06  4:45 ` [RFC PATCH 2/3] ACPI: platform_profile: Add `choices` to platform_profile_ops Kurt Borja
2025-01-06  4:45 ` [RFC PATCH 3/3] ACPI: platform_profile: Add platform_profile_refresh_choices() Kurt Borja
2025-01-07  2:19 ` [RFC PATCH 0/3] ACPI: platform_profile: Let drivers dynamically refresh choices Mark Pearson
2025-01-07 13:14   ` Hridesh MG
2025-01-07 15:51     ` Mario Limonciello
2025-01-07 16:33       ` Hridesh MG
2025-01-07 16:47         ` Limonciello, Mario
2025-01-07 17:25           ` Kurt Borja
2025-01-07 17:28             ` Limonciello, Mario
2025-01-08  6:39               ` Kurt Borja

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