From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=atomide.com header.i=@atomide.com header.b="k9iCPhXf" 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> Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: * 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 13100C4167B for ; Wed, 29 Nov 2023 08:39:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+7+w9kcXmPGGCfy53cipcziE86dRAKwMbGAZ1h2IE3Y=; b=IU43kTWE1fhS2G mO5RLJlF0wVWgPiIKkkFw1KQcfE1XRd+0cu0cJBguMA7QXdM6ty6AeMW0Pe4FT8n3Ct6JfaHvdTGP tuinqYC7w60jrH4VqmCYFb197rzvFtjwuxNN6c9mB65Lhk4rHZ6IAQoPczyWH7nTOCuL9biXZDLxk Uz/TBby491/ZKC7wOGkFk/iiHX+mn+W+MB4CGWbPg1lHI0rMtANQFcqBl7fix7xEYUdc3zYdZhhY8 rWOg5QmFflapNRtNtVgAo/ef1tT47r8ufj4WPTR7/GO+hjZrGvOKxc9noJ43hY9E/3v4wByZX4AzE vsysyFk+LNmdbkNrXX2g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r8G6A-007UzX-0o; Wed, 29 Nov 2023 08:39:10 +0000 Received: from mail5.25mail.st ([74.50.62.9]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r8G67-007Uyu-2b for linux-arm-kernel@lists.infradead.org; Wed, 29 Nov 2023 08:39:08 +0000 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-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231129_003907_884736_52BE1C2E X-CRM114-Status: GOOD ( 17.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org * 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel