get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2196993/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2196993,
    "url": "http://patchwork.ozlabs.org/api/patches/2196993/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/patch/20260216211021.3019827-1-james.hilliard1@gmail.com/",
    "project": {
        "id": 42,
        "url": "http://patchwork.ozlabs.org/api/projects/42/?format=api",
        "name": "Linux GPIO development",
        "link_name": "linux-gpio",
        "list_id": "linux-gpio.vger.kernel.org",
        "list_email": "linux-gpio@vger.kernel.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260216211021.3019827-1-james.hilliard1@gmail.com>",
    "list_archive_url": null,
    "date": "2026-02-16T21:10:19",
    "name": "[v3,1/1] gpiolib: of: add gpio-line node support",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "2725b4e83e902627e14d9a07bfe9c5c098e93a9c",
    "submitter": {
        "id": 66301,
        "url": "http://patchwork.ozlabs.org/api/people/66301/?format=api",
        "name": "James Hilliard",
        "email": "james.hilliard1@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-gpio/patch/20260216211021.3019827-1-james.hilliard1@gmail.com/mbox/",
    "series": [
        {
            "id": 492350,
            "url": "http://patchwork.ozlabs.org/api/series/492350/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/list/?series=492350",
            "date": "2026-02-16T21:10:19",
            "name": "[v3,1/1] gpiolib: of: add gpio-line node support",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/492350/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2196993/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2196993/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-gpio+bounces-31728-incoming=patchwork.ozlabs.org@vger.kernel.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "linux-gpio@vger.kernel.org"
        ],
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20230601 header.b=T+Jdbft/;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=linux-gpio+bounces-31728-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=\"T+Jdbft/\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.210.53",
            "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=gmail.com"
        ],
        "Received": [
            "from tor.lore.kernel.org (tor.lore.kernel.org\n [IPv6:2600:3c04:e001:36c::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fFFmW5lccz1xpl\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 17 Feb 2026 08:10:35 +1100 (AEDT)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 49E0A3017264\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 16 Feb 2026 21:10:32 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 7A82C31076A;\n\tMon, 16 Feb 2026 21:10:30 +0000 (UTC)",
            "from mail-ot1-f53.google.com (mail-ot1-f53.google.com\n [209.85.210.53])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id CBC7A2EC0BF\n\tfor <linux-gpio@vger.kernel.org>; Mon, 16 Feb 2026 21:10:28 +0000 (UTC)",
            "by mail-ot1-f53.google.com with SMTP id\n 46e09a7af769-7d4c12ff3d5so3149234a34.2\n        for <linux-gpio@vger.kernel.org>;\n Mon, 16 Feb 2026 13:10:28 -0800 (PST)",
            "from james-x399.localdomain (71-218-105-26.hlrn.qwest.net.\n [71.218.105.26])\n        by smtp.gmail.com with ESMTPSA id\n 46e09a7af769-7d4a77200fbsm13435593a34.27.2026.02.16.13.10.26\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Mon, 16 Feb 2026 13:10:26 -0800 (PST)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1771276230; cv=none;\n b=dkM9rrxGOW4qTFOR2oSNf7cgr4lmsSPb/Bx+eRfk3VoLXEnCpLDNrNbLGI+Nu4kSlOeu1EVGXxGGA+F7acKwL7M2YnM+7pbyxC3uiJq38pk5W+U/v0pgs0euYawWK3A7ZBPj2WDOUqDtCXGKgPwttkywKqMUOLe5XS8cwdHRaO4=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1771276230; c=relaxed/simple;\n\tbh=gi/vS2WBIvjKTvDNwCGoJ1Sn3vwTdP3btLdqWXMtbys=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version;\n b=NVY44ff/RIQkFaDRYAZvkHzG4GyqVXdmxtRq9yBI9CyXKeFBOqFNbE+MbP1V4GaI041g9/2/EcYpRW8cJmD5QRH9h/I2wEJA/xwST2kWVEYZSmTuAJSlf8mDi/+Cl5mLaujQwFON0sKi3OHhXqmfcRW9KbP2CtEbmsJTS5aZibY=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com;\n spf=pass smtp.mailfrom=gmail.com;\n dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=T+Jdbft/; arc=none smtp.client-ip=209.85.210.53",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20230601; t=1771276227; x=1771881027;\n darn=vger.kernel.org;\n        h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n         :to:from:from:to:cc:subject:date:message-id:reply-to;\n        bh=PofBO8lUwGBUKB9LSos0xCn+tFUPzNgDgwvV8yIWRgA=;\n        b=T+Jdbft/l7ivL7ibixLPDc5Os+XAK8xEoaPrt6pr38D3LegSiERQbUpJOMM3eCP4bU\n         pwM0IgIy6DMNM+vkJ2y96PYgxYnDUA+gD1p8hNWp4Y/A+Oa4dtVtrwRPsO/tJNzkSWX2\n         sVC1av35/TOSwusHUVjl4ypT2kN7hiaKDMvrgxbWxGtEb9/mUyUj6mED0IXHUZvKvr8O\n         PMiE4KNr9FZUI9/jVQqx5EFDGgawG2JTOkOA9fgG7QT+Abw2Xp+lGVzD4vzEweKOPI2v\n         O2LqVwvzkzWVwi8rcTNHzbbvXH94WcFCg6Y9cHR9ru5wtrY4A9bnwXH4qyyzh7Mph1Xa\n         hK7w==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20230601; t=1771276227; x=1771881027;\n        h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n         :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=PofBO8lUwGBUKB9LSos0xCn+tFUPzNgDgwvV8yIWRgA=;\n        b=AxD20MOX7vc9Xm/yo+1SLce5+VZntpc5S9AsgAoRDYRCYaQixjSvjTJckqhdWe0jJ/\n         ZBuRmxV0s0ualQor77YKxJifufUTTXKQnL3ulqxiAJEF1AUUDe35h6cCUsJznTe0A/uO\n         k2rQMheqbjPw+i/+8Fb9rKSAfe9EsLJpqwZvW17JAwWmUxN6411DopTrXU/UTu4hKQpe\n         sxBtTTOT972HrRWcFENg2GQaDdMBPRA2s9i/3s9foEfMcqm4VbmCzleMoNCQxIxjcwz2\n         LrXjC2u90nGM4C5+G581P0qNdigmQ04F3W2SckIJpKBqPYIG9TQLgmdP9Ey253TWjSp/\n         YvXg==",
        "X-Gm-Message-State": "AOJu0Yx9FbeBTwd6qXX406FPA8FpKJ0tbZS2usXUQy1fiKzEhbh97QLN\n\tmOW3EwK2rWOT2saT/pNh61nxZ17WpXNY3QpnOf+NO0zy10OnAXiQHKO+mVMGLQ==",
        "X-Gm-Gg": "AZuq6aLo2RD6bcnW7WiGH15INQ/kE97PY5IvsjaFv4a7ikTJ0yqc6/xk/VONAXuXTQf\n\tPFXFqb38zhgj7EJCWO1mFVNLL1aG07P5Z5veDKE45ebq6hNlVU0kJK79fSA2opDnthSHNa08NyT\n\tj8MAnn9Jqxph9CobdoszXxmGQYJsXuNuFLgDHJ6QMysATphBusRVvrD4zG2Js8Xfk3WvZoYwRLA\n\tiWKCaijkAO+4NVLDEYekCis5q3Tykh8AAur9/As+JBMR9XliByI5DzFCkwDsE8VBPZxpyhorm53\n\tmApxY18Cv9xMao4BDZ+h1p4SAR+3od3RhvJzqyC5ljBGXZyqiM0BJEsU/NqN0NMypw40jixntxG\n\tv2cZwf/Cn+i2Hx1qzzk6tCpxaIfsmoiq2iMpT4nHQU8aE1VnKA0BcvN6uC4tOWvWUHHuX8OhPbw\n\t909Nek6OCMY3/78+wTnP5WMTzxRKDfrkfLpOZhByTo2FQgJyW8SfpdxKzVWVYmiykEtH1+D9RD1\n\t0sEBoPj/Pn7DP9nMhCIQGgslMu3nNRwH7Lq1x6pCmTzuztuHiqDaYDxCp7qD5A=",
        "X-Received": "by 2002:a05:6830:2119:b0:7c6:8bfe:f5e with SMTP id\n 46e09a7af769-7d4d0c3cd36mr6053842a34.32.1771276227511;\n        Mon, 16 Feb 2026 13:10:27 -0800 (PST)",
        "From": "James Hilliard <james.hilliard1@gmail.com>",
        "To": "linux-gpio@vger.kernel.org",
        "Cc": "James Hilliard <james.hilliard1@gmail.com>,\n\tLinus Walleij <linusw@kernel.org>,\n\tBartosz Golaszewski <brgl@kernel.org>,\n\tRob Herring <robh@kernel.org>,\n\tSaravana Kannan <saravanak@kernel.org>,\n\tlinux-kernel@vger.kernel.org,\n\tdevicetree@vger.kernel.org",
        "Subject": "[PATCH v3 1/1] gpiolib: of: add gpio-line node support",
        "Date": "Mon, 16 Feb 2026 14:10:19 -0700",
        "Message-ID": "<20260216211021.3019827-1-james.hilliard1@gmail.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "Precedence": "bulk",
        "X-Mailing-List": "linux-gpio@vger.kernel.org",
        "List-Id": "<linux-gpio.vger.kernel.org>",
        "List-Subscribe": "<mailto:linux-gpio+subscribe@vger.kernel.org>",
        "List-Unsubscribe": "<mailto:linux-gpio+unsubscribe@vger.kernel.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit"
    },
    "content": "Allow GPIO controller child nodes marked with \"gpio-line\" to apply\nprobe-time direction/flags without hogging the line.\n\nExtend OF gpiochip scanning and OF dynamic reconfiguration handling to\nprocess gpio-line nodes alongside gpio-hog nodes.\n\nSome boards need probe-time GPIO direction/value setup while still\nleaving lines available for later userspace or driver requests. GPIO\nhogs can initialize lines but reserve them permanently.\n\nAdd gpiod_apply_line_init() as a core helper for one-shot line\ninitialization and use it for gpio-line setup.\n\nBecause gpio-line initialization does not reserve ownership, subsequent\nconsumer requests remain normal requests and may reconfigure or release\nthe line as usual.\n\nSupport \"gpio-line-name\" for setting the visible line name. For\ngpio-hog nodes, keep \"line-name\" semantics as the hog consumer label.\n\nSome boards only need to name a small subset of GPIO lines. Doing this\ngenerally requires defining a full gpio-line-names array with empty\nplaceholders for unrelated lines.\n\nIn overlays, gpio-line-names replacement is all-or-nothing. Names from\nbase DT and multiple overlays for the same gpiochip do not compose,\nbecause each update replaces the full property.\n\nSigned-off-by: James Hilliard <james.hilliard1@gmail.com>\n---\nDepends on:\n  - https://github.com/devicetree-org/dt-schema/pull/185\n\nChanges v1 -> v2:\n  - drop documentation changes\n  - add depends on to changelog\n\nChanges v2 -> v3:\n  - add gpiod_apply_line_init() in gpiolib core\n  - switch gpio-line setup to use gpiod_apply_line_init()\n---\n drivers/gpio/gpiolib-of.c     | 89 ++++++++++++++++++++++++++++-------\n drivers/gpio/gpiolib-shared.c |  7 +--\n drivers/gpio/gpiolib.c        | 48 +++++++++++++++++++\n drivers/gpio/gpiolib.h        |  3 ++\n drivers/of/property.c         |  7 +--\n scripts/dtc/checks.c          |  4 +-\n 6 files changed, 133 insertions(+), 25 deletions(-)",
    "diff": "diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c\nindex ef1ac68b94b7..5f531d5cbc00 100644\n--- a/drivers/gpio/gpiolib-of.c\n+++ b/drivers/gpio/gpiolib-of.c\n@@ -744,6 +744,7 @@ struct gpio_desc *of_find_gpio(struct device_node *np, const char *con_id,\n  * @lflags:\tbitmask of gpio_lookup_flags GPIO_* values - returned from\n  *\t\tof_find_gpio() or of_parse_own_gpio()\n  * @dflags:\tgpiod_flags - optional GPIO initialization flags\n+ * @hog:\tindicates if this is a gpio-hog node\n  *\n  * Returns:\n  * GPIO descriptor to use with Linux GPIO API, or one of the errno\n@@ -753,11 +754,13 @@ static struct gpio_desc *of_parse_own_gpio(struct device_node *np,\n \t\t\t\t\t   struct gpio_chip *chip,\n \t\t\t\t\t   unsigned int idx, const char **name,\n \t\t\t\t\t   unsigned long *lflags,\n-\t\t\t\t\t   enum gpiod_flags *dflags)\n+\t\t\t\t\t   enum gpiod_flags *dflags,\n+\t\t\t\t\t   bool hog)\n {\n \tstruct device_node *chip_np;\n \tenum of_gpio_flags xlate_flags;\n \tstruct of_phandle_args gpiospec;\n+\tconst char *desc_name;\n \tstruct gpio_desc *desc;\n \tunsigned int i;\n \tu32 tmp;\n@@ -797,15 +800,19 @@ static struct gpio_desc *of_parse_own_gpio(struct device_node *np,\n \t\t*dflags |= GPIOD_OUT_LOW;\n \telse if (of_property_read_bool(np, \"output-high\"))\n \t\t*dflags |= GPIOD_OUT_HIGH;\n-\telse {\n+\telse if (hog) {\n \t\tpr_warn(\"GPIO line %d (%pOFn): no hogging state specified, bailing out\\n\",\n \t\t\tdesc_to_gpio(desc), np);\n \t\treturn ERR_PTR(-EINVAL);\n \t}\n \n-\tif (name && of_property_read_string(np, \"line-name\", name))\n+\tif (hog && name && of_property_read_string(np, \"line-name\", name))\n \t\t*name = np->name;\n \n+\tif (!of_property_read_string(np, \"gpio-line-name\", &desc_name) &&\n+\t    desc_name[0])\n+\t\tdesc->name = desc_name;\n+\n \treturn desc;\n }\n \n@@ -827,7 +834,8 @@ static int of_gpiochip_add_hog(struct gpio_chip *chip, struct device_node *hog)\n \tint ret;\n \n \tfor (i = 0;; i++) {\n-\t\tdesc = of_parse_own_gpio(hog, chip, i, &name, &lflags, &dflags);\n+\t\tdesc = of_parse_own_gpio(hog, chip, i, &name, &lflags, &dflags,\n+\t\t\t\t\t true);\n \t\tif (IS_ERR(desc))\n \t\t\tbreak;\n \n@@ -843,6 +851,36 @@ static int of_gpiochip_add_hog(struct gpio_chip *chip, struct device_node *hog)\n \treturn 0;\n }\n \n+/**\n+ * of_gpiochip_add_line - Configure all lines in a gpio-line device node\n+ * @chip:\tgpio chip to act on\n+ * @line:\tdevice node describing GPIO lines to configure\n+ *\n+ * Returns:\n+ * 0 on success, or negative errno on failure.\n+ */\n+static int of_gpiochip_add_line(struct gpio_chip *chip, struct device_node *line)\n+{\n+\tenum gpiod_flags dflags;\n+\tstruct gpio_desc *desc;\n+\tunsigned long lflags;\n+\tunsigned int i;\n+\tint ret;\n+\n+\tfor (i = 0;; i++) {\n+\t\tdesc = of_parse_own_gpio(line, chip, i, NULL, &lflags, &dflags,\n+\t\t\t\t\t false);\n+\t\tif (IS_ERR(desc))\n+\t\t\tbreak;\n+\n+\t\tret = gpiod_apply_line_init(desc, NULL, lflags, dflags);\n+\t\tif (ret < 0)\n+\t\t\treturn ret;\n+\t}\n+\n+\treturn 0;\n+}\n+\n /**\n  * of_gpiochip_scan_gpios - Scan gpio-controller for gpio definitions\n  * @chip:\tgpio chip to act on\n@@ -858,14 +896,22 @@ static int of_gpiochip_scan_gpios(struct gpio_chip *chip)\n \tint ret;\n \n \tfor_each_available_child_of_node_scoped(dev_of_node(&chip->gpiodev->dev), np) {\n-\t\tif (!of_property_read_bool(np, \"gpio-hog\"))\n+\t\tif (of_property_read_bool(np, \"gpio-hog\")) {\n+\t\t\tret = of_gpiochip_add_hog(chip, np);\n+\t\t\tif (ret < 0)\n+\t\t\t\treturn ret;\n+\n+\t\t\tof_node_set_flag(np, OF_POPULATED);\n \t\t\tcontinue;\n+\t\t}\n \n-\t\tret = of_gpiochip_add_hog(chip, np);\n-\t\tif (ret < 0)\n-\t\t\treturn ret;\n+\t\tif (of_property_read_bool(np, \"gpio-line\")) {\n+\t\t\tret = of_gpiochip_add_line(chip, np);\n+\t\t\tif (ret < 0)\n+\t\t\t\treturn ret;\n \n-\t\tof_node_set_flag(np, OF_POPULATED);\n+\t\t\tof_node_set_flag(np, OF_POPULATED);\n+\t\t}\n \t}\n \n \treturn 0;\n@@ -905,14 +951,15 @@ static int of_gpio_notify(struct notifier_block *nb, unsigned long action,\n \tint ret;\n \n \t/*\n-\t * This only supports adding and removing complete gpio-hog nodes.\n-\t * Modifying an existing gpio-hog node is not supported (except for\n-\t * changing its \"status\" property, which is treated the same as\n-\t * addition/removal).\n+\t * This only supports adding and removing complete gpio-hog and\n+\t * gpio-line nodes. Modifying an existing node is not supported\n+\t * (except for changing its \"status\" property, which is treated\n+\t * the same as addition/removal).\n \t */\n \tswitch (of_reconfig_get_state_change(action, arg)) {\n \tcase OF_RECONFIG_CHANGE_ADD:\n-\t\tif (!of_property_read_bool(rd->dn, \"gpio-hog\"))\n+\t\tif (!of_property_read_bool(rd->dn, \"gpio-hog\") &&\n+\t\t    !of_property_read_bool(rd->dn, \"gpio-line\"))\n \t\t\treturn NOTIFY_DONE;\t/* not for us */\n \n \t\tif (of_node_test_and_set_flag(rd->dn, OF_POPULATED))\n@@ -922,9 +969,12 @@ static int of_gpio_notify(struct notifier_block *nb, unsigned long action,\n \t\tif (!gdev)\n \t\t\treturn NOTIFY_DONE;\t/* not for us */\n \n-\t\tret = of_gpiochip_add_hog(gpio_device_get_chip(gdev), rd->dn);\n+\t\tif (of_property_read_bool(rd->dn, \"gpio-hog\"))\n+\t\t\tret = of_gpiochip_add_hog(gpio_device_get_chip(gdev), rd->dn);\n+\t\telse\n+\t\t\tret = of_gpiochip_add_line(gpio_device_get_chip(gdev), rd->dn);\n \t\tif (ret < 0) {\n-\t\t\tpr_err(\"%s: failed to add hogs for %pOF\\n\", __func__,\n+\t\t\tpr_err(\"%s: failed to configure lines for %pOF\\n\", __func__,\n \t\t\t       rd->dn);\n \t\t\tof_node_clear_flag(rd->dn, OF_POPULATED);\n \t\t\treturn notifier_from_errno(ret);\n@@ -932,6 +982,10 @@ static int of_gpio_notify(struct notifier_block *nb, unsigned long action,\n \t\treturn NOTIFY_OK;\n \n \tcase OF_RECONFIG_CHANGE_REMOVE:\n+\t\tif (!of_property_read_bool(rd->dn, \"gpio-hog\") &&\n+\t\t    !of_property_read_bool(rd->dn, \"gpio-line\"))\n+\t\t\treturn NOTIFY_DONE;\t/* not for us */\n+\n \t\tif (!of_node_check_flag(rd->dn, OF_POPULATED))\n \t\t\treturn NOTIFY_DONE;\t/* already depopulated */\n \n@@ -939,7 +993,8 @@ static int of_gpio_notify(struct notifier_block *nb, unsigned long action,\n \t\tif (!gdev)\n \t\t\treturn NOTIFY_DONE;\t/* not for us */\n \n-\t\tof_gpiochip_remove_hog(gpio_device_get_chip(gdev), rd->dn);\n+\t\tif (of_property_read_bool(rd->dn, \"gpio-hog\"))\n+\t\t\tof_gpiochip_remove_hog(gpio_device_get_chip(gdev), rd->dn);\n \t\tof_node_clear_flag(rd->dn, OF_POPULATED);\n \t\treturn NOTIFY_OK;\n \t}\ndiff --git a/drivers/gpio/gpiolib-shared.c b/drivers/gpio/gpiolib-shared.c\nindex b3525d1f06a4..b934e58a07f0 100644\n--- a/drivers/gpio/gpiolib-shared.c\n+++ b/drivers/gpio/gpiolib-shared.c\n@@ -147,10 +147,11 @@ static bool gpio_shared_of_node_ignore(struct device_node *node)\n \t\treturn true;\n \n \t/*\n-\t * GPIO hogs have a \"gpios\" property which is not a phandle and can't\n-\t * possibly refer to a shared GPIO.\n+\t * GPIO hog and gpio-line nodes have a \"gpios\" property which is not a\n+\t * phandle and can't possibly refer to a shared GPIO.\n \t */\n-\tif (of_property_present(node, \"gpio-hog\"))\n+\tif (of_property_present(node, \"gpio-hog\") ||\n+\t    of_property_present(node, \"gpio-line\"))\n \t\treturn true;\n \n \treturn false;\ndiff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c\nindex c52200eaaaff..e5ef2c0d8432 100644\n--- a/drivers/gpio/gpiolib.c\n+++ b/drivers/gpio/gpiolib.c\n@@ -5061,6 +5061,54 @@ int gpiod_hog(struct gpio_desc *desc, const char *name,\n \treturn 0;\n }\n \n+/**\n+ * gpiod_apply_line_init - Apply one-shot line initialization and release\n+ * @desc:\tgpio whose value will be assigned\n+ * @name:\tinitialization label\n+ * @lflags:\tbitmask of gpio_lookup_flags GPIO_* values\n+ * @dflags:\tgpiod_flags - optional GPIO initialization flags\n+ *\n+ * Applies GPIO configuration using the descriptor APIs without keeping the line\n+ * reserved by gpiolib. After configuration, the temporary internal request is\n+ * released.\n+ *\n+ * Returns:\n+ * 0 on success, or negative errno on failure.\n+ */\n+int gpiod_apply_line_init(struct gpio_desc *desc, const char *name,\n+\t\t\t  unsigned long lflags, enum gpiod_flags dflags)\n+{\n+\tstruct gpio_device *gdev = desc->gdev;\n+\tstruct gpio_desc *local_desc;\n+\tint hwnum;\n+\tint ret;\n+\n+\tCLASS(gpio_chip_guard, guard)(desc);\n+\tif (!guard.gc)\n+\t\treturn -ENODEV;\n+\n+\thwnum = gpiod_hwgpio(desc);\n+\n+\tlocal_desc = gpiochip_request_own_desc(guard.gc, hwnum, name,\n+\t\t\t\t\t       lflags, dflags);\n+\tif (IS_ERR(local_desc)) {\n+\t\tret = PTR_ERR(local_desc);\n+\t\tpr_err(\"requesting init GPIO %s (chip %s, offset %d) failed, %d\\n\",\n+\t\t       name ? : \"?\", gdev->label, hwnum, ret);\n+\t\treturn ret;\n+\t}\n+\n+\tgpiochip_free_own_desc(local_desc);\n+\n+\tgpiod_dbg(desc, \"line init applied as %s/%s\\n\",\n+\t\t  !(dflags & GPIOD_FLAGS_BIT_DIR_SET) ? \"as-is\" :\n+\t\t  (dflags & GPIOD_FLAGS_BIT_DIR_OUT) ? \"output\" : \"input\",\n+\t\t  (dflags & GPIOD_FLAGS_BIT_DIR_OUT) ?\n+\t\t  str_high_low(dflags & GPIOD_FLAGS_BIT_DIR_VAL) : \"?\");\n+\n+\treturn 0;\n+}\n+\n /**\n  * gpiochip_free_hogs - Scan gpio-controller chip and release GPIO hog\n  * @gc:\tgpio chip to act on\ndiff --git a/drivers/gpio/gpiolib.h b/drivers/gpio/gpiolib.h\nindex 3abb90385829..ed78f9d4d0af 100644\n--- a/drivers/gpio/gpiolib.h\n+++ b/drivers/gpio/gpiolib.h\n@@ -271,6 +271,9 @@ int gpio_do_set_config(struct gpio_desc *desc, unsigned long config);\n int gpiod_configure_flags(struct gpio_desc *desc, const char *con_id,\n \t\tunsigned long lflags, enum gpiod_flags dflags);\n int gpio_set_debounce_timeout(struct gpio_desc *desc, unsigned int debounce);\n+int gpiod_apply_line_init(struct gpio_desc *desc,\n+\t\t\t  const char *name, unsigned long lflags,\n+\t\t\t  enum gpiod_flags dflags);\n int gpiod_hog(struct gpio_desc *desc, const char *name,\n \t\tunsigned long lflags, enum gpiod_flags dflags);\n int gpiochip_get_ngpios(struct gpio_chip *gc, struct device *dev);\ndiff --git a/drivers/of/property.c b/drivers/of/property.c\nindex 50d95d512bf5..7689c4315115 100644\n--- a/drivers/of/property.c\n+++ b/drivers/of/property.c\n@@ -1435,10 +1435,11 @@ static struct device_node *parse_gpio_compat(struct device_node *np,\n \t\treturn NULL;\n \n \t/*\n-\t * Ignore node with gpio-hog property since its gpios are all provided\n-\t * by its parent.\n+\t * Ignore nodes with gpio-hog and gpio-line properties since their gpios\n+\t * are all provided by their parent.\n \t */\n-\tif (of_property_read_bool(np, \"gpio-hog\"))\n+\tif (of_property_read_bool(np, \"gpio-hog\") ||\n+\t    of_property_read_bool(np, \"gpio-line\"))\n \t\treturn NULL;\n \n \tif (of_parse_phandle_with_args(np, prop_name, \"#gpio-cells\", index,\ndiff --git a/scripts/dtc/checks.c b/scripts/dtc/checks.c\nindex 45d0213f3bf3..ee64cb4ada4f 100644\n--- a/scripts/dtc/checks.c\n+++ b/scripts/dtc/checks.c\n@@ -1533,8 +1533,8 @@ static void check_gpios_property(struct check *c,\n {\n \tstruct property *prop;\n \n-\t/* Skip GPIO hog nodes which have 'gpios' property */\n-\tif (get_property(node, \"gpio-hog\"))\n+\t/* Skip gpio-hog and gpio-line nodes which have 'gpios' property */\n+\tif (get_property(node, \"gpio-hog\") || get_property(node, \"gpio-line\"))\n \t\treturn;\n \n \tfor_each_property(node, prop) {\n",
    "prefixes": [
        "v3",
        "1/1"
    ]
}