Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp5534568rwi; Mon, 17 Oct 2022 23:54:39 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4EA5uM1VhVpwDYETzFJ7wmRDK2vl0xO0Dya+KnBYoRBqk7bNPJQ/CgvtMRAnFWb6/DGn7q X-Received: by 2002:a17:906:cc16:b0:78d:ce93:f5af with SMTP id ml22-20020a170906cc1600b0078dce93f5afmr1121783ejb.592.1666076078868; Mon, 17 Oct 2022 23:54:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666076078; cv=none; d=google.com; s=arc-20160816; b=HVVtQ+hn9HQCQEKnQ1h6Kcd16JyWyiVTYcGVM/273NFc+GdiPYcu80ntu/mIVwQiNC K74rR918ADGd0WfslHfKOieLzFqGlVEkarDB+wunQhWSFKtlGijpHLAZjlWHCPuSGRXl PVu81QZDL8sYjIi0YnH5zHJMzbXH87MCHx+U5hayM8cyW7NtGNJch+AknObKeEMB+chE QCrclvCqSycGcYxky4VpoBeD+1keZZCKIjOfyP+O5F9/svfkKLNUHXE1ga+3nkVDK2s6 24yhGbznnj++6xCczravHpel1k9oVf+oX1kbKPgcIogbytwcX+/LmHJ7h1tDP6usVWKw fibA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from; bh=fd9h2fHDLCsLL4rOSfPqLcOZV1/YqVzFgDfUxoYHKUs=; b=zbbLkSBxgBEu7h48SDZpI29TnNM9UQY04qJ/j5m7AhwodCN/tUhpjZIKG6tafNaQ/b HB50XDO7cuS/6LW7rd279AHqs3Q1CSUQlx065jb0y7JPEQ8ftf6+GHfWkbxaG5urBxXy yfcaHF6v9bwmGm0vpMb9gYthrH5OaNjrLl/RNOtZF4wc2XxshPgSJY0h/O146WDEzwLv j3gDLf7AmLbwxYegsEEB4jpyNpT4Ws2fFuiubqCiLNJxtlSysy4JTyH2XmKGBlVW1t3p dC6QyU94XYcoLtMly9J2BL/Gg8OZH1jyuCq6kZCPhXAhCMQ5z8UkIpC/ZFlIfXaODuIK UMvQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ho36-20020a1709070ea400b007919f213511si269257ejc.951.2022.10.17.23.54.13; Mon, 17 Oct 2022 23:54:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230034AbiJRGXX (ORCPT + 99 others); Tue, 18 Oct 2022 02:23:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229525AbiJRGXT (ORCPT ); Tue, 18 Oct 2022 02:23:19 -0400 Received: from smtpbguseast1.qq.com (smtpbguseast1.qq.com [54.204.34.129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24E559AFFA; Mon, 17 Oct 2022 23:23:08 -0700 (PDT) X-QQ-mid: bizesmtp80t1666073706t6ngp5r2 Received: from localhost.localdomain ( [58.240.82.166]) by bizesmtp.qq.com (ESMTP) with id ; Tue, 18 Oct 2022 14:15:01 +0800 (CST) X-QQ-SSF: 01400000000000B0L000000A0000000 X-QQ-FEAT: RrZlkntZBfkO1zuyo6mQi/AMMkM1s35cFr2TFrzSvY2FV1QmOzOfeDuYz27oJ Q1Jkdev5h9or4exEYxbYSDVrqd6y3smAEbUyu7eiZb9tSpWBtu7y1cZW8Nn3yiRWH8cGINu 3ZoNLC2cSgek7HJ1Xc9kAtJe9BstGxsLNpM2NEHEUnLrHL3Copk4C80ymw23QVOaA/p6Pij /2pzQF5pxAewMAUIGpnFlJDmcPgnBXqYmPzKE3CuJA7JH8odfw6ZNd7uG4pjlXvWbnFS4ZS OWjwLlcz80bItVobIk5+1XPrIJTYvYO11VfUnNy2FkBQSXWvuLrd69PZzVcB0Qc3d7YKzvs xYlNHlQ4scoFTmB3J4keTNYk7hTFf+heS8MCAwlwfM9fKXH8Ria3y0nfb8a19kpt0CQngEY X-QQ-GoodBg: 1 From: Manyi Li To: ike.pan@canonical.com, hdegoede@redhat.com, markgross@kernel.org Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, Manyi Li Subject: [PATCH] platform/x86: ideapad-laptop: Disable touchpad_switch Date: Tue, 18 Oct 2022 14:14:57 +0800 Message-Id: <20221018061457.26937-1-limanyi@uniontech.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:uniontech.com:qybglogicsvr:qybglogicsvr4 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ideapads for "Lenovo Yoga 3 Pro 1370" and "ZhaoYang K4e-IML" do not use EC to switch touchpad. Reading VPCCMD_R_TOUCHPAD will return zero thus touchpad may be blocked unexpectedly. Signed-off-by: Manyi Li --- drivers/platform/x86/ideapad-laptop.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c index abd0c81d62c4..20b8a94934b4 100644 --- a/drivers/platform/x86/ideapad-laptop.c +++ b/drivers/platform/x86/ideapad-laptop.c @@ -1533,6 +1533,24 @@ static const struct dmi_system_id hw_rfkill_list[] = { {} }; +static const struct dmi_system_id no_touchpad_switch_list[] = { + { + .ident = "Lenovo Yoga 3 Pro 1370", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo YOGA 3"), + }, + }, + { + .ident = "ZhaoYang K4e-IML", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_VERSION, "ZhaoYang K4e-IML"), + }, + }, + {} +}; + static void ideapad_check_features(struct ideapad_private *priv) { acpi_handle handle = priv->adev->handle; @@ -1542,6 +1560,7 @@ static void ideapad_check_features(struct ideapad_private *priv) /* Most ideapads with ELAN0634 touchpad don't use EC touchpad switch */ priv->features.touchpad_ctrl_via_ec = !acpi_dev_present("ELAN0634", NULL, -1); + priv->features.touchpad_ctrl_via_ec = !dmi_check_system(no_touchpad_switch_list); if (!read_ec_data(handle, VPCCMD_R_FAN, &val)) priv->features.fan_mode = true; -- 2.20.1