platform/x86: ideapad-laptop: Stop writing VPCCMD_W_TOUCHPAD at probe time
authorHans de Goede <hdegoede@redhat.com>
Thu, 17 Nov 2022 11:02:43 +0000 (12:02 +0100)
committerHans de Goede <hdegoede@redhat.com>
Mon, 21 Nov 2022 10:16:41 +0000 (11:16 +0100)
Commit d69cd7eea93e ("platform/x86: ideapad-laptop: Disable touchpad_switch
for ELAN0634") from Janary 2021 added a flag hiding the touchpad sysfs-attr
and disabling ideapad_sync_touchpad_state() because some devices
"do not use EC to switch touchpad".

At the same time this added a write(VPCCMD_W_TOUCHPAD, 1) call at probe
time on these same devices. This seems to be copied from the rfkill code
which does something similar when hw rfkill support is disabled.

But for the rfkill code this is known to be necessary on some models,
where as for the touchpad control no motivation is given for doing this
and prior to this patch there were no reports of needing to do this.

So this seems unnecessary; and it is best to avoid poking the hardware
unnecessary to avoid unwanted side effects, so remove this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Tested-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Tested-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Link: https://lore.kernel.org/r/20221117110244.67811-6-hdegoede@redhat.com
drivers/platform/x86/ideapad-laptop.c

index 9b36cfddd36fbcb1e17eb7de5ac3bad32428a95b..fc3d47a7594436889874ad40faf74b4a39b9c6d1 100644 (file)
@@ -1875,10 +1875,6 @@ static int ideapad_acpi_add(struct platform_device *pdev)
        if (!priv->features.hw_rfkill_switch)
                write_ec_cmd(priv->adev->handle, VPCCMD_W_RF, 1);
 
-       /* The same for Touchpad */
-       if (!priv->features.touchpad_ctrl_via_ec)
-               write_ec_cmd(priv->adev->handle, VPCCMD_W_TOUCHPAD, 1);
-
        for (i = 0; i < IDEAPAD_RFKILL_DEV_NUM; i++)
                if (test_bit(ideapad_rfk_data[i].cfgbit, &priv->cfg))
                        ideapad_register_rfkill(priv, i);