Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3007019iog; Mon, 20 Jun 2022 09:12:19 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s4/AauaEQnXwX5DpeV8oO/a95+1fbuTx020/dCsr1CyVjjdVsk1XFPHB4kppGVx7XVEHdd X-Received: by 2002:a05:6402:403:b0:434:eb49:218f with SMTP id q3-20020a056402040300b00434eb49218fmr30682468edv.426.1655741539122; Mon, 20 Jun 2022 09:12:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655741539; cv=none; d=google.com; s=arc-20160816; b=XMu2PlrHk+K+0oKTo0mUenAFd+4fa7zpFJcQ9iE0M5/FOflQ6ST8qB+LfeYKc5w+Ri 6UqrDOak47ot/QQzkUA6zHDIjBTiw80EalQjkPwt/O5HMr7jRg14H1FywhO/uItpIkU3 5VZMreLjofSxXJavzoOUQFNWAceD012Gv18txSYVMBGoqsjmBAH+2qhNdy+4MZ+XRu/x la6mvE+yEalplVM1T018Ky2qr/2EGBHKAjEbNfiOlUrcYJOzIszfSCqgp9uG7iGiX90t vNA9tjdS68hp9lbAFnyYwma8iaj1RUiZNy7c/oxBGd3EDCe8j2qrVE09eucqJjYqxVNl iepw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Y87tteo65fPwP2KFKjtu1f8D6jluauyBet2xHwdc9hM=; b=whIJp6Xmt0vO/OEm7TQ6yTJd9BTIVi0GeusH2ADOX5uWxPvbEUwtU9zC3ka/OSDf5l u4ooK/KkYhg2sYpDVcYuulhBYKf6p2VDqBdBIKFoZ8dh7IW/b/BE8Jkk+t+sUweMDloq PPo1h8Izk8cUN/YFhVEpznDDkMYEx95tFVkcIzT2YNUkUgWvcWHrDIWtg1I75ZGKNND5 +l4w0TEIJdIzbho7DlBwFSca+VoaEzcF1fdof2WDNgHC5h6ek/g0K8lwEcvKcw5Uwzvr l1MEtauI7PEAgM8YCdzwT3c0LEYSoFBiTsN0ZeXM4QXCBGlsH4hbuQCeJpXDelgvdarY NT5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=VR3IMy6y; 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 dn14-20020a17090794ce00b0070d00528830si14453450ejc.221.2022.06.20.09.11.52; Mon, 20 Jun 2022 09:12:19 -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=20210112 header.b=VR3IMy6y; 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 S243388AbiFTQDO (ORCPT + 99 others); Mon, 20 Jun 2022 12:03:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229487AbiFTQDN (ORCPT ); Mon, 20 Jun 2022 12:03:13 -0400 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 917ED55B7; Mon, 20 Jun 2022 09:03:12 -0700 (PDT) Received: by mail-ed1-x52b.google.com with SMTP id es26so14057666edb.4; Mon, 20 Jun 2022 09:03:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Y87tteo65fPwP2KFKjtu1f8D6jluauyBet2xHwdc9hM=; b=VR3IMy6yFhkhF+Q30NdfXuDFk3tjHrqKWSO+wnLWXXxkIfXXClXX9moyzub2GN2nJz pUSCytPYZ12S+zqdkDFpO/wGdif8G9wzbRgutHvGAo44/Fymw9ZIZGW7aUBnhuVONkmQ N7W0XZJbzUypzqXEFLlb3mDVJtN933rbP+lGPYU+hs+izpOwqw6tXx1IFohl427Xo8eI zc91bUn3sQK/OClztUyOH5uz65T/VzkXZhWCgCSQ1a37JWUUISw50xYTb1LPSGU8XNGW 246gVosXHJbvwznd00lpEScKmt+lsisGS3L8tKKcOYovyVDHcvXDDce0e/1QxXvUV6H2 409Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Y87tteo65fPwP2KFKjtu1f8D6jluauyBet2xHwdc9hM=; b=tFX7g59SuhAprzzoK5ZOKFSa7HaORzNoadaw6GVC8b5ROHP1rT8ORn8NIvA1BNdYxm 2mYwLchlJdPnN3UdtrXb5tfd7H3ZIKdXmtsPiUescYz60mQVck0M7p83B+aOFIeTjMIA KCOJtD0LhzL47hX9fI2pBbMGZ4wFsGla1h2h2T0Iec9JSubmJZDre7RwD9vnCnG9QJBa fB2/YSKGhrqqFXVtS3PhrAZjE2+uRTKYKuO9HHtSFi3zVyViX7IjdjN0+NNrnZW7umR7 pG2xeP5cw5g0MWpWPWYniuiAX63CB+wkEXwtbtPqJBiUWBS+lq2UEKVQxLkwrT+m9I0a ap2w== X-Gm-Message-State: AJIora+BNoWFRR3QTolrNWOGgWh2x1W5f/Hn1Zi51tvymcphGCHdP3uF ona9tB5+KGllUf/lMtgP/JBpdDR8UD9a1jfcMmk= X-Received: by 2002:a05:6402:4390:b0:42e:b7e:e9ac with SMTP id o16-20020a056402439000b0042e0b7ee9acmr30648861edc.97.1655740991082; Mon, 20 Jun 2022 09:03:11 -0700 (PDT) MIME-Version: 1.0 References: <20220307141955.28040-1-alifer.m@variscite.com> In-Reply-To: From: Andy Shevchenko Date: Mon, 20 Jun 2022 18:02:34 +0200 Message-ID: Subject: Re: [PATCH] driver: pca953x: avoid error message when resuming To: Pierluigi Passaro , Wolfram Sang Cc: Alifer Willians de Moraes , Linux Kernel Mailing List , Bartosz Golaszewski , Eran Matityahu , Linus Walleij , "open list:GPIO SUBSYSTEM" , Francesco Ferraro Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 On Mon, Jun 20, 2022 at 4:18 PM Pierluigi Passaro wrote: ... > > > Avoids the error messages "pca953x 1-0020: failed reading register" > > > when resuming from suspend using gpio-key attached to pca9534. > > Thanks for your report and fix. My comments below. > > First of all, how many of them do you get and why is it a problem? > > The number of occurrences depends on the time required to I2C bus to fully wake-up. > It's not a real problem, but the message may lead to think about a real I2C problem. Wolfram, do we have any mechanisms that guarantees that I2C traffic is not going on a semi-woken up host controller? Writing this, I'm in doubt this patch is a fix we want. Wouldn't it just hide the real issue with some resume ordering? ... > > > + int is_in_suspend; > > Usually we call it is_suspended or so, check existing code by `git > > grep ...`. And it can be boolean. > > Do you mean soomething like in drivers/gpio/gpio-omap.c ? I believe almost any from the list `git grep -nl -w is_suspended` will suffice. -- With Best Regards, Andy Shevchenko