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 ED39F3905E6 for ; Tue, 12 May 2026 13:46:02 +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=1778593563; cv=none; b=K+VgoX11V8ebHRoVdx85u9a2xXLurr4tvsPzaSGqcis4OSDa3qLPUD9fuRZIvdhqACj3Ok0PEQ3L6QBryBs7wfPTccI0orekMU3C9IgH49/AMZjHzdIS6mQGIXQKqrdk6MT1Gf5eE3j0EYptzM1EJP88FZkRSUrTAjxuZ14/gL4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778593563; c=relaxed/simple; bh=lJ/EBsSptsnFTAPxvqTnKY/fg0hqrYhhnBuNTe1qh0E=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=PGbRvamlH0/dS2kMaXZqSyvV2ZPnq+6U8TGlQquiy9SNxKjOZmGGoX+3D9rcqyyXKQM6s3EICxy5v4YGPTJ8dBAJ/ly9jSZAECkxxxCO5XGi9rnCJYZ+0K+tRLtT1+eor5TdjpsH+6C1/7Y1UwEfNx+6X+Ku9C6HCyMMG5p1qy4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=0fLO/lUU; 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="0fLO/lUU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3F9F1C2BCB0; Tue, 12 May 2026 13:46:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1778593562; bh=lJ/EBsSptsnFTAPxvqTnKY/fg0hqrYhhnBuNTe1qh0E=; h=Subject:To:Cc:From:Date:From; b=0fLO/lUUJyI/mmWYo3gKPeTcZZETZTwpl8M/s+Z/bA8TjImf54RX0VIJH5DqaHekZ pGl+Wdu3MII73fJMpefkiBUd9n7u9+UiJk0iI971CbkO7tPGEKJKM0oZaNhA9vL9Wm jhqzIVkwDCR7yYMV6t3xFTAhXW7WkuoBI2IUN3mY= Subject: FAILED: patch "[PATCH] gpio: of: clear OF_POPULATED on hog nodes in remove path" failed to apply to 5.10-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-opium-prize-4da6@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.10-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.10.y git checkout FETCH_HEAD git cherry-pick -x bbee90e750262bfb406d66dc65c46d616d2b6673 # git commit -s git send-email --to '' --in-reply-to '2026051257-opium-prize-4da6@gregkh' --subject-prefix 'PATCH 5.10.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)