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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3DC14C004C0 for ; Mon, 23 Oct 2023 11:12:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229956AbjJWLMb (ORCPT ); Mon, 23 Oct 2023 07:12:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233639AbjJWLM1 (ORCPT ); Mon, 23 Oct 2023 07:12:27 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37821D6E for ; Mon, 23 Oct 2023 04:12:26 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 78A95C433C8; Mon, 23 Oct 2023 11:12:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1698059545; bh=As+EewmOuYHkg9hzkOx/m8VodXnIxSHKqmQzCjWru4s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2ZKIFV9y4UKzFS47dQL5q+Whq+oQLuaAAnQVFZ8Fc/9vCQ528wsUAxuyu9hY/1gSZ jlrCdKAR7f2bDWgdkXLf6zCwclWlk83rg6wCfPN6bnzXngwtBkhpY1j3YD+qGJE1pt cysRyCjCl+ExUjkhJZ1U9WHNRRQBobyqWtkqurBY= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Haibo Chen , Bartosz Golaszewski Subject: [PATCH 6.5 214/241] gpio: vf610: mask the gpio irq in system suspend and support wakeup Date: Mon, 23 Oct 2023 12:56:40 +0200 Message-ID: <20231023104839.068142815@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231023104833.832874523@linuxfoundation.org> References: <20231023104833.832874523@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 6.5-stable review patch. If anyone has any objections, please let me know. ------------------ From: Haibo Chen commit 430232619791e7de95191f2cd8ebaa4c380d17d0 upstream. Add flag IRQCHIP_MASK_ON_SUSPEND to make sure gpio irq is masked on suspend, if lack this flag, current irq arctitecture will not mask the irq, and these unmasked gpio irq will wrongly wakeup the system even they are not config as wakeup source. Also add flag IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND to make sure the gpio irq which is configed as wakeup source can work as expect. Fixes: 7f2691a19627 ("gpio: vf610: add gpiolib/IRQ chip driver for Vybrid") Signed-off-by: Haibo Chen Signed-off-by: Bartosz Golaszewski Signed-off-by: Greg Kroah-Hartman --- drivers/gpio/gpio-vf610.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/gpio/gpio-vf610.c +++ b/drivers/gpio/gpio-vf610.c @@ -247,7 +247,8 @@ static const struct irq_chip vf610_irqch .irq_unmask = vf610_gpio_irq_unmask, .irq_set_type = vf610_gpio_irq_set_type, .irq_set_wake = vf610_gpio_irq_set_wake, - .flags = IRQCHIP_IMMUTABLE, + .flags = IRQCHIP_IMMUTABLE | IRQCHIP_MASK_ON_SUSPEND + | IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND, GPIOCHIP_IRQ_RESOURCE_HELPERS, };