Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 948454322FA; Sat, 12 Sep 2026 08:44:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789202647; cv=none; b=SiO1QWOtoRzqMT9Hfj25S8RU7lIWgYCQ+SCyumZ7payqaXtmZI6q4nTgQ3w+H5KaCsJ93N7cc2aGOvPzn5GZdJ6/+4DWWvcYSrWLDXh9LelrlelpKyVamil98V93/G6CPcQVRYHhA3TT5/37lR/rEYiAEq3z4/V13Uqe0I6uBHk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789202647; c=relaxed/simple; bh=79r3vY/HM4NEFs7rMbvNy1r6jOYOhjo41OdUD7vzJhQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NOcgeZ+BbjiV6JiAtuI1EhxGqcPDLXsW52pHvuMr4FO7WtdkRSeRgXUBwwchPl4emA5RT8L9UElkiKVxV8hPQ4VANMg9k4tdwQEW4jj/lWGtwgydm3LZ1aBMExAcUF0OF6knyUAN5cH9dzhE2jJCWFCvLFN2nWylgQV55Pu82OE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=W0vV6Hxb; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="W0vV6Hxb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AD92F1F00893; Sat, 12 Sep 2026 08:44:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789202642; bh=mhaqvFn97yJ2cF3y51fnsrBZoBH81uGamsh+dTln7cg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=W0vV6Hxb41Fi9kk4Wp7VoUG1IjVVrPTOr3WjJgmmHjs+q+IceduTkuVxMyVRj8C6b kb8NpvEuhnPFKTuDM+zrGGhU/5Dv7PGYFQo4LisW0foghYma59IQ0b3uzagDbZdzaH cTjlC3wJrfYytpro2b572yfU637Nv/jOJWcI1dks= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Mikhail Kshevetskiy , Lorenzo Bianconi , Linus Walleij , Sasha Levin Subject: [PATCH 7.2 1246/1815] pinctrl: airoha: fix IRQ mask/unmask code Date: Sat, 12 Sep 2026 08:49:56 +0200 Message-ID: <20260912065718.266370877@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065648.999753832@linuxfoundation.org> References: <20260912065648.999753832@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.2-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mikhail Kshevetskiy [ Upstream commit 20b996280640f492ebdd41c2d2c991801df75e61 ] When using IRQCHIP_IMMUTABLE, airoha_irq_unmask() must manually call gpiochip_enable_irq() and airoha_irq_mask() must call gpiochip_disable_irq(). Without these calls, gpiolib never sets the GPIOD_FLAG_IRQ_IS_ENABLED bit. Because this bit is missing, gpiod_direction_output() will not realize the pin is actively used as an interrupt. Fixes: 1c8ace2d0725 ("pinctrl: airoha: Add support for EN7581 SoC") Signed-off-by: Mikhail Kshevetskiy Acked-by: Lorenzo Bianconi Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- drivers/pinctrl/airoha/pinctrl-airoha.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pinctrl/airoha/pinctrl-airoha.c b/drivers/pinctrl/airoha/pinctrl-airoha.c index 4bbf97fdc2926..0be1fb9b918a2 100644 --- a/drivers/pinctrl/airoha/pinctrl-airoha.c +++ b/drivers/pinctrl/airoha/pinctrl-airoha.c @@ -2546,6 +2546,7 @@ static void airoha_irq_unmask(struct irq_data *data) if (WARN_ON_ONCE(data->hwirq >= ARRAY_SIZE(gpiochip->irq_type))) return; + gpiochip_enable_irq(gc, irqd_to_hwirq(data)); switch (gpiochip->irq_type[data->hwirq]) { case IRQ_TYPE_LEVEL_LOW: val = val << 1; @@ -2580,6 +2581,7 @@ static void airoha_irq_mask(struct irq_data *data) regmap_clear_bits(pinctrl->regmap, gpiochip->level[index], mask); regmap_clear_bits(pinctrl->regmap, gpiochip->edge[index], mask); + gpiochip_disable_irq(gc, irqd_to_hwirq(data)); } static int airoha_irq_type(struct irq_data *data, unsigned int type) -- 2.53.0