[PATCH v4 0/3] Let other drivers react to platform profile changes

Mario Limonciello
2021-10-26T19:08:56Z

Currently only one driver can register as a handler for a platform profile.

This limitation means that if multiple drivers want to react to platform
profile changes that they will need to directly interact with individual
drivers.

Instead introduce a notification flow that drivers can register for event
changes. The idea is that any driver that wants to can:
1. read the current profile
2. set up initial values
3. register for changes
4. react to changes

Changes from v3->v4:
* Simplify platform_profile_notify
- No need to check cur_profile as platform_profile_get does it
- No need to track ret as it's unused
Changes from v2->v3:
* Add patches to avoid collisions in hp-wmi and asus-wmi symbols

Mario Limonciello (3):
platform/x86: hp-wmi: rename platform_profile_* function symbols
platform/x86: asus-wmi: rename platform_profile_* function symbols
ACPI: platform_profile: Add support for notification chains

drivers/acpi/platform_profile.c | 46 +++++++++++++++++++++++++++-----
drivers/platform/x86/asus-wmi.c | 12 ++++-----
drivers/platform/x86/hp-wmi.c | 12 ++++-----
include/linux/platform_profile.h | 10 +++++++
4 files changed, 61 insertions(+), 19 deletions(-)

--
2.25.1