Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6138564rwr; Mon, 1 May 2023 17:28:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4o1J8mOo7Myno2IXyKRKT3PM1poA28Oq2xWl5qSflULxCv10xmpIl0uRdZL/8clZLN+Mdx X-Received: by 2002:a17:903:245:b0:1a9:37f4:6345 with SMTP id j5-20020a170903024500b001a937f46345mr18270939plh.12.1682987338660; Mon, 01 May 2023 17:28:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682987338; cv=none; d=google.com; s=arc-20160816; b=BPm7cKiNmows5merRK+kzcL/A/H8oxsKVlfTH15Vw9GXJmX40LDZygtFBK8LJL7k3W DuJQ4TUGVNhazPBPXdf/2izt4AyuFo7+qgrj9n58MGfAHJVKPe3hGk/2CcvIV2VsOJPN +5xuoDGfeRGVs8B+PhV3j+O6oBDAEPjM0CrUFbHNWaEPhR02zLz0vVzI1b0W/y9RdVVx PmBhKWUgQZci5sbGROivpV6C/Aq8cyYquwuBZZl20Tzia0ZZs9OoERndylYRkSwVlWJ5 HE7WCDu0GOFz6ZbE6P/dimA5gt2S5w/kCKt9hfCIEGVrn9NlTVV4WpPfLqDS8O5NICMw ExaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=SEMtZF0VN0xwVsvNM/awj6CEFn2nLNLPzgXwSp1mSEw=; b=XdBWmth6O1nVVSff0sgRvdHBbMkoJxY2Pll4bRzEtj9IlRDN5W8psQrD1jCE0N0LqS BK2+CZWQRYPPEfhG8Shee1c0fvg0M2/MFzOdb0Vol9aAUMOQfZHx00wHYrI/zQaoweDr I/VE3z/sCt5jNaYJ3gNoF8iDXPgcUrXbZBPk4oMIj1QqUMBZEcDl1tiT7hyQRvX2s82W 0RFMm7zyYJzG4fDabN08CqKV4uh4LcAGa1Xan8fm3zSoYJdES0dDU14YbF46Dzd4qg3a X53Ai28s0iA9Ctpy0y8AYGZTgxNgJGhqxSxEQ0Cu8Kt6FBdxL8O5jMgmZKij+8vTHwsX wXJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=gqO+s7nz; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c11-20020a170902d48b00b001a97c1afb8asi20968654plg.622.2023.05.01.17.28.42; Mon, 01 May 2023 17:28:58 -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; dkim=pass header.i=@gmail.com header.s=20221208 header.b=gqO+s7nz; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232658AbjEBAWa (ORCPT + 99 others); Mon, 1 May 2023 20:22:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229863AbjEBAW3 (ORCPT ); Mon, 1 May 2023 20:22:29 -0400 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CB7110E9; Mon, 1 May 2023 17:22:28 -0700 (PDT) Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-1aad6f2be8eso25780455ad.3; Mon, 01 May 2023 17:22:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682986948; x=1685578948; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=SEMtZF0VN0xwVsvNM/awj6CEFn2nLNLPzgXwSp1mSEw=; b=gqO+s7nzSwtFbMVqr8LJCptEz9BKlNeP6x7v0Bi2h9b3c+egbQH6WOhidVDBel2pm6 Ne0ZFed250Pw1773fu3nlAmgOOQ7xmO3F0FT2k7DAA3IPyKfmZJrPkKptSMivk4adScf TI21mjcJLqHvkySmGJK0ZZuoDDyoMolqnhWPGdYRS5WvR3KNfN5WO1g8pgsOyJ2+uFIn Cdx0Xwx9xYHQWBBluFz+/IJoKAxBxafr3s3boX7VVPyaFirMOA5DCHy3K8ebJx9A0L6F VHJkMXvticNyQ+/EW3CF1244Uo89yHkzYTN84BjS8xMIt/FMK9YK1jZXwRVxnB9UGukm RLMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682986948; x=1685578948; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=SEMtZF0VN0xwVsvNM/awj6CEFn2nLNLPzgXwSp1mSEw=; b=jvCJK15sOrLE5IEVVk9KYAukdRLdBDkErSv6nQA/eY18GuXM2QCqAbKpaZFhPawuLv byxb95HWOxawhRPA3Gfj/AqMhrB+t5nHbixIDglpwq18j5zpatNxRty6zygvJztYDlZX xEPiZIaVtpibyNJA91qSgFzA7+Kjda0Zd9E6v0qHZNMooXBEwBv83IVclC5+VOUa1msc umnGepGxudND64TrqJ8oudKWUtYKPs3jvYhjxJE+zpk0F6FbXpYyv2jmHlIWFsCONowd DmGE06b5RWgVPsV5A4r1jZkYo8FpnbB9o/m6xFHd+DChP9MGfG7hx/ISEKaTmb/7kgEz zn5Q== X-Gm-Message-State: AC+VfDxhsrWD741pOYXaK6bJJsBWezqrS4zUU3bwIbdPxQpdCG/JK0qX MwhIXGlqSsSOV77iTe/TzLPEgLAHe5w= X-Received: by 2002:a17:903:234c:b0:1a6:b247:4316 with SMTP id c12-20020a170903234c00b001a6b2474316mr19639948plh.62.1682986947701; Mon, 01 May 2023 17:22:27 -0700 (PDT) Received: from google.com ([2620:15c:9d:2:b6ce:736b:e4f7:adb]) by smtp.gmail.com with ESMTPSA id r21-20020a170902ea5500b001a988a71617sm11660577plg.192.2023.05.01.17.22.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 May 2023 17:22:26 -0700 (PDT) Date: Mon, 1 May 2023 17:22:23 -0700 From: Dmitry Torokhov To: Maximilian Weigand Cc: Linus Walleij , Rob Herring , Krzysztof Kozlowski , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Alistair Francis Subject: Re: [PATCH v2 6/6] Input: cyttsp5 - implement proper sleep and wakeup procedures Message-ID: References: <20230501113010.891786-1-mweigand@mweigand.net> <20230501113010.891786-7-mweigand@mweigand.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230501113010.891786-7-mweigand@mweigand.net> X-Spam-Status: No, score=1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,FSL_HELO_FAKE, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * 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 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? > +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(). > + cyttsp5_enter_sleep(ts); > + return 0; > +} Thanks. -- Dmitry