get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2218110,
    "url": "http://patchwork.ozlabs.org/api/patches/2218110/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/patch/20260331-doc-gpio-swnodes-v1-1-3f84c268999b@oss.qualcomm.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": "<20260331-doc-gpio-swnodes-v1-1-3f84c268999b@oss.qualcomm.com>",
    "list_archive_url": null,
    "date": "2026-03-31T12:28:29",
    "name": "Documentation: gpio: update the preferred method for using software node lookup",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "1a8c71c07e059f1ff39114515be0e3659e086f95",
    "submitter": {
        "id": 92196,
        "url": "http://patchwork.ozlabs.org/api/people/92196/?format=api",
        "name": "Bartosz Golaszewski",
        "email": "bartosz.golaszewski@oss.qualcomm.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-gpio/patch/20260331-doc-gpio-swnodes-v1-1-3f84c268999b@oss.qualcomm.com/mbox/",
    "series": [
        {
            "id": 498187,
            "url": "http://patchwork.ozlabs.org/api/series/498187/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/list/?series=498187",
            "date": "2026-03-31T12:28:29",
            "name": "Documentation: gpio: update the preferred method for using software node lookup",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/498187/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2218110/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2218110/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-gpio+bounces-34477-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=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256\n header.s=qcppdkim1 header.b=JCLuRbpI;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com\n header.a=rsa-sha256 header.s=google header.b=AodhZJVb;\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-34477-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com\n header.b=\"JCLuRbpI\";\n\tdkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com\n header.b=\"AodhZJVb\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=205.220.180.131",
            "smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=oss.qualcomm.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)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4flS8d25tyz1yCp\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 31 Mar 2026 23:28:49 +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 70C8E301C904\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 31 Mar 2026 12:28:46 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id EB3B33E0C7C;\n\tTue, 31 Mar 2026 12:28:43 +0000 (UTC)",
            "from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com\n [205.220.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 50F771DF72C\n\tfor <linux-gpio@vger.kernel.org>; Tue, 31 Mar 2026 12:28:42 +0000 (UTC)",
            "from pps.filterd (m0279869.ppops.net [127.0.0.1])\n\tby mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 62VBTahw2408178\n\tfor <linux-gpio@vger.kernel.org>; Tue, 31 Mar 2026 12:28:41 GMT",
            "from mail-qt1-f200.google.com (mail-qt1-f200.google.com\n [209.85.160.200])\n\tby mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4d80heu1qu-1\n\t(version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT)\n\tfor <linux-gpio@vger.kernel.org>; Tue, 31 Mar 2026 12:28:41 +0000 (GMT)",
            "by mail-qt1-f200.google.com with SMTP id\n d75a77b69052e-5093b92f327so168802481cf.1\n        for <linux-gpio@vger.kernel.org>;\n Tue, 31 Mar 2026 05:28:41 -0700 (PDT)",
            "from brgl-qcom.local ([2a01:cb1d:dc:7e00:977e:e16b:6244:a86f])\n        by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-4887c77df84sm23343405e9.4.2026.03.31.05.28.38\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Tue, 31 Mar 2026 05:28:38 -0700 (PDT)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774960123; cv=none;\n b=AHMuGxgj+bevNrAZHoJ6kg7LSTHoAgybx9x7tNg6b2L75+zUOG4I2ppJdwIMXiF6uEVKmVKgfAEvmJ5Em0IPgjIOMet494VQtjqSIrZhnv0njxrPcOSDTD9GC1mKUYULmuduy+2i+Q1oNhJXJb21hvfvLX+uIkQe60sdKMGiS+4=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774960123; c=relaxed/simple;\n\tbh=mi7memNQJCzeEutC0WFVeI6fKKTMYzxTIJkiFRVVWSA=;\n\th=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc;\n b=iCO2mBDttVyD8pqOmXqsFVpOQBkjJX5NWo6MYmxIpSNxuftAkMZp8ZnP+SW50Z2rWFxhdovsu2eN3/KVCzcJp3TdDdEb3CW6J6M7UCSMqYHJhdZLsYTH0cjw0QEseN6NyG0oMdQiVaH+lleQbeqkM+EsS8DN1T59hcApLy2mqN4=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com;\n spf=pass smtp.mailfrom=oss.qualcomm.com;\n dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com\n header.b=JCLuRbpI;\n dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com\n header.b=AodhZJVb; arc=none smtp.client-ip=205.220.180.131",
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h=\n\tcc:content-transfer-encoding:content-type:date:from:message-id\n\t:mime-version:subject:to; s=qcppdkim1; bh=k8hUEnYut0k71ljUpIpx01\n\tnVp9CKF2EbzDfYFhXRuzY=; b=JCLuRbpIqzs57buzkCa/31s/O4DrRqOy3aKwmy\n\trbQIfmSefPdkBpHaWzCQtDTc/ZYrNCBss46H8Eim8aPGWql5JYreeVKMZj4Za+nb\n\tpo3uGRfhYiqp0tKR0GB68/wSQrhh8qrYVASWopT0cxf6ffpBSJQpGueh7fSPydzs\n\taQA+fA5tTV80Rff7qQMlEcd6fcEsGzKTqfWdmIxjf9NMJ1BTuscEjVBbrj5saPPq\n\tUM5UDyth52AstheFvgIgWQEsFpjGJ3rE3uQRG/r9b2wR4QMKA7D4MFosSRNKeSxL\n\tUckoNXPtxO2faG0Ue+TtuNWbhIAdIaLEIDe5ulJ5vkpmGLAw==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=oss.qualcomm.com; s=google; t=1774960120; x=1775564920;\n darn=vger.kernel.org;\n        h=cc:to:message-id:content-transfer-encoding:mime-version:subject\n         :date:from:from:to:cc:subject:date:message-id:reply-to;\n        bh=k8hUEnYut0k71ljUpIpx01nVp9CKF2EbzDfYFhXRuzY=;\n        b=AodhZJVbRWGNasnENFR4SANnNZWqkLxQ9fDU/8ougZEE9ACxYLicPUXQzWFNJlKmaU\n         tGHH+0ps0Iec3CJqEn89fsWLWHHk4S9nkTh9FX2FbGBgDZw6dy6bxRtuOOFLoQUfbxNn\n         TU48DGBmRdsk+ipLwt0MebolpL73lIDDf/Xmjq3Bm+NPo+bBIpy1SW/9pdcdZKjIsxf6\n         kG8x/KDN3I/xs0Zm5acwn1QuVEogh/xKVTDmajxekNIWZjZQNYhGrlHOLioR/145Z3pf\n         gygllTE/je9zSbKnisF46ZsNwT+4ii6VBqt+FysDlVnLHK/JHfUf8rOdjnQHJ4Gdy8aQ\n         jdxw=="
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1774960120; x=1775564920;\n        h=cc:to:message-id:content-transfer-encoding:mime-version:subject\n         :date:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=k8hUEnYut0k71ljUpIpx01nVp9CKF2EbzDfYFhXRuzY=;\n        b=jKD+msT1SgAHhlHQKFUxrx8DGSY3IkSPEleJhLoxOjt1Mo818JRKBn97yZoldxTWyz\n         AdXhUbRhmfFb0uYSG86AxhfC2Gvvi/zHaDnpXUjANKgZwcjet9yiyySQeIBtWHWOlUUC\n         Rf7LyE/GCIEDlpjm6Aa7LrIseKUlhGFdoFxkuNEyo1MvWGKJJDA3T1OBIvR9Z84fM9jR\n         Baw+VpFberLxZUp8r+PsYo8toKU4p3uw1d8lxil9U2W5jVD9jPIlPs27V20snEFlvU6B\n         /PB21QqbsuV7W+ILEwcPkD/2sXKJUpuyYtzASPexSqhN5phddwoIsUublZLdufYAPPG6\n         KXDw==",
        "X-Gm-Message-State": "AOJu0YxcEoftZTOt94Tvw0gzIVuBG5mdd18iawV29rIh3msWfN+CL4dX\n\tAzZDfiozZ39H3GIfMPMr5yNMHUtJReBPjN5+pDfn1UJl4Ip/0iaTxb2j7JEvLrkZaTqYtP8XTPO\n\tM2JDuZM8fjW9QB4/6V6LWfJsXSYPtg+bc2S2fK1F9B76gdCFwRvHNOiHf7yow8zBucLTb5U0n",
        "X-Gm-Gg": "ATEYQzx7YprCLsSFT8B6rLxVWHbTJmwvabL+q5JFGYTngnD7UcZQF/w6iR97v/g83q3\n\tvEk5X48wa/01p1Z3LtzCoNFdAxzIu/nsNTBdxF7m6HstoLq0nQcHlR3kxeL0CcKSlZbgjBQ02z+\n\tT970jRJxgNtkRmo0INwPrvB4ftfRh0JBrJR2D4YRyYqoe9RUhwhEiLz4Knuf1/4wKcIe96H8IeO\n\tLYFdIcPbHqJpmaqD/6CjggoHiQfimJr0DWnVfSlWvDkZNYdm+PY5TfR/K/er6Bpp62sT082TVMS\n\ttd8DqwrWmxqZ/GD+Nc1OFucaOn37UVAvKdtXBwOSett+Ef186a6h1JNM4rFVpCYjyYJLrUikZme\n\tUdVfcxFlkN2mFg2cgAm5ArjRbRYMTXg1lGCqRQF6fO0CjRXmK9JMu",
        "X-Received": [
            "by 2002:ac8:7d0f:0:b0:509:2fa5:741 with SMTP id\n d75a77b69052e-50ba3818bfamr208064661cf.4.1774960120407;\n        Tue, 31 Mar 2026 05:28:40 -0700 (PDT)",
            "by 2002:ac8:7d0f:0:b0:509:2fa5:741 with SMTP id\n d75a77b69052e-50ba3818bfamr208064301cf.4.1774960119921;\n        Tue, 31 Mar 2026 05:28:39 -0700 (PDT)"
        ],
        "From": "Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>",
        "Date": "Tue, 31 Mar 2026 14:28:29 +0200",
        "Subject": "[PATCH] Documentation: gpio: update the preferred method for using\n software node lookup",
        "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-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "7bit",
        "Message-Id": "<20260331-doc-gpio-swnodes-v1-1-3f84c268999b@oss.qualcomm.com>",
        "X-B4-Tracking": "v=1; b=H4sIAOy9y2kC/x3MMQqAMAxA0atIZgPVoqhXEQdt0pqllQZUEO9uc\n XzD/w8oZ2GFqXog8ykqKRY0dQVuX2NgFCqG1rS9sbZBSg7DIQn1iolY0TtL5LtxG8hByY7MXu5\n /OS/v+wEVGQ6BYgAAAA==",
        "X-Change-ID": "20260331-doc-gpio-swnodes-fc3ddf59b8dc",
        "To": "Linus Walleij <linusw@kernel.org>, Bartosz Golaszewski <brgl@kernel.org>,\n        Jonathan Corbet <corbet@lwn.net>,\n        Shuah Khan <skhan@linuxfoundation.org>,\n        Dmitry Torokhov <dmitry.torokhov@gmail.com>",
        "Cc": "linux-gpio@vger.kernel.org, linux-doc@vger.kernel.org,\n        linux-kernel@vger.kernel.org,\n        Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>",
        "X-Mailer": "b4 0.14.2",
        "X-Developer-Signature": "v=1; a=openpgp-sha256; l=7215;\n i=bartosz.golaszewski@oss.qualcomm.com; h=from:subject:message-id;\n bh=mi7memNQJCzeEutC0WFVeI6fKKTMYzxTIJkiFRVVWSA=;\n b=owEBbQKS/ZANAwAKAQWdLsv/NoTDAcsmYgBpy73xKHeRRU1aQQdygxLpzMfekpEucmYmPOgkS\n VL7hWz7EzmJAjMEAAEKAB0WIQSR5RMt5bVGHXuiZfwFnS7L/zaEwwUCacu98QAKCRAFnS7L/zaE\n wwF+D/46dCxYO+SuyTketuhK+O+1wRtn5kdjnz/jPuKg2DdWYAdfvcAvjlec9tnVc+FMP4Bc5db\n LXJ9qYXVcAiJzCJOicc14u55mS3sTUulgSnVrY+0omciBww8Hj1t7CqFd4qkEQsK3qQNm1FaLqt\n JWftGhUjOnYmg7c3ARUtElVjJ80jBNvncFMZCyR59OpPeC30GrjGrRV+vfXZkZe2bb4Wmnn5qIT\n HbmfyA+fR/TZwjEvRipfEex0HsmAyWH2GxMgU9UsiKf6BwBEC4aFh8WYE4si+s62VAnoaXXU/6j\n X9fuFtBa24T0PfTCWn+6PC75AGwy77EJqJiE2jl/U91X5bPzZ2JHPk2m9n2EE1aU4YBjFQ6yq8Q\n fw3iYfMWB7ahvmRLDIS/6zLIoYEWve+wUnEkBry5D7O6udDWn1VeGgSCvaTjOsWbOR2pbcUXySC\n goBRamUVuQD7BaRlMKRPZ8aLAXQ3kF7Gwe3WzCVEHJ1JE6wpBG3HZObXM+AiNYSwvW7N/V/eZ3n\n 6k5zuZLdu+qmoR5RQAZckbVI2BU67Nf0FnT/OORSgPTR5GV0sB67t6BkQuy0sVWx5/XXRJ+12rj\n FonNTl2SFGBf/Eu3itJDPpq/pZY7GSwOrqpi0s/VmZitGLYpSB2BopxL5DbZaLnHYZqu+nFLUHm\n 2OBkzahr32qKiww==",
        "X-Developer-Key": "i=bartosz.golaszewski@oss.qualcomm.com; a=openpgp;\n fpr=169DEB6C0BC3C46013D2C79F11A72EA01471D772",
        "X-Authority-Analysis": "v=2.4 cv=Gb0aXAXL c=1 sm=1 tr=0 ts=69cbbdf9 cx=c_pps\n a=JbAStetqSzwMeJznSMzCyw==:117 a=VHV1bxSRZQlKidfD:21 a=xqWC_Br6kY4A:10\n a=IkcTkHD0fZMA:10 a=Yq5XynenixoA:10 a=s4-Qcg_JpJYA:10\n a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22\n a=EUspDBNiAAAA:8 a=KH8R8Eao7PwcOq8sAqYA:9 a=QEXdDO2ut3YA:10\n a=uxP6HrT_eTzRwkO_Te1X:22",
        "X-Proofpoint-GUID": "kUoBjmO9mhsnI20ZFBgG-N6Qtf0Eccsz",
        "X-Proofpoint-ORIG-GUID": "kUoBjmO9mhsnI20ZFBgG-N6Qtf0Eccsz",
        "X-Proofpoint-Spam-Details-Enc": "AW1haW4tMjYwMzMxMDEyMCBTYWx0ZWRfX3NXWOE7JFLAz\n s3TmEn9hJlqophyrHbxRT+jEXAqFyomSEnx39JGRet5mQd0foCzQZNnmjCuw+Bpymi4Q58O2oOX\n J4r33afxEl8WwdJ7RgKdj7fOx5JyiIOcBk8oUkCsBAD0WyBfbtYC/09P6/qN+5vCkDQroryo00o\n fJt3iiASo+d6iIr0iMOwM5ewhhDc0iQKWr4Fx5RAxmIsxv49OvgF/S3aa0p/5eFcZWnoZ4UtZWr\n BvtGGstwjtZAyIEjeAxx/5bw2c05OKCE6EEt4ZGz84mIsVL3dTylWh1VwcCTcNOeOxjmFCTA3HJ\n q7+uODvrhNLXHLd2waRPnlAonB1yf26kdHrLMw6qjuSfvb2nO1GrKIpcjWQ0v7YwHRqbIGJgTZy\n fC0gF+xoQJ1h/uNTFK0JnERIyGS18s7Iyn6HuGeHzdU/XQt4S8KH8KKM5OT0I6XjuTlnQ9q0Rbt\n 1f0Np4AsbVqpaZytXyA==",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49\n definitions=2026-03-31_02,2026-03-31_01,2025-10-01_01",
        "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n lowpriorityscore=0 impostorscore=0 adultscore=0 spamscore=0 bulkscore=0\n malwarescore=0 clxscore=1015 suspectscore=0 priorityscore=1501 phishscore=0\n classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0\n reason=mlx scancount=1 engine=8.22.0-2603050001 definitions=main-2603310120"
    },
    "content": "In its current version, the manual for converting of board files from\nusing GPIO lookup tables to software nodes recommends leaving the\nsoftware nodes representing GPIO controllers as \"free-floating\", not\nattached objects and relying on the matching of their names against the\nGPIO controller's name. This is an abuse of the software node API and\nmakes it impossible to create fw_devlinks between GPIO suppliers and\nconsumers in this case. We want to remove this behavior from GPIOLIB and\nto this end, work on converting all existing drivers to using \"attached\"\nsoftware nodes.\n\nExcept for a few corner-cases where board files define consumers\ndepending on GPIO controllers described in firmware - where we need to\nreference a real firmware node from a software node - which requires a\nmore complex approach, most board files can easily be converted to using\npropert firmware node lookup.\n\nUpdate the documentation to recommend attaching the GPIO chip's software\nnodes to the actual platform devices and show how to do it.\n\nSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>\n---\n Documentation/driver-api/gpio/board.rst         | 15 +++++++++---\n Documentation/driver-api/gpio/legacy-boards.rst | 32 ++++++++++++++++++-------\n 2 files changed, 36 insertions(+), 11 deletions(-)\n\n\n---\nbase-commit: 3b058d1aeeeff27a7289529c4944291613b364e9\nchange-id: 20260331-doc-gpio-swnodes-fc3ddf59b8dc\n\nBest regards,",
    "diff": "diff --git a/Documentation/driver-api/gpio/board.rst b/Documentation/driver-api/gpio/board.rst\nindex 0993cac891fb5e4887a1aee6deae273197c6aae1..c2880533742b1b55108f28853a3903cb273fe791 100644\n--- a/Documentation/driver-api/gpio/board.rst\n+++ b/Documentation/driver-api/gpio/board.rst\n@@ -108,9 +108,8 @@ macro, which ties a software node representing the GPIO controller with\n consumer device. It allows consumers to use regular gpiolib APIs, such as\n gpiod_get(), gpiod_get_optional().\n \n-The software node representing a GPIO controller need not be attached to the\n-GPIO controller device. The only requirement is that the node must be\n-registered and its name must match the GPIO controller's label.\n+The software node representing a GPIO controller must be attached to the\n+GPIO controller device - either as the primary or the secondary firmware node.\n \n For example, here is how to describe a single GPIO-connected LED. This is an\n alternative to using platform_data on legacy systems.\n@@ -153,6 +152,16 @@ alternative to using platform_data on legacy systems.\n \t};\n \tsoftware_node_register_node_group(swnodes);\n \n+\t/*\n+\t * 5. Attach the GPIO controller's software node to the device and\n+\t *    register it.\n+\t */\n+\t static void gpio_foo_register(void)\n+\t {\n+\t\tgpio_foo_pdev.dev.fwnode = software_node_fwnode(&gpio_controller_node);\n+\t\tplatform_device_register(&gpio_foo_pdev);\n+\t }\n+\n \t// Then register a platform_device for \"leds-gpio\" and associate\n \t// it with &led_device_swnode via .fwnode.\n \ndiff --git a/Documentation/driver-api/gpio/legacy-boards.rst b/Documentation/driver-api/gpio/legacy-boards.rst\nindex 46e3a26dba772e5e5117866b5d202e76c8e2adf2..fac63dd38d5b71c3bf43b5286a432f6449f422d0 100644\n--- a/Documentation/driver-api/gpio/legacy-boards.rst\n+++ b/Documentation/driver-api/gpio/legacy-boards.rst\n@@ -36,12 +36,10 @@ Requirements for GPIO Properties\n When using software nodes to describe GPIO connections, the following\n requirements must be met for the GPIO core to correctly resolve the reference:\n \n-1.  **The GPIO controller's software node \"name\" must match the controller's\n-    \"label\".** The gpiolib core uses this name to find the corresponding\n-    struct gpio_chip at runtime.\n-    This software node has to be registered, but need not be attached to the\n-    device representing the GPIO controller that is providing the GPIO in\n-    question. It may be left as a \"free floating\" node.\n+1.  **The GPIO controller's software node must be registered and attached to\n+    the controller's ``struct device`` either as its primary or secondary\n+    firmware node.** The gpiolib core uses the address of the firmware node to\n+    find the corresponding ``struct gpio_chip`` at runtime.\n \n 2.  **The GPIO property must be a reference.** The ``PROPERTY_ENTRY_GPIO()``\n     macro handles this as it is an alias for ``PROPERTY_ENTRY_REF()``.\n@@ -75,6 +73,11 @@ A typical legacy board file might look like this:\n \n   #define MYBOARD_GPIO_CONTROLLER \"gpio-foo\"\n \n+  static struct platform_device myboard_gpio = {\n+        .name = MYBOARD_GPIO_CONTROLLER,\n+        .id = PLATFORM_DEVID_NONE,\n+  };\n+\n   /* LED setup */\n   static const struct gpio_led myboard_leds[] = {\n   \t{\n@@ -124,6 +127,7 @@ A typical legacy board file might look like this:\n   \tgpiod_add_lookup_table(&myboard_leds_gpios);\n   \tgpiod_add_lookup_table(&myboard_buttons_gpios);\n \n+        platform_device_register(&myboard_gpio);\n   \tplatform_device_register_data(NULL, \"leds-gpio\", -1,\n   \t\t\t\t      &myboard_leds_pdata, sizeof(myboard_leds_pdata));\n   \tplatform_device_register_data(NULL, \"gpio-keys\", -1,\n@@ -141,8 +145,7 @@ Step 1: Define the GPIO Controller Node\n ***************************************\n \n First, define a software node that represents the GPIO controller that the\n-LEDs and buttons are connected to. The ``name`` of this node must match the\n-name of the driver for the GPIO controller (e.g., \"gpio-foo\").\n+LEDs and buttons are connected to. The ``name`` of this node is optional.\n \n .. code-block:: c\n \n@@ -257,6 +260,16 @@ software nodes using the ``fwnode`` field in struct platform_device_info.\n   \tif (error)\n   \t\treturn error;\n \n+  \tmemset(&pdev_info, 0, sizeof(pdev_info));\n+  \tpdev_info.name = MYBOARD_GPIO_CONTROLLER;\n+  \tpdev_info.id = PLATFORM_DEVID_NONE;\n+  \tpdev_info.fwnode = software_node_fwnode(&myboard_gpio_controller_node);\n+  \tgpio_pdev = platform_device_register_full(&pdev_info);\n+  \tif (IS_ERR(gpio_pdev)) {\n+  \t\terror = PTR_ERR(gpio_pdev);\n+  \t\tgoto err_unregister_nodes;\n+  \t}\n+\n   \tmemset(&pdev_info, 0, sizeof(pdev_info));\n   \tpdev_info.name = \"leds-gpio\";\n   \tpdev_info.id = PLATFORM_DEVID_NONE;\n@@ -264,6 +277,7 @@ software nodes using the ``fwnode`` field in struct platform_device_info.\n   \tleds_pdev = platform_device_register_full(&pdev_info);\n   \tif (IS_ERR(leds_pdev)) {\n   \t\terror = PTR_ERR(leds_pdev);\n+  \t\tplatform_device_unregister(gpio_pdev);\n   \t\tgoto err_unregister_nodes;\n   \t}\n \n@@ -274,6 +288,7 @@ software nodes using the ``fwnode`` field in struct platform_device_info.\n   \tkeys_pdev = platform_device_register_full(&pdev_info);\n   \tif (IS_ERR(keys_pdev)) {\n   \t\terror = PTR_ERR(keys_pdev);\n+  \t\tplatform_device_unregister(gpio_pdev);\n   \t\tplatform_device_unregister(leds_pdev);\n   \t\tgoto err_unregister_nodes;\n   \t}\n@@ -289,6 +304,7 @@ software nodes using the ``fwnode`` field in struct platform_device_info.\n   {\n   \tplatform_device_unregister(keys_pdev);\n   \tplatform_device_unregister(leds_pdev);\n+\tplatform_device_unregister(gpio_pdev);\n   \tsoftware_node_unregister_node_group(myboard_swnodes);\n   }\n \n",
    "prefixes": []
}