linux-stable/drivers/platform/x86
Gwendal Grignou ce64c26ba8 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:07:40 +02:00
..
amd platform/x86/amd/pmc: Disable keyboard wakeup on AMD Framework 13 2024-01-20 11:51:45 +01:00
dell Merge remote-tracking branch 'pdx86/fixes' into pdx86/for-next 2023-08-23 17:30:50 +02:00
hp platform/x86: hp-bioscfg: Fix error handling in hp_add_other_attributes() 2023-12-03 07:33:08 +01:00
intel platform/x86: intel-vbtn: Update tablet mode switch at end of probe 2024-04-13 13:07:40 +02:00
siemens platform/x86/siemens: simatic-ipc-batt: fix logical error for BX-59A 2023-08-10 10:46:13 +02:00
x86-android-tablets platform/x86: x86-android-tablets: Fix acer_b1_750_goodix_gpios name 2024-03-26 18:19:12 -04:00
acer-wireless.c
acer-wmi.c
acerhdf.c
adv_swbutton.c
amilo-rfkill.c
apple-gmux.c apple-gmux: Hard Code max brightness for MMIO gmux 2023-10-18 15:33:24 +02:00
asus-laptop.c
asus-nb-wmi.c platform/x86: asus-wmi: Move i8042 filter install to shared asus-wmi code 2023-12-13 18:45:03 +01:00
asus-tf103c-dock.c platform/x86: asus-tf103c-dock: Switch back to use struct i2c_driver's .probe() 2023-06-13 12:32:45 +02:00
asus-wireless.c
asus-wmi.c platform/x86: asus-wmi: Move i8042 filter install to shared asus-wmi code 2023-12-13 18:45:03 +01:00
asus-wmi.h platform/x86: asus-wmi: Change ASUS_WMI_BRN_DOWN code from 0x20 to 0x2e 2023-10-18 11:58:42 +02:00
barco-p50-gpio.c
classmate-laptop.c
compal-laptop.c
dual_accel_detect.h
eeepc-laptop.c Fix nomenclature for USB and PCI wireless devices 2023-08-25 12:56:49 +03:00
eeepc-wmi.c
firmware_attributes_class.c
firmware_attributes_class.h
fujitsu-laptop.c
fujitsu-tablet.c
gigabyte-wmi.c platform/x86: gigabyte: constify pointers to hwmon_channel_info 2023-05-16 10:36:56 +02:00
gpd-pocket-fan.c
hdaps.c
huawei-wmi.c platform/x86: huawei-wmi: Silence ambient light sensor 2023-07-25 16:38:03 +02:00
ibm_rtl.c
ideapad-laptop.c platform/x86: ideapad-laptop: Set max_brightness before using it 2023-12-03 07:33:08 +01:00
ideapad-laptop.h
intel_ips.c
intel_ips.h
intel_scu_ipc.c platform/x86: intel_scu_ipc: Fail IPC send if still busy 2023-09-18 15:15:15 +02:00
intel_scu_ipcutil.c
intel_scu_pcidrv.c
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:45:03 +01:00
lenovo-ymc.c platform/x86: lenovo-ymc: Add Lenovo Yoga 7 14ACN6 to ec_trigger_quirk_dmi_table 2023-08-21 13:08:32 +02:00
lenovo-yogabook.c platform/x86: lenovo-yogabook: Rename lenovo-yogabook-wmi to lenovo-yogabook 2023-05-09 12:36:09 +02:00
lg-laptop.c
Makefile Immutable branch between pdx86 simatic branch and LED due for the v6.6 merge window 2023-07-31 16:05:44 +02:00
meraki-mx100.c
mlx-platform.c platform: mellanox: Fix a resource leak in an error handling path in probing flow 2023-10-06 16:40:35 +03:00
msi-ec.c platform/x86: msi-ec: Fix the 3rd config 2023-10-11 11:22:06 +02:00
msi-ec.h
msi-laptop.c platform/x86: msi-laptop: Fix rfkill out-of-sync on MSI Wind U100 2023-07-25 16:35:58 +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-03-26 18:19:09 -04:00
panasonic-laptop.c
pcengines-apuv2.c
pmc_atom.c
samsung-laptop.c
samsung-q10.c
sel3350-platform.c platform/x86: Add SEL-3350 platform driver 2023-07-14 15:30:41 +02:00
serial-multi-instantiate.c ACPI: scan: Create platform device for CS35L56 2023-07-31 16:03:39 +02:00
sony-laptop.c
system76_acpi.c platform/x86: system76: Handle new KBLED ACPI methods 2023-07-26 11:00:07 +02:00
think-lmi.c platform/x86: think-lmi: Fix reference leak 2023-10-04 11:52:17 +02:00
think-lmi.h
thinkpad_acpi.c platform/x86: thinkpad_acpi: Only update profile if successfully converted 2024-03-01 13:35:08 +01:00
topstar-laptop.c
toshiba-wmi.c
toshiba_acpi.c platform/x86: toshiba: constify pointers to hwmon_channel_info 2023-05-16 10:36:56 +02:00
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:07:37 +02:00
uv_sysfs.c
winmate-fm07-keys.c
wireless-hotkey.c
wmi-bmof.c platform/x86: wmi-bmof: Simplify read_bmof() 2023-07-31 16:07:41 +02:00
wmi.c platform/x86: wmi: Skip blocks with zero instances 2023-12-13 18:45:03 +01:00
xiaomi-wmi.c
xo1-rfkill.c
xo15-ebook.c