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 67B353905E6 for ; Tue, 12 May 2026 13:46:00 +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=1778593560; cv=none; b=PI9PZDQvVZJwIoU3nxICq8GQcsXw7YaI8jPEuH9oWwId6lPwO61ofDpVS6PeyT5OMmbeTQTCXckUlhdMfopUOkaU8uDV8pD+BGeGsur4y1REsVQQ4n16XCgIfBl1Ftlgr/OhYRO3QiAQqFvBrArpTflrveatPaRqeBSMmGBOTRw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778593560; c=relaxed/simple; bh=5Bqo8j10snXHOxKJGBxl/LTRL+JUK5rZ6XxArrYG/Is=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=Mbezt6RxW2XGTNq4iQtQedmFxYpNKlhMR7SpykRR4/HpM4pxLyfDrY/uksSz8eKpTdYD8g3QsxA/TejhsmsFDUebG2pWMCXB43WTXAw6uSwWSQy8bqy53Nf3V7SjaOru6PDjxt8riIylQWAKpH/Qu5SyfYg+aOGCs7zTrpu0MAI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=uwSCvJi4; 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="uwSCvJi4" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AA2E2C2BCB0; Tue, 12 May 2026 13:45:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1778593560; bh=5Bqo8j10snXHOxKJGBxl/LTRL+JUK5rZ6XxArrYG/Is=; h=Subject:To:Cc:From:Date:From; b=uwSCvJi4cxWBzAWdHih/f1qWvOR8pC9zV2ul4wND9uv1aKPZjoD4yE6hlvXh1Ak+l KXwhoVXZyOw5zcD5wACcXponQ958+lod94TfjKDW6ly/h2k+9DMsCfZeLWDABqy4qf +2S7yYdialLgcjUta9qPwC4OYD2a9Hi438su1VLg= Subject: FAILED: patch "[PATCH] gpio: of: clear OF_POPULATED on hog nodes in remove path" failed to apply to 6.1-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:56 +0200 Message-ID: <2026051256-bush-driver-5c12@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 6.1-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-6.1.y git checkout FETCH_HEAD git cherry-pick -x bbee90e750262bfb406d66dc65c46d616d2b6673 # git commit -s git send-email --to '' --in-reply-to '2026051256-bush-driver-5c12@gregkh' --subject-prefix 'PATCH 6.1.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)