get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2219022,
    "url": "http://patchwork.ozlabs.org/api/patches/2219022/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260402095107.205439-3-sherry.sun@nxp.com/",
    "project": {
        "id": 28,
        "url": "http://patchwork.ozlabs.org/api/projects/28/?format=api",
        "name": "Linux PCI development",
        "link_name": "linux-pci",
        "list_id": "linux-pci.vger.kernel.org",
        "list_email": "linux-pci@vger.kernel.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260402095107.205439-3-sherry.sun@nxp.com>",
    "list_archive_url": null,
    "date": "2026-04-02T09:50:56",
    "name": "[V10,02/13] PCI: host-generic: Add common helpers for parsing Root Port properties",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "65e3a4aa92f474ec36f224478afcdeb2024f595e",
    "submitter": {
        "id": 77063,
        "url": "http://patchwork.ozlabs.org/api/people/77063/?format=api",
        "name": "Sherry Sun",
        "email": "sherry.sun@nxp.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260402095107.205439-3-sherry.sun@nxp.com/mbox/",
    "series": [
        {
            "id": 498458,
            "url": "http://patchwork.ozlabs.org/api/series/498458/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=498458",
            "date": "2026-04-02T09:50:55",
            "name": "pci-imx6: Add support for parsing the reset property in new Root Port binding",
            "version": 10,
            "mbox": "http://patchwork.ozlabs.org/series/498458/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2219022/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2219022/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-pci+bounces-51718-incoming=patchwork.ozlabs.org@vger.kernel.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "linux-pci@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=nxp.com header.i=@nxp.com header.a=rsa-sha256\n header.s=selector1 header.b=lCxVstBz;\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-pci+bounces-51718-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com\n header.b=\"lCxVstBz\"",
            "smtp.subspace.kernel.org;\n arc=fail smtp.client-ip=52.101.70.69",
            "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=nxp.com",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=nxp.com",
            "dkim=none (message not signed)\n header.d=none;dmarc=none action=none header.from=nxp.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 4fmcqG5qgRz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 02 Apr 2026 21:02:50 +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 385DB3172F94\n\tfor <incoming@patchwork.ozlabs.org>; Thu,  2 Apr 2026 09:51:33 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 1F2293E0258;\n\tThu,  2 Apr 2026 09:50:22 +0000 (UTC)",
            "from AS8PR04CU009.outbound.protection.outlook.com\n (mail-westeuropeazon11011069.outbound.protection.outlook.com [52.101.70.69])\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 44F2B3E0C5F;\n\tThu,  2 Apr 2026 09:50:16 +0000 (UTC)",
            "from VI0PR04MB12114.eurprd04.prod.outlook.com\n (2603:10a6:800:315::13) by AM9PR04MB8471.eurprd04.prod.outlook.com\n (2603:10a6:20b:416::22) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9723.25; Thu, 2 Apr\n 2026 09:50:13 +0000",
            "from VI0PR04MB12114.eurprd04.prod.outlook.com\n ([fe80::feda:fd0e:147f:f994]) by VI0PR04MB12114.eurprd04.prod.outlook.com\n ([fe80::feda:fd0e:147f:f994%6]) with mapi id 15.20.9769.018; Thu, 2 Apr 2026\n 09:50:13 +0000"
        ],
        "ARC-Seal": [
            "i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775123421; cv=fail;\n b=AUGewB2yEwePULVfIFPAwG7UJneMRvpmr3ur7gnstbt7c5p+EWhaJ1ZqOyG+H8BIin66KRnVSY0FtUyq0zt9iPm4uEu9/PiJ20dUxKTKC1RpUQJcVTO2NBO3RfWKb2P8nQq9AAhxvROZNtGXlImtpQ1PM5aRcbbUyeZYgm4wXWQ=",
            "i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;\n b=FjbsQMZPHziS6oTdLi6xaeZ8YMKJ+zC4b7R3J0/1pMihRP4WUiliBTlfthJhqGbbQXCJlzAXCJlnV/iTPkHaVwK8m7uCqg6wJpSlBthm50Ush5+jmCSk/2cFmdLHzLPQXbdq3+XoGi4fUxXPkzTI6Mx/Zjm8OcROK+NMgwb/fj2PyXMHO7Pyrxb871uxt3E2XTc1vOqAFO5+XPtaEtCnNgxNHJmkHBjUb7oUCrq5ZgVeQStRi0ZslXfp9SzuMVyly7qkwSPsub+pvsRLIit8EYacmta1e1gQT1rLNSmLJ5jCO3qhtw3Lm3sniVsXlsRuwHex/gPub14YtJ/AJYiLSw=="
        ],
        "ARC-Message-Signature": [
            "i=2; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775123421; c=relaxed/simple;\n\tbh=CWEdGpzLXf0DL6xm7hiu/N+H2quA+NcIsF32efwbuyY=;\n\th=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:\n\t Content-Type:MIME-Version;\n b=vDpgasBl68Wkca5dD6TaRizD6E5KpDd1QVuVbOGnP0l9MEaY/UyPVdhfcMFjZgv9RFxqt7R2nAYEapY6kYeD3xzl42xc4eqbRRl4UVSzoMCGPIRH6nP7WYL3eQAQgzN9z2Nyc+CTBzjeCC0MjjhYCqRN5b0SDLD2SN3pqUIojes=",
            "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector10001;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n bh=WuwbxAuMyLI43XOLY5JuxEeUskoPPcPtGM/zWepoy9M=;\n b=Bx/A20lC0rarRVRuv3s30fXTT/VhZ/OKOOWZbqUvOro4JmvAx5O09SBZ2zKSUscNLRx/Y7eVSs34JAEBYxxcKwRnl68H6RHYnbg3LsdddywEeiF+6Onsg0VwQjyxOClReZ6V3cdnTLObVao4qeEZKAz03GufNt1VFACJWe/tDqliX67whASkqIO4pVYhN5FELu2ujAA1wku4lEpSpZ4nFf6oYRffUugcaQUyWVvYySFeFMEfhrKZZbcn0Zcyi839Aw+8Xt9ZIG/rKHNFrrB6HlAA1Isuf+O5xyZ+wc2l3k42la8Xw6wEbVkAmngNLSwgqYLIsTC4n6EHhLo9vdaYnw=="
        ],
        "ARC-Authentication-Results": [
            "i=2; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=nxp.com;\n spf=pass smtp.mailfrom=nxp.com;\n dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com\n header.b=lCxVstBz; arc=fail smtp.client-ip=52.101.70.69",
            "i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass\n header.d=nxp.com; arc=none"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=WuwbxAuMyLI43XOLY5JuxEeUskoPPcPtGM/zWepoy9M=;\n b=lCxVstBz9aSRhzYJyLKdF4LMZr2YamtWYAbvCsEHGLfwOdC2pomouC4VSC5FN/WteTj5UBDqMesIRSdnPoZ23WGVjuiPJu7lkByKElUvNRYdbWW2nE+UONIbqxXmOSpXvr5SpWIal+oe5C91epZUUj90XWiuJIKT5KIiCt0o9nYqWZycbeyEeXJimqRbTCE2Xt35/MqQd5BkqsE1ggNk7DCRhOtfAqdKIS1ODFPiV7UD8Bp8z0ZbKuYIfMbjTZqZ+n9JJWECz6Zh5kYv7/n7nRaVq46vQKgoGSRKuNLbWiWJe0XT1+0HPanQeqzAYjaY1EiIudM8j4nNg34n+77dxw==",
        "From": "Sherry Sun <sherry.sun@nxp.com>",
        "To": "robh@kernel.org,\n\tkrzk+dt@kernel.org,\n\tconor+dt@kernel.org,\n\tFrank.Li@nxp.com,\n\ts.hauer@pengutronix.de,\n\tkernel@pengutronix.de,\n\tfestevam@gmail.com,\n\tlpieralisi@kernel.org,\n\tkwilczynski@kernel.org,\n\tmani@kernel.org,\n\tbhelgaas@google.com,\n\thongxing.zhu@nxp.com,\n\tl.stach@pengutronix.de",
        "Cc": "imx@lists.linux.dev,\n\tlinux-pci@vger.kernel.org,\n\tlinux-arm-kernel@lists.infradead.org,\n\tdevicetree@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org",
        "Subject": "[PATCH V10 02/13] PCI: host-generic: Add common helpers for parsing\n Root Port properties",
        "Date": "Thu,  2 Apr 2026 17:50:56 +0800",
        "Message-Id": "<20260402095107.205439-3-sherry.sun@nxp.com>",
        "X-Mailer": "git-send-email 2.37.1",
        "In-Reply-To": "<20260402095107.205439-1-sherry.sun@nxp.com>",
        "References": "<20260402095107.205439-1-sherry.sun@nxp.com>",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-ClientProxiedBy": "MA5P287CA0163.INDP287.PROD.OUTLOOK.COM\n (2603:1096:a01:1ba::11) To VI0PR04MB12114.eurprd04.prod.outlook.com\n (2603:10a6:800:315::13)",
        "Precedence": "bulk",
        "X-Mailing-List": "linux-pci@vger.kernel.org",
        "List-Id": "<linux-pci.vger.kernel.org>",
        "List-Subscribe": "<mailto:linux-pci+subscribe@vger.kernel.org>",
        "List-Unsubscribe": "<mailto:linux-pci+unsubscribe@vger.kernel.org>",
        "MIME-Version": "1.0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-TrafficTypeDiagnostic": "VI0PR04MB12114:EE_|AM9PR04MB8471:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "e76d3db6-79d6-4156-1a5a-08de909d3c95",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "\n\tBCL:0;ARA:13230040|366016|1800799024|19092799006|376014|7416014|52116014|38350700014|56012099003|22082099003|921020|18002099003;",
        "X-Microsoft-Antispam-Message-Info": "\n\tHm8RyGXvv8CprpOxKL6qGbZqCPcxvPH6I+NHIPyNJcK3zXnLubc8s6mhHrpS8PFLICv5SccBJWm5xjB92aznk6/djrUxBt76VxFH9+CgKWXdWfDOR7aWlTANNmRv6TK8z+c3Ojv9HLxgYGWBbYi7ghc3AojtTJQRioaUaQjTCVfLqj+30WU4x9rZahgsKEoh0cvIJAAOIroEdPj1qaH0/bC0uq28PTAtNsRy1kul1mT3Vm2GRkKMrO5+pSoejdVfBMPIM0SYupQQ67D+Zo2INWb4dWmw0o8vsw5Kn2ARd0hGrZ02necpGGwPhSiFCO/ies2tyFP07Oy/uGC7CV728YyF+vGryNBcqAw3zCSB/jHByiA7xSXVpZ3JQscOXEnNmUl8pwc8YTL7uQhWAw9MCmc2KSUqWL/3G64NDK9XRf9q1hERfWaqowwYKjEVTG2XkbllydYQq+sBKauHHoegcXVByOADf9Q3x0IqrfZLn54JEP0Z0AeOJqy9t73h67G+HxWbpnc1KhtA1wM+3yXLKv7SsCqZrrHxnRXmEMg5VDfyUkYXN9CNswLFJ+DmCUoopv7AF0oU5/B9rNg8KefarmVrmH9sCgWiYABzlVKk0NRkq1KeM/+c6g5eCMNW5mbpSYLfGY5HsUOredhzbLY3Os9v4iK/Akq+TleA8mF9ZlsyGiMn+U8KflLVzU4RXZZpMexmszoK0wolB6x4ADFi9qE5Z2qiH9/AH82EtwujFfkqWemXK3VPC5a8tSpQ/Dpzx4zDxUGOp3OVFQR+5i0Mw2UMJ/qoZ2+yovx/vWVASEI=",
        "X-Forefront-Antispam-Report": "\n\tCIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI0PR04MB12114.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(19092799006)(376014)(7416014)(52116014)(38350700014)(56012099003)(22082099003)(921020)(18002099003);DIR:OUT;SFP:1101;",
        "X-MS-Exchange-AntiSpam-MessageData-ChunkCount": "1",
        "X-MS-Exchange-AntiSpam-MessageData-0": "\n z9YnB2hQSXFmI+jLWGcmu8djXueKVLtyphlEJZ5QHIFPpPVETb0nG9Ep5mKCLQJ0yHlLu6m93CPXiJJx5t3o95LjF6gSrVwoHbzLspNOZZ3eM+pV6FkvFD6kruxXzcXQO+eWTr3TIMrcjGDigCazI5k1YRbzEgaHoOF8nm8BMPDtWyT3BT5w0s8y/0hWmr1ghOFr++qOgOgRbyxSALWn+tq8X9rYM9UOCLLRT5CodhImhBp6yg7vwvOAWPdOx9ccQKGxTknGIsXLeGcMUpqZrYbs7Xg8B04NLQ4AHDlff+FIeUomdcnMByv5e0uHeYenV5WdcCEHu2Eg1m5yK927ThJ4+NzcadBiZ5lxGuJosYMMld4SwxbrcyrTQ+pvhXqBr0XNb8C/qUWyoDDey7HonBo6tP5JLGWKalH9SEXzqkky54e4TjpZ4EIydB4hhL9n3KC5cA1Jsv+u9h//6oak8uoOtJtx7+4incoWWfZs9/0lGmXgrJHqXw3fmKFiOKM/Px5AtP2rqBNKzs6UeIWdmMWiPqTxkQkL0cX+AJx3hoc6rM0pwYh5wj/n5cJb7Gp5JfTJs3RYhbzqzwF6FqEEJo/41X713GmI2Rlcxr7MaxDOHU7TWeGFrHmj+hDcbmM0fpdz1dF2V/u75kCp4Q9inM+xBAYiU2Df/3Z3VWqD01c+NBv+zom37EhTO5XS+uDsmcXIZHurthr74AP3tLLHUQNygkhNbJexZEynhYJCfYMA08fPqjNVOQsLlSc96gwbjbOhLHHrBe+Kn9hX3aIZtYIxZGwKp6rfyQ7QUjMM7W/NSAClP3yHrkx7iIW2LOafPjk7nMIDG3C/SJ719J0y2CFuO+TjQlnyqTd50lTKyI7KwelrlQjGdoubxiNRbpco7YCIn5ywi4B2QrpcX6dStRYNkIeO3cd2lnj3u5XeAXKnURv/Iqr6jKiamiQ5BCBYONeCwEh2sBvje+G8dDg+i7nEZ1f8Xyuyg6p0fveOa2nD/o7qGOy+Pq9QaBgAXxPiq/C0QlRdZ/JcAwGbbx8R+aGOaMB4xwU4QxMpmgdmogtEuMvv98tx/Z6u5e3gtfVsDuz3pxfzl6Jjs4jpcbF+PxdG5g2XD2By266kROOr6i347JXYGzYSvSf781D2REEKqCo6jCLMOaq9r2msVQlPvgoPCUqddK/fgBWT887/4WKzV5Ohc0LwGue3VfeffyOQiAEBIqjujcaHCB4qLe8F8aL86w1FZ0EyMZ3ksKV7/67xrY5qdGrIrjHL3Ac9NtGYnUpuKhHAMZbUa4Cjt59kwCtPJUqvAdWfD7lMxdEJ86HGXHx0czov23JtmMDV3XXDt+BIID0h71RMJquKOV4ih25gjq4ovVntDzZI6GPNNNFOz2yAkhY5bXC9B1ntd+fQh8YB1IBmgXRBkKdkvu473SzPTFWe8K5+25q8AoJ+y4cti8HbeXfJ9bA42IukJ3VLQ9Sw5SzPieqHTpbc4X0bE7V0/IbCQpA7egshpjdBufRaE709cKHlZDaW8YLpqF20nCUZ5hoQnZjGyCUNZW5QR10hVw6T5h4HFA8x283su88KQ7JFF6DKFWXn7mKu+oPbnPqFMrgTsU09LfEHvG0rumVPXQRlQisjEoPurGx93+3aBf975VQVgkxvmjYeUIh3TyAsSZVEu1xmoOP16S4SZrXWyFtWYunZITgF0mHU+BCIyfdsRtig/AQHXn8dSSRmF91a2xrY0v3pg1jZIOEXZQ==",
        "X-OriginatorOrg": "nxp.com",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n e76d3db6-79d6-4156-1a5a-08de909d3c95",
        "X-MS-Exchange-CrossTenant-AuthSource": "VI0PR04MB12114.eurprd04.prod.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Internal",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "02 Apr 2026 09:50:13.6077\n (UTC)",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "Hosted",
        "X-MS-Exchange-CrossTenant-Id": "686ea1d3-bc2b-4c6f-a92c-d99c5c301635",
        "X-MS-Exchange-CrossTenant-MailboxType": "HOSTED",
        "X-MS-Exchange-CrossTenant-UserPrincipalName": "\n Fv75gd43VOq2+GWOUMvFYaDwqxZHOzMh6Hd/A7ooIBQ5Gx7wAMtwh8YK1gX+cQMLq9uTboSDzSQXrLxncdLt/g==",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "AM9PR04MB8471"
    },
    "content": "Introduce generic helper functions to parse Root Port device tree nodes\nand extract common properties like reset GPIOs. This allows multiple\nPCI host controller drivers to share the same parsing logic.\n\nDefine struct pci_host_port to hold common Root Port properties\n(currently only reset GPIO descriptor) and add\npci_host_common_parse_ports() to parse Root Port nodes from device tree.\n\nAlso add the 'ports' list to struct pci_host_bridge for better maintain\nparsed Root Port information.\n\nSigned-off-by: Sherry Sun <sherry.sun@nxp.com>\n---\n drivers/pci/controller/pci-host-common.c | 77 ++++++++++++++++++++++++\n drivers/pci/controller/pci-host-common.h | 16 +++++\n drivers/pci/probe.c                      |  1 +\n include/linux/pci.h                      |  1 +\n 4 files changed, 95 insertions(+)",
    "diff": "diff --git a/drivers/pci/controller/pci-host-common.c b/drivers/pci/controller/pci-host-common.c\nindex d6258c1cffe5..0fb6991dde7b 100644\n--- a/drivers/pci/controller/pci-host-common.c\n+++ b/drivers/pci/controller/pci-host-common.c\n@@ -9,6 +9,7 @@\n \n #include <linux/kernel.h>\n #include <linux/module.h>\n+#include <linux/gpio/consumer.h>\n #include <linux/of.h>\n #include <linux/of_address.h>\n #include <linux/of_pci.h>\n@@ -17,6 +18,82 @@\n \n #include \"pci-host-common.h\"\n \n+/**\n+ * pci_host_common_delete_ports - Cleanup function for port list\n+ * @data: Pointer to the port list head\n+ */\n+void pci_host_common_delete_ports(void *data)\n+{\n+\tstruct list_head *ports = data;\n+\tstruct pci_host_port *port, *tmp;\n+\n+\tlist_for_each_entry_safe(port, tmp, ports, list)\n+\t\tlist_del(&port->list);\n+}\n+EXPORT_SYMBOL_GPL(pci_host_common_delete_ports);\n+\n+/**\n+ * pci_host_common_parse_port - Parse a single Root Port node\n+ * @dev: Device pointer\n+ * @bridge: PCI host bridge\n+ * @node: Device tree node of the Root Port\n+ *\n+ * Returns: 0 on success, negative error code on failure\n+ */\n+static int pci_host_common_parse_port(struct device *dev,\n+\t\t\t\t      struct pci_host_bridge *bridge,\n+\t\t\t\t      struct device_node *node)\n+{\n+\tstruct pci_host_port *port;\n+\tstruct gpio_desc *reset;\n+\n+\treset = devm_fwnode_gpiod_get(dev, of_fwnode_handle(node),\n+\t\t\t\t      \"reset\", GPIOD_ASIS, \"PERST#\");\n+\tif (IS_ERR(reset))\n+\t\treturn PTR_ERR(reset);\n+\n+\tport = devm_kzalloc(dev, sizeof(*port), GFP_KERNEL);\n+\tif (!port)\n+\t\treturn -ENOMEM;\n+\n+\tport->reset = reset;\n+\tINIT_LIST_HEAD(&port->list);\n+\tlist_add_tail(&port->list, &bridge->ports);\n+\n+\treturn 0;\n+}\n+\n+/**\n+ * pci_host_common_parse_ports - Parse Root Port nodes from device tree\n+ * @dev: Device pointer\n+ * @bridge: PCI host bridge\n+ *\n+ * This function iterates through child nodes of the host bridge and parses\n+ * Root Port properties (currently only reset GPIO).\n+ *\n+ * Returns: 0 on success, -ENOENT if no ports found, other negative error codes\n+ * on failure\n+ */\n+int pci_host_common_parse_ports(struct device *dev, struct pci_host_bridge *bridge)\n+{\n+\tint ret = -ENOENT;\n+\n+\tfor_each_available_child_of_node_scoped(dev->of_node, of_port) {\n+\t\tif (!of_node_is_type(of_port, \"pci\"))\n+\t\t\tcontinue;\n+\t\tret = pci_host_common_parse_port(dev, bridge, of_port);\n+\t\tif (ret)\n+\t\t\treturn ret;\n+\t}\n+\n+\tif (ret)\n+\t\treturn ret;\n+\n+\treturn devm_add_action_or_reset(dev, pci_host_common_delete_ports,\n+\t\t\t\t\t&bridge->ports);\n+}\n+EXPORT_SYMBOL_GPL(pci_host_common_parse_ports);\n+\n static void gen_pci_unmap_cfg(void *ptr)\n {\n \tpci_ecam_free((struct pci_config_window *)ptr);\ndiff --git a/drivers/pci/controller/pci-host-common.h b/drivers/pci/controller/pci-host-common.h\nindex b5075d4bd7eb..37714bedb625 100644\n--- a/drivers/pci/controller/pci-host-common.h\n+++ b/drivers/pci/controller/pci-host-common.h\n@@ -12,6 +12,22 @@\n \n struct pci_ecam_ops;\n \n+/**\n+ * struct pci_host_port - Generic Root Port properties\n+ * @list: List node for linking multiple ports\n+ * @reset: GPIO descriptor for PERST# signal\n+ *\n+ * This structure contains common properties that can be parsed from\n+ * Root Port device tree nodes.\n+ */\n+struct pci_host_port {\n+\tstruct list_head\tlist;\n+\tstruct gpio_desc\t*reset;\n+};\n+\n+void pci_host_common_delete_ports(void *data);\n+int pci_host_common_parse_ports(struct device *dev, struct pci_host_bridge *bridge);\n+\n int pci_host_common_probe(struct platform_device *pdev);\n int pci_host_common_init(struct platform_device *pdev,\n \t\t\t struct pci_host_bridge *bridge,\ndiff --git a/drivers/pci/probe.c b/drivers/pci/probe.c\nindex 162166c2a9a8..360d4a1e9353 100644\n--- a/drivers/pci/probe.c\n+++ b/drivers/pci/probe.c\n@@ -677,6 +677,7 @@ static void pci_init_host_bridge(struct pci_host_bridge *bridge)\n {\n \tINIT_LIST_HEAD(&bridge->windows);\n \tINIT_LIST_HEAD(&bridge->dma_ranges);\n+\tINIT_LIST_HEAD(&bridge->ports);\n \n \t/*\n \t * We assume we can manage these PCIe features.  Some systems may\ndiff --git a/include/linux/pci.h b/include/linux/pci.h\nindex 3e6b92fdabcd..545f6ad4a8a7 100644\n--- a/include/linux/pci.h\n+++ b/include/linux/pci.h\n@@ -642,6 +642,7 @@ struct pci_host_bridge {\n \tint\t\tdomain_nr;\n \tstruct list_head windows;\t/* resource_entry */\n \tstruct list_head dma_ranges;\t/* dma ranges resource list */\n+\tstruct list_head ports;\t\t/* Root Port list (pci_host_port) */\n #ifdef CONFIG_PCI_IDE\n \tu16 nr_ide_streams; /* Max streams possibly active in @ide_stream_ida */\n \tstruct ida ide_stream_ida;\n",
    "prefixes": [
        "V10",
        "02/13"
    ]
}