Files
linux-stable-mirror/drivers/platform/x86/hp/Kconfig
Alexis Belmonte d234302334 platform/x86: hp-wmi: Fix platform profile option switch bug on Omen and Victus laptops
Fix a platform profile option switch/getter bug on some Omen and Victus
laptops dismissing userspace choice when selecting performance mode in
inadequate conditions (e.g. by being disconnected from the AC power plug)
by

   -  hooking an ACPI notify handler through the
      omen_register_powersource_event_handler method that listens to AC
      power source changes (plugging in/out the AC power plug)

   -  keeping an intermediate active_platform_profile variable that is
      set when userspace changes the platform profile setting

   -  restoring the selected platform profile kept in
      active_platform_profile when AC power is plugged back into the
      laptop through the power_supply_is_system_supplied call check,
      unless if the user decided to alter the platform profile mid-way

Add a dependency to the POWER_SUPPLY subsystem to be able to check for
power_supply_is_system_supplied.

Introduce intermediary functions to leverage platform profile <->
internal thermal profile translation code from platform_profile_omen_set
and callers.

These changes makes the module compliant with the principles defined in
the Platform Profile Selection page of the Kernel documentation on those
kind of laptops; which is to not "(...) let userspace know about any
sub-optimal conditions which are impeding reaching the requested
performance level".

Since the Omen and Victus laptops share the same embedded controller
system, the fix is applicable to both categories of laptops.

Signed-off-by: Alexis Belmonte <alexbelm48@gmail.com>
Link: https://lore.kernel.org/r/Zovh22-7B1jI7sfF@alexis-pc
[ij: Made active_platform_profile_lock static]
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2024-07-09 15:16:52 +03:00

81 lines
2.4 KiB
Plaintext

# SPDX-License-Identifier: GPL-2.0-only
#
# X86 Platform Specific Drivers
#
menuconfig X86_PLATFORM_DRIVERS_HP
bool "HP X86 Platform Specific Device Drivers"
depends on X86_PLATFORM_DEVICES
help
Say Y here to get to see options for device drivers for various
HP x86 platforms, including vendor-specific laptop extension drivers.
This option alone does not add any kernel code.
If you say N, all options in this submenu will be skipped and disabled.
if X86_PLATFORM_DRIVERS_HP
config HP_ACCEL
tristate "HP laptop accelerometer"
default m
depends on INPUT && ACPI
depends on SERIO_I8042
select SENSORS_LIS3LV02D
select NEW_LEDS
select LEDS_CLASS
help
This driver provides support for the "Mobile Data Protection System 3D"
or "3D DriveGuard" feature of HP laptops. On such systems the driver
should load automatically (via ACPI alias).
Support for a led indicating disk protection will be provided as
hp::hddprotect. For more information on the feature, refer to
Documentation/misc-devices/lis3lv02d.rst.
To compile this driver as a module, choose M here: the module will
be called hp_accel.
config HP_WMI
tristate "HP WMI extras"
default m
depends on ACPI_WMI
depends on INPUT
depends on RFKILL || RFKILL = n
select POWER_SUPPLY
select INPUT_SPARSEKMAP
select ACPI_PLATFORM_PROFILE
select HWMON
help
Say Y here if you want to support WMI-based hotkeys on HP laptops and
to read data from WMI such as docking or ambient light sensor state.
To compile this driver as a module, choose M here: the module will
be called hp-wmi.
config TC1100_WMI
tristate "HP Compaq TC1100 Tablet WMI Extras"
default m
depends on !X86_64
depends on ACPI
depends on ACPI_WMI
help
This is a driver for the WMI extensions (wireless and bluetooth power
control) of the HP Compaq TC1100 tablet.
config HP_BIOSCFG
tristate "HP BIOS Configuration Driver"
default m
depends on ACPI_WMI
select NLS
select FW_ATTR_CLASS
help
This driver enables administrators to securely manage BIOS settings
using digital certificates and public-key cryptography that eliminate
the need for passwords for both remote and local management. It supports
changing BIOS settings on many HP machines from 2018 and newer without
the use of any additional software.
To compile this driver as a module, choose M here: the module will
be called hp-bioscfg.
endif # X86_PLATFORM_DRIVERS_HP