Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6938449rwr; Tue, 2 May 2023 07:28:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7YjPlSAtif6WV8IMiyiSvDGiTHtFkqXElZdsU+Y4hQ3D3gafnL4qYcdJK3PYENgyR4dQch X-Received: by 2002:a05:6a20:2451:b0:f6:28de:89e1 with SMTP id t17-20020a056a20245100b000f628de89e1mr22555928pzc.33.1683037724855; Tue, 02 May 2023 07:28:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683037724; cv=none; d=google.com; s=arc-20160816; b=vlQVcvyh9u2ZMp3KsotIYtjk0WjTWoz8n9fv1ss3+YMUU80JeHe4GgRLlrAeHLgLmT xsZ3nPqc5MuZKGo9JVXwqtCYXV4ie7ShmVfB9ohlmO3ITJ9eSYP+vEWTDbhlhE2GFLD1 F+nOmzwBl9HMDDEKj893arSGVhACywsWn2a1PxHcac2Kv50/qjNy85sv6RZ/wFZPpu7y nNaRYOm9yEfF+BtN/P0CFlxo4TBOUQGQ1bkulpkRlOMGyCpzN42RKl10Y4+Su8LTYiWJ lWOixYlB8FI27A+AKsulQzViqCj4QiiVzecLDlCokWcp38439qY3cudT0gKi3BhLbOYE C75w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:ui-outboundreport:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id; bh=Cd1Tum9WBgan9twAeEwVv+Lv90OOxi12R71SWvVSzl8=; b=s4sNdItQYPSkZ75fwhbyNa26QCcjxy0s+xWHnr/48ekO4421aDeY+lavXO+x2w0KvI eohy/mxOELpwzfAaAwzpaWY1nkrA7+f23Ec35O0sFSWji+AnzCOCVtVQVue0mzf+YZOw xKjqhGA15Hc83fobD7uF6JyQaBEzKzEo08wWkUedhQSQgO4cRU7Bksho8vfYKRXMoNsq C7uJbpQQlu8lZUSBIFnb+K+zzs00E6r28lWncQGQYGAnXIsm9qYM/o3iRGYT+LLl23L9 bOyK2f30+mOVIEc4M3XXY9SEWhmwDTQ7l7iHzW0wnIHrr4WrXbOUP8HI8apPAHrGutTo oojA== 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 9-20020a630209000000b005289dd0ef00si12973937pgc.568.2023.05.02.07.28.30; Tue, 02 May 2023 07:28:44 -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 S234427AbjEBOV7 (ORCPT + 99 others); Tue, 2 May 2023 10:21:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234255AbjEBOV5 (ORCPT ); Tue, 2 May 2023 10:21:57 -0400 Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8270AE9; Tue, 2 May 2023 07:21:56 -0700 (PDT) Received: from [192.168.1.131] ([89.1.213.9]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MFshF-1q1pl938Xv-00HMw8; Tue, 02 May 2023 16:21:36 +0200 Message-ID: Date: Tue, 2 May 2023 16:21:35 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH v2 6/6] Input: cyttsp5 - implement proper sleep and wakeup procedures Content-Language: en-US To: Dmitry Torokhov Cc: Linus Walleij , Rob Herring , Krzysztof Kozlowski , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Alistair Francis References: <20230501113010.891786-1-mweigand@mweigand.net> <20230501113010.891786-7-mweigand@mweigand.net> From: Maximilian Weigand In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:k4ULv17YXMKTOkv6rlSNa1PjfF/ZPiL5SEta1j2EQ9eWxP9Ayvk ZbeeVxNbJaaeatLJDIHAoDPUzZFRarKWFCvF8xBYgrdVzut5xoZqj2P836URrnb/6Pjb31y NqEoBIMTdgJayqqLqBhOszUafQXY7gN6gqrKo6CLXzhSmiTUfbVUlNgsuFcJX2tFEeYJt5x +BqFgU8671+OTk0vCutZw== UI-OutboundReport: notjunk:1;M01:P0:7h04iMSCeOE=;3W+iz5QPr9D5XEnfuIce8D5mr4l OW9KIWFyf+vQRozEthO6X6GHsHDDFJ0kfgWFaVelTth1DYBIk9FmEneVwVA4AXtp7H9OrIFOi r6568X7M8UvkR0rWK7HJJ7TesGdcbx2qgcmHL3wrUIdWExCsMn+FZcQCswn0J1g7e9y8Xa7Zv nUTQFYUqkCEqStFhH8jL/9fUewdpAg+gWAbPp1rP6M1Aaooel/cY+E11VyosC94Fq4QASp170 eWkmvmmxG1W8UZo5e3ZsSTQVdsoXmmnEztP4GeQrE3SbqqWJdo/XQgfPDHZMvKcYLWMq8+Zxl M2XUPEs1TJvRER1ruDqbznTyTUblS7/3h+dX8V1Uv568nDoh1GISk+LUnEo9PU2SkG41tTSta ecYGH0WoIJNySUsrxb1Lvi53Sh1N2g7SyR2y7URQtqAjkjC8tidVhGjvii5jagKft/+obZAsr vC5bfGsuTZ71ugobcRtpa3G+e1juzhjIQWOU17SxLtwdnzukk4iOgg2QhcM1kUzmM+ILNUss5 y3gkHA5J8nwMrHZ/o/KQUOPi7+XPvYk+jXle871MSikIptZ1SASu5EqYK4lnBfB6pREl2nMf7 052WmXxCh6i3SFIjuC3DJCUEc09AE0tk7X9vwF8uE7ih6HopTboQs9Ca/qgmvmdTnacQDuNQj 8jkC6XfyVwkEVRICA1N7kyhca5bLbeDjW+KrXwLF1Q== X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE 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 Hi, On 02.05.23 02:22, Dmitry Torokhov wrote: > On Mon, May 01, 2023 at 01:30:10PM +0200, Maximilian Weigand wrote: >> struct cyttsp5 { >> struct device *dev; >> struct completion cmd_done; >> + struct completion cmd_command_done; > > Why do we need separate comletion? Do you observe some additional > traffic from the controller when powering it off and on? I checked and indeed there is no overlap in the different command types, so one completion will work. I will reformat correspondingly. >> +static int __maybe_unused cyttsp5_suspend(struct device *dev) >> +{ >> + struct cyttsp5 *ts = dev_get_drvdata(dev); >> + >> + if (!ts->is_wakeup_source) > > I believe the idiomatic way to check this is to call > device_may_wakeup(). Thanks for pointing that out. I will fix that, too. Thanks for the feedback and best regards Maximilian