Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp12589135pxu; Sat, 2 Jan 2021 04:23:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJwAQoFsxeTkRr7S1LGEsT3wbLQ1azPEw+8AyNX8rpbEepAOgk7VQoy815ASGLrTcXY4f/51 X-Received: by 2002:a17:907:700c:: with SMTP id wr12mr59063393ejb.398.1609590226051; Sat, 02 Jan 2021 04:23:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609590226; cv=none; d=google.com; s=arc-20160816; b=KRz2imTG1WbOImmRqDQCmv4ITfMXAv7HgpMaIWglc1+e6J/6j3hoYRh34+1Xm+7mOn eVxWjAZna3VYVqihIqEBdOsb51RlygCDIc7OTZRewFTF1hpPGeMVo99h2sbetcUC0A/s nKO72NrT/UdQ50y2oi9MPLr4IezCUqEidIfcrXKRQARx0bwKcxAvWRbfGCeJJeAa8zu/ zJ7HCMkRT8c0uLurPCoJx5HxyXJ9Y3AR4ype1U1Ea13RXTOSlIPwC4lBiECTMOKMyOim +F+L9mgOvKva78/82ZggguvtinbCFOJIazrljW1g1KvSkwycwp/lPpnpTXSqw1xAzFhB PexA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:reply-to:cc:from:to :dkim-signature:date; bh=xeKFx/zvJeF3EOI2JHzXBLYuaUj021bIJFzj5apYGzs=; b=shNf0JQDho2z1xg5mkn1tDlrGKA/7OqxQ30o62DkxSsh/xX3nL4XkIT4Gi645YfShW AP3RrDuUZwcnkJ+BmitUkI0oxNPcqrZ1ABmGiJN+qQUOnYa65zYGMeSk2Co2NGuqf2Xf CN+LeMIzGZFa0iPLGacQ6+3n/CWkdK5xQRdYk8Ra1uCR5nj9ql/+DF8jwQ/v0DZIwU64 BxU5O5N5CxTz7sNmtrIp1cNVHM8wTMMx2OLsRR51a7sbKc+DjNFBUEvvB19O3Nq/BbSk RMBoo1SDWL7aJtx97CYjqKoKoY021LoFsB80CUMRJImF7g9t1v0iMVM19/63EEyTON+a 6wXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail header.b=WmZmcyfR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hq10si26415970ejc.616.2021.01.02.04.23.20; Sat, 02 Jan 2021 04:23:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail header.b=WmZmcyfR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726561AbhABMUb (ORCPT + 99 others); Sat, 2 Jan 2021 07:20:31 -0500 Received: from mail-40136.protonmail.ch ([185.70.40.136]:10675 "EHLO mail-40136.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726327AbhABMU3 (ORCPT ); Sat, 2 Jan 2021 07:20:29 -0500 Date: Sat, 02 Jan 2021 12:19:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1609589986; bh=xeKFx/zvJeF3EOI2JHzXBLYuaUj021bIJFzj5apYGzs=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=WmZmcyfRLRh7AKjO6USItaXwQjM4X6UUHS7RNYtEfmVWCDBe2oCwPtGNMgVVYk01P HUs3p+rvZTmN1AGfTd8bKs7TJIuMzUMVmqMSSmaeb0ThSAsyRpJF+XFyYZh2mPHI0K w5XxToiGjdnQONeNbC1Dww4MJrpSqj5G/9tQgoS8= To: Jiaxun Yang From: =?utf-8?Q?Barnab=C3=A1s_P=C5=91cze?= Cc: "platform-driver-x86@vger.kernel.org" , "stable@vger.kernel.org" , Ike Panhc , Hans de Goede , Mark Gross , "linux-kernel@vger.kernel.org" Reply-To: =?utf-8?Q?Barnab=C3=A1s_P=C5=91cze?= Subject: Re: [PATCH] platform/x86: ideapad-laptop: Add has_touchpad_switch Message-ID: In-Reply-To: <063eb02d-a699-3f6c-fd1b-721e9d195e82@flygoat.com> References: <20210101061140.27547-1-jiaxun.yang@flygoat.com> <_kQDaYPt7vh_mQfPr1tLJV2IP-p40OBPcU5zk-1xHhF9XJsm8Y-efANBgiRdWU-J2QTtOjmrfE0Tw6UrZpm6uG-zZGlfpaVOp9FuoKAbjzA=@protonmail.com> <063eb02d-a699-3f6c-fd1b-721e9d195e82@flygoat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2021. janu=C3=A1r 2., szombat 3:36 keltez=C3=A9ssel, Jiaxun Yang =C3=ADrta: > =E5=9C=A8 2021/1/2 =E4=B8=8A=E5=8D=881:09, Barnab=C3=A1s P=C5=91cze = =E5=86=99=E9=81=93: > > Hi > > > > > > 2021. janu=C3=A1r 1., p=C3=A9ntek 17:08 keltez=C3=A9ssel, Jiaxun Yang = =C3=ADrta: > > > >> [...] > >>>> @@ -1006,6 +1018,10 @@ static int ideapad_acpi_add(struct platform_d= evice *pdev) > >>>> =09if (!priv->has_hw_rfkill_switch) > >>>> =09=09write_ec_cmd(priv->adev->handle, VPCCMD_W_RF, 1); > >>>> > >>>> +=09/* The same for Touchpad */ > >>>> +=09if (!priv->has_touchpad_switch) > >>>> +=09=09write_ec_cmd(priv->adev->handle, VPCCMD_W_TOUCHPAD, 1); > >>>> + > >>> Shouldn't it be the other way around: `if (priv->has_touchpad_switch)= `? > >> It is to prevent accidentally disable touchpad on machines that do hav= e EC switch, > >> so it's intentional. > >> [...] > > Sorry, but the explanation not fully clear to me. The commit message se= ems to > > indicate that some models "do not use EC to switch touchpad", and I tak= e that > > means that reading from VPCCMD_R_TOUCHPAD will not reflect the actual s= tate of the > > touchpad and writing to VPCCMD_W_TOUCHPAD will not change the state of = the touchpad. > > I'm just trying to prevent removing functionality on machines that > touchpad can be controlled > by EC but also equipped I2C HID touchpad. At least users will have a > functional touchpad > after that. > Thanks for the clarification. > > > > But then why do you still write to VPCCMD_W_TOUCHPAD on devices where s= upposedly > > this does not have any effect (at least not the desired one)? And the p= art of the > > code I made my comment about only runs on machines on which the touchpa= d supposedly > > cannot be controlled by the EC. What am I missing? > > > > And there is the other problem: on some machines, this patch removes wo= rking > > functionality. > Yeah that's a problem. I just don't want to repeat the story of rfkill > whitelist, it ends up with > countless machine to be added. > > Maybe I should specify HID of touchpad as well. Two machines that known > to be problematic > all have ELAN0634 touchpad. I think that would be better since the Lenovo Yoga 520-14IKB 80X8 device I'm concerned about has a SYNA2B2C touchpad device, so at least that wouldn= 't be affected. Regards, Barnab=C3=A1s P=C5=91cze