Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1167546rdd; Wed, 10 Jan 2024 10:34:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IEPfX6kM3xgZNBgrPRPndhDfCjhDGPXL9+UjN3N/kJBP6G6mnkBgyBk2PiNiybFehZyjfgA X-Received: by 2002:a05:6a20:6a25:b0:19a:3d00:cec8 with SMTP id p37-20020a056a206a2500b0019a3d00cec8mr518433pzk.95.1704911693355; Wed, 10 Jan 2024 10:34:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704911693; cv=none; d=google.com; s=arc-20160816; b=aU39ZRvGcIVWrN5cu+yhhxypluIzCR0Cxz5g7T2svbHyG4VGQcLjFUm2FVa+Y0ixnr PSyaDRTVXHjQH5ZOE6tEG61OGGetlC85LLPN4usPhVNnHqTAa2QyH9d1FCqFUcipP5HJ QKU+4WQ0JoqkRS0TeNQoZBLChkbMw4+D8edQzFnWf/DXFXgjl0I3bh9/Wr4ECWJ6p0Qz SVS4YSSap+wmCai/qP1BUDWWq63/dAXrrcErO2/RJNTq11n6AFln8DqFMy/2I33JrJf4 za2upOeJEjPkkwdqfoeTn7xR9LpnMXicq7/a2M0Hru5Cb6izyBU2f3ROSEXCTPrV7bPg +w0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=h+79PBe1CaM3kL/+sGAaA8TQXREzbo/JCsExVphnqkI=; fh=ORDL9uU9jtB6ntsTOQQHYPzSE76OS1kaa3f365OYzHE=; b=T2YhglYMZcWvzFpxlUbvc6y8QxgoLI71Ak3xLb/z51c8B58sFJJn7o611v0hy2Gb0n PrAOx0QygrK1xFnTKp8Sz//cYAIsh+PDQ4+i7lJ/znOVc2cOMhORBSjeBz9Gjzqli6gT AF1vZAB2QVlSvQngJB/sazRFSn4ZE+Cl0Bp9duSKCQDNguX+gfvjU1PBduhPMQ0T+15m Gjcf1t+T8q4aas/+Mk7B+HGUcSyoa1jse/3BDR9cUisSD3qA+/7behnzqK4XKxB/b+CW 2n1OlC2y12jngvhlv1g9LzcBqjS7EcmsyBG+kvJTZesT4CE0NmTcvs7s8awPCVH/M1Lf Qzgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=FMGBdkCd; spf=pass (google.com: domain of linux-kernel+bounces-22604-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22604-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id u9-20020a17090282c900b001d0bc650573si4128383plz.225.2024.01.10.10.34.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 10:34:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-22604-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=FMGBdkCd; spf=pass (google.com: domain of linux-kernel+bounces-22604-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22604-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id CD0E5288712 for ; Wed, 10 Jan 2024 18:34:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4A4B44D580; Wed, 10 Jan 2024 18:34:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="FMGBdkCd" Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B8EC81E4A6 for ; Wed, 10 Jan 2024 18:34:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-ed1-f50.google.com with SMTP id 4fb4d7f45d1cf-557535489d0so5196932a12.2 for ; Wed, 10 Jan 2024 10:34:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1704911682; x=1705516482; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=h+79PBe1CaM3kL/+sGAaA8TQXREzbo/JCsExVphnqkI=; b=FMGBdkCdEs2wMT13KMcwWPv17EpuhZNsOyUmlaiWdMqRP+uqZYWvlqyHCDEN8nn1wZ B5r1umd+1bw95zhaBCXgTOKZt0/p/Kr6RgRKlLc9lBYY/7YCgeKG27bpA4NNkXB/dkja 7/i3trOn1RIsHctNEvSRQwrZiCBhn6tbOB59A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704911682; x=1705516482; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=h+79PBe1CaM3kL/+sGAaA8TQXREzbo/JCsExVphnqkI=; b=M1lAvBSZvvRDq+w7YQZMMjU7pjm9ko7XoT44vHpDvHcfxnQfH0vbAnJaFZhVOqDACs 9nWRwAMF7rbMTFA81In7kwCdDUVeHoAPpQs+lMPPiKzHdlE3ixbHJbjOGE5Pf5yvRfVP 8FRXLiL6Q8TSCmeTMGA/+CaWbuRK7k70wDHzo1Nm4GT7yKy39W0dVccwW+hJ3sy5dD2h nSBtYw+DzDfmiWSwFU3zea+2kGLkwMLlrwY4Vr13pQxBO9rYquOsqiKHg2R9hYsBvz0T SCv/l3UyWWGwKO597OpxWO+kdWL8wR91euTD+NkcMzQaZtmVkfSsyBtPo5kvZ8keHal2 DxQQ== X-Gm-Message-State: AOJu0YysQLoEu6NlfpsKhfYtsaVNkdClK7j8LQx1RXxQiqhXBwcvvxHy KXAVk3smb/MRRepYABfzC0iUUMZBMQlmJ4wyGvtM0OtKDl8LhO4= X-Received: by 2002:a50:aa9b:0:b0:557:e00f:a499 with SMTP id q27-20020a50aa9b000000b00557e00fa499mr617796edc.78.1704911681875; Wed, 10 Jan 2024 10:34:41 -0800 (PST) Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com. [209.85.208.47]) by smtp.gmail.com with ESMTPSA id x17-20020aa7d391000000b00556cf695da0sm2219373edq.78.2024.01.10.10.34.41 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 10 Jan 2024 10:34:41 -0800 (PST) Received: by mail-ed1-f47.google.com with SMTP id 4fb4d7f45d1cf-553e36acfbaso891a12.0 for ; Wed, 10 Jan 2024 10:34:41 -0800 (PST) X-Received: by 2002:aa7:cd70:0:b0:557:1142:d5bb with SMTP id ca16-20020aa7cd70000000b005571142d5bbmr12737edb.4.1704911680835; Wed, 10 Jan 2024 10:34:40 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240103003355.747335-1-kai.heng.feng@canonical.com> In-Reply-To: From: Doug Anderson Date: Wed, 10 Jan 2024 10:34:23 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] HID: i2c-hid: Remove SET_POWER SLEEP on system suspend To: Kai-Heng Feng Cc: jikos@kernel.org, benjamin.tissoires@redhat.com, Maxime Ripard , =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= , Johan Hovold , Dmitry Torokhov , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, On Tue, Jan 9, 2024 at 11:31=E2=80=AFPM Kai-Heng Feng wrote: > > > I'd also note that I'm really not sure what ChromeOS dark resume has > > to do with anything here. Dark resume is used for certain types of > > events that wakeup the system where we can identify that the event > > shouldn't turn the screen on, then we do some processing, then we go > > back to sleep. I'm nearly certain that a trackpad / touchscreen wakeup > > event would never qualify for "dark resume". If we see a > > trackpad/touchscreen event then we'll wakeup the system. If the system > > is in a state where trackpad/touchscreen events shouldn't wake us up > > then we disable those wakeups before going to suspend... > > Doesn't Dark Resume use wakeup count to decide whether the system > should wake up or go back to suspend? > For this case the input report is empty, hence wakeup count remains > the same after the wakeup. I assumed Dark Resume will check the wakeup > count and decide to put the system back to suspend. Ah, I understand now. So you're saying that the issue wouldn't be so bad (or maybe we wouldn't notice it) on systems with dark resume. However, even with dark resume we're not in a super great shape. Doing a dark resume isn't exactly a lightweight operation, since it can take a bit of time to resume the system, realize that there were no wakeup events, and then go back to sleep. I'm not a total expert on dark resume, but I believe that even with dark resume, there may also be artifacts that a user might notice (like perhaps USB devices powering up or perhaps the suspend LED on the system showing that we're not in suspend anymore). > > It seems to me like the board you're testing on has some strange bug > > and that bug should be fixed, or (in the worst case) you should send a > > patch to detect this broken touchpad and disable wakeup for it. > > It's desired to keep the wakeup capability, disabling wakeup isn't ideal = here. > I'll write a patch to use touchpad specific quirk instead of applying > the change universally. Thanks! I'd also be curious if this is a problem for everyone with the Cirque touchpad or if it's board-specific. I could imagine the behavior you describe as coming about due to a missing or misconfigured pull resistor on the IRQ line. ...or perhaps a pull resistor pulling up to the wrong voltage rail... -Doug