From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 768B2395AFF for ; Tue, 12 May 2026 13:46:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778593565; cv=none; b=WIt+L1zMUronwSQkunct/Q+R6h/KNN3iu9hES6QG6GlJhoZCk/FRX2RJxKqqAkMp1cVunhd1LVuw/evNXSnvpbf4Zb4Gx0YTvDbxGPZIwPwInljXb9f8tott677Q3rVLbp5Wu+qeBCNKoywkvY9GlXQi8PA4EYrOnp85BW8VRnA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778593565; c=relaxed/simple; bh=Wjvj8//fukpF2+WEUohO4bFsG1jPm2aIM47+Nua7ZSk=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=In/Gv/GhpbunDSPigNm/ukediHVOEquWX9BP/5IaxQFXYtDVeSyLNivh0egVdoN+sP8H8vKAYZTPrVzCRyteY+4ejJ7Mg4ikoU81LL0sroQ80dtp0vBK87vszyp94giCS9CdiFZWT3QfRYAoBxP2RQeabkEPcqSbyrmNyC8HT28= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Nk9X8/bu; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Nk9X8/bu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA456C2BCB0; Tue, 12 May 2026 13:46:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1778593565; bh=Wjvj8//fukpF2+WEUohO4bFsG1jPm2aIM47+Nua7ZSk=; h=Subject:To:Cc:From:Date:From; b=Nk9X8/buZxYe2KMl+kIoLNlfbL3Xdm8U3YGZZgTO9ynexwG3TjXet+op44IZ25OFy 7Nzf0XOaUmXmRChOXWFcqbEruc1kWOLxxF3FF0C7wLQV7d+BAtw/k1F2ytjxb9c37O +9+Uj4mbAvG/MgG8ntQ9EF3LAmeif9fh6P5icBXo= Subject: FAILED: patch "[PATCH] gpio: of: clear OF_POPULATED on hog nodes in remove path" failed to apply to 5.15-stable tree To: bartosz.golaszewski@oss.qualcomm.com,andriy.shevchenko@linux.intel.com,linusw@kernel.org Cc: From: Date: Tue, 12 May 2026 15:45:57 +0200 Message-ID: <2026051257-twine-stout-440d@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 5.15-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y git checkout FETCH_HEAD git cherry-pick -x bbee90e750262bfb406d66dc65c46d616d2b6673 # git commit -s git send-email --to '' --in-reply-to '2026051257-twine-stout-440d@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From bbee90e750262bfb406d66dc65c46d616d2b6673 Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Mon, 9 Mar 2026 13:42:37 +0100 Subject: [PATCH] gpio: of: clear OF_POPULATED on hog nodes in remove path The previously set OF_POPULATED flag should be cleared on the hog nodes when removing the chip. Cc: stable@vger.kernel.org Fixes: 63636d956c455 ("gpio: of: Add DT overlay support for GPIO hogs") Acked-by: Linus Walleij Reviewed-by: Andy Shevchenko Link: https://patch.msgid.link/20260309-gpio-hog-fwnode-v2-1-4e61f3dbf06a@oss.qualcomm.com Signed-off-by: Bartosz Golaszewski diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index c512d735e85f..b5610a847e72 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c @@ -1187,7 +1187,14 @@ int of_gpiochip_add(struct gpio_chip *chip) void of_gpiochip_remove(struct gpio_chip *chip) { - of_node_put(dev_of_node(&chip->gpiodev->dev)); + struct device_node *np = dev_of_node(&chip->gpiodev->dev); + + for_each_child_of_node_scoped(np, child) { + if (of_property_present(child, "gpio-hog")) + of_node_clear_flag(child, OF_POPULATED); + } + + of_node_put(np); } bool of_gpiochip_instance_match(struct gpio_chip *gc, unsigned int index)