Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4424002rdh; Wed, 29 Nov 2023 00:39:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IGl7CUMk3rlb+izCWxNkrSdcNdMSN8iyC/H8PA7tjEbRGqqiBpOWBIXOiY+45TuIHDruNwU X-Received: by 2002:a05:6a20:3e03:b0:18b:d229:1310 with SMTP id m3-20020a056a203e0300b0018bd2291310mr15605974pzc.35.1701247198491; Wed, 29 Nov 2023 00:39:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701247198; cv=none; d=google.com; s=arc-20160816; b=PEZdwyhKO68rqaOCDZqkqRQcPGmdhd9G9V7ZtoKZ4P7vnOBLDu/6SqOD7UmneXMDoh qEfVoORBVhPu+E3LG6UI4OXFZgLhYTdCpo+Bz9ad+JwRTXuBvvLEUF/syFBKcbQe3Naq r/Rj6MyNciKjK9rX0zjMhITn3QwYWCRDq3FEVSJCJzi9qFa9KHR9WN63scfRtn17XPn2 UB72zXnY7GKJUTqhJTn+Zl0RBwDKS5v+OcWS9+Eg88Lgma1u2E4OdqE/LRZznMr0s54v 81YoH3ONDeP850Z+RM134OuQLE32V1MAwevO5NBLKakKg5spsCbT2l1vY8MYIvzYgb8a yNMQ== 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=mOib7rWy47Nm6Pm6sRc8PFuUeDzx31McAS9zZgJt0S8=; fh=59PZC+djxGUP3m275QCpGeKuaYDU8QwCFhap2D9fK60=; b=p+cnMjzDiCnzTKpBazXjzc2MYV8tzegPgC21A5ikY4QfJA03p2/3xZmpZpBSGcyfh1 Tzu0sUJi+NDngr/aGygmYWB8c4l7CNO27k5JJAE7GsiER5JZYXGGHu6Qz8RyQNQbhCYb nps7BjyOgfPrjbnOgCB6MV+atOmZIg3ZspPIM1ZFFH73n/kr7R1f1hr+gTUgfIkeDPvq 2PByO4Url4mQHi/OHa4W1GhvuxoEuMUta9lMasx2dZ6WdUom9JRAFxe/FL8W7q5COfv8 oT+GwHfS9wRPNiXbHxg0GQ/v6hfNYPK8jNsFSCWdDlylEHi6bD3urABi76HdeGOQD9X1 9aCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@atomide.com header.s=25mailst header.b=k9iCPhXf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id k17-20020a056a00135100b006cdd47d2ac8si625722pfu.79.2023.11.29.00.39.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 00:39:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=fail header.i=@atomide.com header.s=25mailst header.b=k9iCPhXf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id D828E80A80FC; Wed, 29 Nov 2023 00:39:55 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231274AbjK2Ij2 (ORCPT + 99 others); Wed, 29 Nov 2023 03:39:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231243AbjK2IjP (ORCPT ); Wed, 29 Nov 2023 03:39:15 -0500 Received: from mail5.25mail.st (mail5.25mail.st [74.50.62.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 496A01BD1; Wed, 29 Nov 2023 00:39:08 -0800 (PST) Received: from localhost (91-158-86-216.elisa-laajakaista.fi [91.158.86.216]) by mail5.25mail.st (Postfix) with ESMTPSA id 633F960514; Wed, 29 Nov 2023 08:38:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=atomide.com; s=25mailst; t=1701247147; bh=4T2boRidFI8X28nZq5JoZ0Nop7HsXEFuU6HdeMnLYUk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=k9iCPhXf3wHSonjZls9kQPzVsqEbj1er44e00sKBvEUJo4lmUkLnF6fkTv7ipfyT2 XLq2qZaeF0OvlE00LdoP4nHpeSBKCqRzQojG8loLErM6JyC2haeGWWhWCT56ZKWj1z KLzIdZ1FPlHc0ic+x8q7X2UgwS5xuE+rvgdQpCZPKkJKu8+yNp18nA4MsEKRcwcQQa RMQlZNobYSmF9TPKEUXvmweZ/eG3IC6P1SsT2xQ92+aTb4INPPKxnfqH5QKVN4Cqon 81TSI/i9Yg+J3oWIN5EfnR4oLqggQuO/7IMejufJIq4yXZFTZH05sx54LCNvIHtoqQ AnDKOi2uRfSXw== Date: Wed, 29 Nov 2023 10:38:44 +0200 From: Tony Lindgren To: Dmitry Torokhov Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Rob Herring , Dhruva Gole Subject: Re: [PATCH v4 2/2] Input: gpio-keys - Add system suspend support for dedicated wakeirqs Message-ID: <20231129083844.GU5169@atomide.com> References: <20231124083241.40780-1-tony@atomide.com> <20231124083241.40780-2-tony@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 29 Nov 2023 00:39:56 -0800 (PST) * Dmitry Torokhov [231125 04:50]: > Hi Tony, > > On Fri, Nov 24, 2023 at 10:32:41AM +0200, Tony Lindgren wrote: > > + /* > > + * Wakeirq shares the handler with the main interrupt, it's only > > + * active during system suspend. See gpio_keys_button_enable_wakeup() > > + * and gpio_keys_button_disable_wakeup(). > > + */ > > + error = devm_request_any_context_irq(dev, bdata->wakeirq, isr, > > + irqflags, wakedesc, bdata); > > + if (error < 0) { > > + dev_err(dev, "Unable to claim wakeirq %d; error %d\n", > > + bdata->irq, error); > > + return error; > > + } > > + > > + /* > > + * Disable wakeirq until suspend. IRQF_NO_AUTOEN won't work if > > + * IRQF_SHARED was set based on !button->can_disable. > > + */ > > + disable_irq_nosync(bdata->wakeirq); > > Why _nosync() here and below? Is there any harm in sing the normal > variant? Well they are enabled the same time anyways for a while, so I see no harm using the normal variant here. Will post updated patches after some testing. Regards, Tony