Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp377020rdb; Tue, 23 Jan 2024 02:26:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IGagMKvt45HTUoZVZuD4oru5XPqJNOxnodfF/O39cYBj4kY45IUMbuJNqWPC5MzQjBgLwqW X-Received: by 2002:a17:903:2441:b0:1d7:724b:8a2f with SMTP id l1-20020a170903244100b001d7724b8a2fmr285610pls.56.1706005609670; Tue, 23 Jan 2024 02:26:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706005609; cv=pass; d=google.com; s=arc-20160816; b=gt42ILlX0SN9I9003IiTNTUiwxryA1pCXBv0HAK+rmbH5EG4QkFwjDZXxrNrWgycGs y2f0gUYqDIYPt8f2nE58cVk3B2t+RTwfVqnDzAbOlaMd9Ru76p+bWEqBqWm8yiGG1sXR lA2O4msFUm7+KoMmn97iMeOM+pWB+F4P7lKKsIWs3fglp8821ykqgXn02GxaeApCld1b p/Xb10eBuMuophBJV+kXd3jioCax/p4L4YZ31oLmvQkIArE/rkNXT1++0kMokywMR6f9 6JYhpL/6OlgoguSMeobJRi1W3dioSSaY1DOoBbIU45hMMpzK2ehJfU+0k/9+0mVQdiaQ jfQQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:references:message-id:in-reply-to:subject:cc:to:from :date:dkim-signature; bh=rivst7HJUm4zHw+T6BHK8cgLtP2Ve2E+/PlZ1ZP1/Ec=; fh=gfTc4s9mNzKQS8io5SFPazC3eVnvrUKyRkf4fVaORlg=; b=tSq2zbk1SXTaTfCnW1a6cJkAGt3bUrwEMXW4COBNnoB7F0K/Nba/NgVOXgpJri5Dma BOBW8683g0ICsE5oG4FHIKaLDQw7/ti0HzsbH0mUDZFFXr0f0nRmBn3ROHY4IxKClwAS WKP8s2i1a3ho5ixMwQESNIO/l2X4LQVyl0WXn/d7S3LHTTK9yFmHe69or5nc3ksqxsp0 w1EVpQy3fDZag+KTr9sFcuXV/7VesUbNTJs3DAMumHMp3FMgxRm2LN4Mte15mzGmZuDi 0vNuf1/05UpCJsqy2jpNgsqgKFRejD91n6FG5k6KAG6O9gF745NUmcmk35/+4zoACrj/ oFoA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BSw4b3hU; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-35087-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35087-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id o13-20020a170902d4cd00b001d75c4f3ef4si2552639plg.41.2024.01.23.02.26.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 02:26:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-35087-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=@kernel.org header.s=k20201202 header.b=BSw4b3hU; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-35087-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35087-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 418E5283BAA for ; Tue, 23 Jan 2024 10:26:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 94E815BAEB; Tue, 23 Jan 2024 10:26:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BSw4b3hU" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C08BDEEA9; Tue, 23 Jan 2024 10:26:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706005601; cv=none; b=LlMoAkXiiW9xMFvwgpTn7j7iGTr/2EAFZAtSO9lOG2Vx3zYXuE1E8VQyAV1jp/1625MffLDHOYGlRN4HSCHiaGiERsZS5d1BcBufykSfZleqC+sxaizx0w27k3eRbozk2kqCGgagAlbSbgDX7O0NVWO4w8OCZmhV2WpBUtRqJeM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706005601; c=relaxed/simple; bh=DR+zgKNWJaIggO6xvI5mXauOg5o07Q+mfafKQsQ+U+E=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=shGx5TUwXby2GUti6Jm0MAQsHP/XLUthIi7AeMDHaOe1Uu1WfWWsPkDyfYfO8/ddJuF3yTJYlD3f4b7nZD59Xn/6VW+61AY+b4KDUkeEJWPbcSgfSuwU+AIsrkYg2P7Agzv0L4LM2Ru3boJr/34xQToDdkCDejYkk/hGhXLjLIo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BSw4b3hU; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D73EBC433C7; Tue, 23 Jan 2024 10:26:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706005601; bh=DR+zgKNWJaIggO6xvI5mXauOg5o07Q+mfafKQsQ+U+E=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=BSw4b3hUDD75X2tFed+8I/YY6i8CeyPlTmboyQP2YuWBW2qz3NCi49Ax2yH+qVrRs tIuOrWy4J5mq/GW5BEoHwppfiQy1un2ty4AazL+fMaKwqm2KYX6k8Im5iTGVan7O7b gp/b1+e7sdPGFrh3Y76fkBAlGjiieGKiZOUh7o/wjpODIH7g37eKyMM4jIIrWK7K93 rIlE8ZH2+8oWvbiuOFGh916rIqVe8NTEocmEytQNWe7aQnclTpC/0N24PHLn51SSOG Wab5IoYBlzojMG0haBzp4I15HEtjUPK93wHoqNDEjovnI7GVCe7TIej4GYJHDtzIzc 8H/0U4EUtTD1g== Date: Tue, 23 Jan 2024 11:26:41 +0100 (CET) From: Jiri Kosina To: Doug Anderson cc: Kai-Heng Feng , benjamin.tissoires@redhat.com, Hans de Goede , Maxime Ripard , =?ISO-8859-15?Q?Thomas_Wei=DFschuh?= , Johan Hovold , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] HID: i2c-hid: Skip SET_POWER SLEEP for Cirque touchpad on system suspend In-Reply-To: Message-ID: References: <20240115045054.1170294-1-kai.heng.feng@canonical.com> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII On Wed, 17 Jan 2024, Doug Anderson wrote: > > There's a Cirque touchpad that wakes system up without anything > > touched the touchpad. The input report is empty when this happens. The > > reason is stated in HID over I2C spec, 7.2.8.2: "If the DEVICE wishes > > to wake the HOST from its low power state, it can issue a wake by > > asserting the interrupt." > > > > This is fine if OS can put system back to suspend by identifying input > > wakeup count stays the same on resume, like Chrome OS Dark Resume [0]. > > But for regular distro such policy is lacking. > > > > Though the change doesn't bring any impact on power consumption for > > touchpad is minimal, other i2c-hid device may depends on SLEEP control > > power. So use a quirk to limit the change scope. > > > > [0] https://chromium.googlesource.com/chromiumos/platform2/+/HEAD/power_manager/docs/dark_resume.md > > > > Signed-off-by: Kai-Heng Feng > > --- > > v2: > > - Use quirk instead of applying the change universally. > > > > drivers/hid/hid-ids.h | 3 +++ > > drivers/hid/i2c-hid/i2c-hid-core.c | 6 +++++- > > 2 files changed, 8 insertions(+), 1 deletion(-) > > This seems OK to me. As per my repy to v1, it doesn't feel fully > explained what's going on. Why does it only wake the system without > touches if you put it to sleep first? Is it truly a hardware quirk with > the Cirque touchpad or is it a bug on the board you have it hooked up > to? In any case, perhaps it doesn't matter since you said you measured > power here and, on this touchpad it doesn't seem to save significant > extra power to go into sleep mode. ...so I guess I'd be OK w/ > > Reviewed-by: Douglas Anderson Applied, thanks. -- Jiri Kosina SUSE Labs