linux-stable/drivers/platform/x86
Gwendal Grignou 00e34ff1ce platform/x86: intel-vbtn: Update tablet mode switch at end of probe
[ Upstream commit 434e5781d8 ]

ACER Vivobook Flip (TP401NAS) virtual intel switch is implemented as
follow:

   Device (VGBI)
   {
       Name (_HID, EisaId ("INT33D6") ...
       Name (VBDS, Zero)
       Method (_STA, 0, Serialized)  // _STA: Status ...
       Method (VBDL, 0, Serialized)
       {
           PB1E |= 0x20
           VBDS |= 0x40
       }
       Method (VGBS, 0, Serialized)
       {
           Return (VBDS) /* \_SB_.PCI0.SBRG.EC0_.VGBI.VBDS */
       }
       ...
    }

By default VBDS is set to 0. At boot it is set to clamshell (bit 6 set)
only after method VBDL is executed.

Since VBDL is now evaluated in the probe routine later, after the device
is registered, the retrieved value of VBDS was still 0 ("tablet mode")
when setting up the virtual switch.

Make sure to evaluate VGBS after VBDL, to ensure the
convertible boots in clamshell mode, the expected default.

Fixes: 26173179fa ("platform/x86: intel-vbtn: Eval VBDL after registering our notifier")
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20240329143206.2977734-3-gwendal@chromium.org
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-04-13 13:05:26 +02:00
..
amd platform/x86/amd/pmf: Fix a missing cleanup path 2023-09-13 09:42:57 +02:00
dell platform/x86: dell-sysman: Fix reference leak 2023-09-13 09:42:54 +02:00
hp platform/x86: hp-wmi:: Mark driver struct with __refdata to prevent section mismatch warning 2023-10-19 23:08:50 +02:00
intel platform/x86: intel-vbtn: Update tablet mode switch at end of probe 2024-04-13 13:05:26 +02:00
acer-wireless.c
acer-wmi.c
acerhdf.c
adv_swbutton.c
amilo-rfkill.c
apple-gmux.c
asus-laptop.c
asus-nb-wmi.c platform/x86: asus-wmi: Move i8042 filter install to shared asus-wmi code 2023-12-13 18:39:05 +01:00
asus-tf103c-dock.c
asus-wireless.c
asus-wmi.c platform/x86: asus-wmi: Move i8042 filter install to shared asus-wmi code 2023-12-13 18:39:05 +01:00
asus-wmi.h platform/x86: asus-wmi: Change ASUS_WMI_BRN_DOWN code from 0x20 to 0x2e 2023-10-25 12:03:15 +02:00
barco-p50-gpio.c
classmate-laptop.c
compal-laptop.c
dual_accel_detect.h
eeepc-laptop.c
eeepc-wmi.c
firmware_attributes_class.c
firmware_attributes_class.h
fujitsu-laptop.c
fujitsu-tablet.c
gigabyte-wmi.c platform/x86: gigabyte-wmi: add support for X570S AORUS ELITE 2023-04-26 14:28:37 +02:00
gpd-pocket-fan.c
hdaps.c
huawei-wmi.c platform/x86: huawei-wmi: Silence ambient light sensor 2023-09-13 09:42:22 +02:00
ibm_rtl.c
ideapad-laptop.c platform/x86: ideapad-laptop: Add support for new hotkeys found on ThinkBook 14s Yoga ITL 2023-08-30 16:11:05 +02:00
intel_ips.c
intel_ips.h
intel_scu_ipc.c platform/x86: intel_scu_ipc: Fail IPC send if still busy 2023-10-06 14:56:39 +02:00
intel_scu_ipcutil.c
intel_scu_pcidrv.c platform/x86: intel_scu_pcidrv: Add back PCI ID for Medfield 2023-06-09 10:34:08 +02:00
intel_scu_pltdrv.c
intel_scu_wdt.c
Kconfig platform/x86: asus-wmi: Move i8042 filter install to shared asus-wmi code 2023-12-13 18:39:05 +01:00
lenovo-yogabook-wmi.c platform/x86: lenovo-yogabook: Set default keyboard backligh brightness on probe() 2023-07-19 16:21:35 +02:00
lg-laptop.c
Makefile platform/x86: Move existing HP drivers to a new hp subdir 2023-05-24 17:32:42 +01:00
meraki-mx100.c
mlx-platform.c
msi-laptop.c platform/x86: msi-laptop: Fix rfkill out-of-sync on MSI Wind U100 2023-08-03 10:24:01 +02:00
msi-wmi.c
mxm-wmi.c
nvidia-wmi-ec-backlight.c
p2sb.c platform/x86: p2sb: On Goldmont only cache P2SB and SPI devfn BAR 2024-04-03 15:19:39 +02:00
panasonic-laptop.c
pcengines-apuv2.c
peaq-wmi.c
pmc_atom.c
samsung-laptop.c
samsung-q10.c
serial-multi-instantiate.c ACPI: scan: Create platform device for CS35L56 2023-08-16 18:27:31 +02:00
simatic-ipc.c
sony-laptop.c
system76_acpi.c
think-lmi.c platform/x86: think-lmi: Fix reference leak 2023-10-19 23:08:50 +02:00
think-lmi.h
thinkpad_acpi.c platform/x86: thinkpad_acpi: Only update profile if successfully converted 2024-03-01 13:26:37 +01:00
topstar-laptop.c
toshiba-wmi.c
toshiba_acpi.c
toshiba_bluetooth.c
toshiba_haps.c
touchscreen_dmi.c platform/x86: touchscreen_dmi: Add an extra entry for a variant of the Chuwi Vi8 tablet 2024-04-13 13:05:14 +02:00
uv_sysfs.c
winmate-fm07-keys.c
wireless-hotkey.c
wmi-bmof.c
wmi.c platform/x86: wmi: Skip blocks with zero instances 2023-12-13 18:39:06 +01:00
x86-android-tablets.c platform/x86: x86-android-tablets: Add Acer Iconia One 7 B1-750 data 2023-05-24 17:32:34 +01:00
xiaomi-wmi.c
xo1-rfkill.c
xo15-ebook.c