Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4682282rwb; Mon, 21 Nov 2022 10:28:15 -0800 (PST) X-Google-Smtp-Source: AA0mqf5IFkMnwoW8dnnfztW2S9zb/OWXA5pir1S0x0D9TrVPETyjTlL3hefyDzGb/BEj9aZcGmza X-Received: by 2002:a05:6402:1015:b0:461:5f19:61da with SMTP id c21-20020a056402101500b004615f1961damr17499791edu.34.1669055295696; Mon, 21 Nov 2022 10:28:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669055295; cv=none; d=google.com; s=arc-20160816; b=zAjHBvcBEgu/JO4QMkFJkpS0LkHf+XhBkRNO9+76e6g8nv2mo2ZoedRnkx/EVDv+IM V8UzMmUZNno+2XvCEhhoDy0wZDpCH6nb0+hnKBkrkgMeDtJcEZfAopva4A5sG2Uydwxy /0amv8+KYqvQerD0ClMxZiNsl3y34mfbQ3uoBVRuv0HV7qx+gg2c131uE53OTh3GnKZq FqTvRYQERTBid7hcQpOJ4DkGG+xh6e4OZkx+DXlpf/edFqandlQW2f4g/g+91+hUrYlZ 6kZ90UwKHwcMby5jiUo2sjRHlYUH7vRytcVyV2JUCOkx2QMgzxQ9qfRIFTN1wws53nD0 gxoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=BWo4nIkQ0GrwRHe98XnuVuk6PFmOaXGoVxYLbpHdYxA=; b=zoV01kP4paMdXnuoQMh9D7C4elgSsXUQnElpHVJtXuNAXEgvosQmWJvWdl5ZmVs9df a1AC5C8oyxwjyKon2XdQ31W6dw23l6hU1j9/AL85ZK3+5KVShe09+Uf0k7dOy93Z+4wd gTGcOj5WsAQbpGf0Xt1Qf2mBqADoNNJuNgySuFpteCmn5K+gqxZJaP9vvvFmP2DOPUNe 2bM2rQzzKGfSmxZXNKZe2PPg3rWnNkOqwUVDgAqylkh9Ux0qlISIAmJoE0Npd5RXkSvt Gy0vmTSo8Etgfo8+jOJsxYdv4JIM3PJlctkgQucoOTceDZ7d5kA1IhNhD4nSTGLqKlqw whRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BbZP6mzK; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m11-20020a170906258b00b007829f6fed9dsi6858609ejb.232.2022.11.21.10.27.43; Mon, 21 Nov 2022 10:28:15 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BbZP6mzK; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230517AbiKUR5F (ORCPT + 91 others); Mon, 21 Nov 2022 12:57:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230456AbiKUR45 (ORCPT ); Mon, 21 Nov 2022 12:56:57 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6547BD06E6; Mon, 21 Nov 2022 09:56:57 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0143B61374; Mon, 21 Nov 2022 17:56:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CE74BC433D6; Mon, 21 Nov 2022 17:56:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669053416; bh=GAP9lZfZvw9SH0sTlqysmIgXbX9sAMna+OEKuPsLI2k=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=BbZP6mzKyM0ZOHwkukBlO9k5XDMMjiwg+Ds8zBt1IoylrtKQtAdTrY9Z6EJ9fVkGX btdhBAQlbIy1LiVLIgqxC1Vhp8XN+VxgQFd0mZ/U3V/HE81OseVlTKxVPvoPHR5qIr 0IcRVascHSK+/4nLKmMDm+QiXpnQERoQ5pj7H4qo9NC3ySDXXyCf1OwtF4pKrAXwVf 6a+mGJjPQWDau31DcpmCebJcvgUaqcRDlOvrql/VSXu3eD/0TgOV9EvVbxI5KAI9ua OobOHz64SeuNJUWDmQXCPFlXYfAAg7HAtW22F4pzVXHstd8vRJP/9m+R1YUo61b0Lt mXfxpJNvapMmQ== Date: Mon, 21 Nov 2022 18:56:54 +0100 (CET) From: Jiri Kosina To: Dmitry Torokhov cc: Benjamin Tissoires , Marge Yang , Matthias Kaehlcke , Hans de Goede , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] hid: i2c: let RMI devices decide what constitutes wakeup event In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,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 On Fri, 18 Nov 2022, Dmitry Torokhov wrote: > HID-RMI is special in the sense that it does not carry HID events > directly, but rather uses HID protocol as a wrapper/transport for RMI > protocol. Therefore we should not assume that all data coming from the > device via interrupt is associated with user activity and report wakeup > event indiscriminately, but rather let HID-RMI do that when appropriate. > > HID-RMI devices tag responses to the commands issued by the host as > RMI_READ_DATA_REPORT_ID whereas motion and other input events from the > device are tagged as RMI_ATTN_REPORT_ID. Change hid-rmi to report wakeup > events when receiving the latter packets. This allows ChromeOS to > accurately identify wakeup source and make correct decision on the mode > of the resume the system should take ("dark" where the display stays off > vs normal one). > > Fixes: d951ae1ce803 ("HID: i2c-hid: Report wakeup events") > Signed-off-by: Dmitry Torokhov Applied, thanks Dmitry. -- Jiri Kosina SUSE Labs