aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEray Orçunus2022-10-29 15:03:06 +0300
committerGreg Kroah-Hartman2023-01-07 11:11:41 +0100
commit317499df9d702d8c4123661b044a79d1dcc92ee5 (patch)
tree864180c370b07129880c043078b720c1a6c678ca
parentf48a74ccb51990eb719fc467693be8d70fb85dc6 (diff)
platform/x86: ideapad-laptop: Revert "check for touchpad support in _CFG"
[ Upstream commit 5831882880e9a1749553e78f9d8369fe33116aaf ] Last 8 bit of _CFG started being used in later IdeaPads, thus 30th bit doesn't always show whether device supports touchpad or touchpad switch. Remove checking bit 30 of _CFG, so older IdeaPads like S10-3 can switch touchpad again via touchpad attribute. This reverts commit b3ed1b7fe378 ("platform/x86: ideapad-laptop: check for touchpad support in _CFG"). Signed-off-by: Eray Orçunus <erayorcunus@gmail.com> Acked-by: Ike Panhc <ike.pan@canonical.com> Link: https://lore.kernel.org/r/20221029120311.11152-2-erayorcunus@gmail.com Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/platform/x86/ideapad-laptop.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
index 3ea8fc6a9ca3..7192e0d2a14f 100644
--- a/drivers/platform/x86/ideapad-laptop.c
+++ b/drivers/platform/x86/ideapad-laptop.c
@@ -46,11 +46,10 @@ static const char *const ideapad_wmi_fnesc_events[] = {
#endif
enum {
- CFG_CAP_BT_BIT = 16,
- CFG_CAP_3G_BIT = 17,
- CFG_CAP_WIFI_BIT = 18,
- CFG_CAP_CAM_BIT = 19,
- CFG_CAP_TOUCHPAD_BIT = 30,
+ CFG_CAP_BT_BIT = 16,
+ CFG_CAP_3G_BIT = 17,
+ CFG_CAP_WIFI_BIT = 18,
+ CFG_CAP_CAM_BIT = 19,
};
enum {
@@ -386,8 +385,6 @@ static int debugfs_cfg_show(struct seq_file *s, void *data)
seq_puts(s, " wifi");
if (test_bit(CFG_CAP_CAM_BIT, &priv->cfg))
seq_puts(s, " camera");
- if (test_bit(CFG_CAP_TOUCHPAD_BIT, &priv->cfg))
- seq_puts(s, " touchpad");
seq_puts(s, "\n");
seq_puts(s, "Graphics: ");
@@ -680,8 +677,7 @@ static umode_t ideapad_is_visible(struct kobject *kobj,
else if (attr == &dev_attr_fn_lock.attr)
supported = priv->features.fn_lock;
else if (attr == &dev_attr_touchpad.attr)
- supported = priv->features.touchpad_ctrl_via_ec &&
- test_bit(CFG_CAP_TOUCHPAD_BIT, &priv->cfg);
+ supported = priv->features.touchpad_ctrl_via_ec;
else if (attr == &dev_attr_usb_charging.attr)
supported = priv->features.usb_charging;