diff options
author | Jorge Lopez <jorge.lopez2@hp.com> | 2022-03-10 15:08:51 -0600 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2022-03-14 16:25:24 +0100 |
commit | 520ee4ea1cc60251a6e3c911cf0336278aa52634 (patch) | |
tree | 6a2e3574513a014865147c01e8751fc50cabc838 /drivers/platform/x86/intel/pmt/class.c | |
parent | 12b19f14a21a2ee6348825d95b642ef2cd16794f (diff) |
platform/x86: hp-wmi: Fix SW_TABLET_MODE detection method
The purpose of this patch is to introduce a fix and removal of the
current hack when determining tablet mode status.
Determining the tablet mode status requires reading Byte 0 bit 2 as
reported by HPWMI_HARDWARE_QUERY. The investigation identified the
failure was rooted in two areas: HPWMI_HARDWARE_QUERY failure (0x05)
and reading Byte 0, bit 2 only to determine the table mode status.
HPWMI_HARDWARE_QUERY WMI failure also rendered the dock state value
invalid.
The latest changes use SMBIOS Type 3 (chassis type) and WMI Command
0x40 (device_mode_status) information to determine if the device is
in tablet mode or not.
hp_wmi_hw_state function was split into two functions;
hp_wmi_get_dock_state and hp_wmi_get_tablet_mode. The new functions
separate how dock_state and tablet_mode is handled in a cleaner
manner.
All changes were validated on a HP ZBook Workstation notebook,
HP EliteBook x360, and HP EliteBook 850 G8.
Signed-off-by: Jorge Lopez <jorge.lopez2@hp.com>
Link: https://lore.kernel.org/r/20220310210853.28367-3-jorge.lopez2@hp.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/platform/x86/intel/pmt/class.c')
0 files changed, 0 insertions, 0 deletions