get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2217258,
    "url": "http://patchwork.ozlabs.org/api/patches/2217258/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20260327-mtk-pmic-fixes-v1-1-ef874ca82409@baylibre.com/",
    "project": {
        "id": 18,
        "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api",
        "name": "U-Boot",
        "link_name": "uboot",
        "list_id": "u-boot.lists.denx.de",
        "list_email": "u-boot@lists.denx.de",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260327-mtk-pmic-fixes-v1-1-ef874ca82409@baylibre.com>",
    "list_archive_url": null,
    "date": "2026-03-27T19:03:16",
    "name": "[1/3] power: pmic: mtk-pwrap: add init capability flag",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "2d82f60b8088a026612af730b5e18c4ee31e98ac",
    "submitter": {
        "id": 87228,
        "url": "http://patchwork.ozlabs.org/api/people/87228/?format=api",
        "name": "David Lechner",
        "email": "dlechner@baylibre.com"
    },
    "delegate": {
        "id": 161331,
        "url": "http://patchwork.ozlabs.org/api/users/161331/?format=api",
        "username": "dlech",
        "first_name": "David",
        "last_name": "Lechner",
        "email": "dlechner@baylibre.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20260327-mtk-pmic-fixes-v1-1-ef874ca82409@baylibre.com/mbox/",
    "series": [
        {
            "id": 497823,
            "url": "http://patchwork.ozlabs.org/api/series/497823/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=497823",
            "date": "2026-03-27T19:03:15",
            "name": "power: pmic: mtk-pwrap: add more capability flags",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/497823/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2217258/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2217258/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<u-boot-bounces@lists.denx.de>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=baylibre-com.20230601.gappssmtp.com\n header.i=@baylibre-com.20230601.gappssmtp.com header.a=rsa-sha256\n header.s=20230601 header.b=267Ehxeq;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)",
            "phobos.denx.de;\n dmarc=none (p=none dis=none) header.from=baylibre.com",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de",
            "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=baylibre-com.20230601.gappssmtp.com\n header.i=@baylibre-com.20230601.gappssmtp.com header.b=\"267Ehxeq\";\n\tdkim-atps=neutral",
            "phobos.denx.de;\n dmarc=none (p=none dis=none) header.from=baylibre.com",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=dlechner@baylibre.com"
        ],
        "Received": [
            "from phobos.denx.de (phobos.denx.de\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\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 4fj96Z6VCxz1y1P\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 28 Mar 2026 06:04:06 +1100 (AEDT)",
            "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 36CEE83FD9;\n\tFri, 27 Mar 2026 20:03:54 +0100 (CET)",
            "by phobos.denx.de (Postfix, from userid 109)\n id 3C92B83C14; Fri, 27 Mar 2026 20:03:52 +0100 (CET)",
            "from mail-oa1-x2c.google.com (mail-oa1-x2c.google.com\n [IPv6:2001:4860:4864:20::2c])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id CF12783EB3\n for <u-boot@lists.denx.de>; Fri, 27 Mar 2026 20:03:49 +0100 (CET)",
            "by mail-oa1-x2c.google.com with SMTP id\n 586e51a60fabf-4042fe53946so965257fac.3\n for <u-boot@lists.denx.de>; Fri, 27 Mar 2026 12:03:49 -0700 (PDT)",
            "from [127.0.1.1] ([2600:8803:e7e4:500:54a7:4cbc:7d2e:3b99])\n by smtp.gmail.com with ESMTPSA id\n 586e51a60fabf-41d0496591csm113534fac.8.2026.03.27.12.03.47\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 27 Mar 2026 12:03:48 -0700 (PDT)"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham\n autolearn_force=no version=3.4.2",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1774638228;\n x=1775243028;\n darn=lists.denx.de;\n h=cc:to:in-reply-to:references:message-id:content-transfer-encoding\n :mime-version:subject:date:from:from:to:cc:subject:date:message-id\n :reply-to; bh=1PuFrm88F4R3XZrJQlt7jinlLT88VcNhGpSaYO05K0M=;\n b=267EhxeqqGN8wSkKESftoMmg1XtIZstTuMht4zn1d/Inxcuj6zWPTFJuRJ5SuRuhKd\n k4d5JbE19yrgJdwiYBTsy3ciq8NrUW/yeJE0/3Yb1fJ9GT2X7LR3lh9xkbGBQuExBRFV\n xjJR30Vk5MwQiKxrL0OeNAi7RCbI6VkCU9WuzDPFuO8REWUGIf5LoLD8er8QkhfJFqa+\n RIU6PPKB3q0kPbEvbf01ofrzbkjEj3kH0FSO9JNfJxoB3w4denk6wGjb2o+gvIDKIHnP\n z7kiIwrxeax4A/2rJnElh6LCSTkCwDbeTeWeXKZe8u1EGhiM7SX6GrO2Y7w9ARcmg2kR\n rQeQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1774638228; x=1775243028;\n h=cc:to:in-reply-to:references:message-id:content-transfer-encoding\n :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to\n :cc:subject:date:message-id:reply-to;\n bh=1PuFrm88F4R3XZrJQlt7jinlLT88VcNhGpSaYO05K0M=;\n b=kodZzPx1utwqgtuF8BKcnMjfXWnPDWPm1YtUmpskzg9vajyOON9TDxbE7CYEd6swiT\n 13neqNRDEClkbFw/oJhHOU+5k0UIll8QOCKNEVM8fymaOPz7gcdg572s6JPC72aza0kM\n ryBbljhGNrUGyYZgMpGF4S9gWkfGDXhh3qqirJKUlTGAEnyhr8FWx779h818GJ/ai/O8\n DCMdPwFyPcx7SivdrU475II7iQa+H389KefvnjP6CIFMLiKZbl034hl9a1x45KrLD8di\n e3HKmCADuOfijv1ZcMps9TyY5aXXOTpHLRfYrxAaZ2WwlUMVp/Juia5ZFy2Lyxu43yh4\n 7OJw==",
        "X-Forwarded-Encrypted": "i=1;\n AJvYcCVw8XlViXOa4xeNIEuGwCXUMitFg7I6RWVBjqOi7QFPyn0jSVZn+uM77p9tS/R19vJR5LMIeXQ=@lists.denx.de",
        "X-Gm-Message-State": "AOJu0YwY0aSiXyd/P0hdVM+kCzh/r4/L1WyNyPLLHUWCTdtiX0wNH+y4\n oABKShaSuL8nOlWUPpQCX0verTme64JmVSPp25dKM1RGW9CGxd7bxsbg/NAWt/Vwz/Q=",
        "X-Gm-Gg": "ATEYQzxwsyT6F/KMqP0slDGF8EbxKdjswL65S219OmMRTNzCc/U9sDgG5xJ5+3vacp/\n 4nNPrPsTpvdxQ+pQNnL2bxlQkg1OSHWuM5mwYTninp5SGie72oeZ/ZJcBEQD8iCjzAq403/PHrk\n G5yemwfc/gQ+t9OpbqMOXM7TponZmkEX3l7QXdd56wxtK4ekcYhOxXJeA2+VGSC7JkUXzz4yEte\n 23y/wWh150hB+qbcHHrjn+R1CyHzrmMOUgj9WcmIfAcEoTjd8gfwXFPmAk4TiAPfcDZl+E9EcfY\n xkOUb0KgI78N4oHkfNSC6bk/KcJXRaJXoXo69cGbiIy5tyhMngtnkyTYlh6w6pnEcRdip0z3wnC\n /LGY+fE9eJUk649TAIe5vjZddKuUZPu7k++PhpGF70FpS58NaS+abO1u4Cyni9VWJsGisxDxEsf\n LgRd56RiaY8M0cG58L4nN6fOmQrwTc",
        "X-Received": "by 2002:a05:6870:8a0f:b0:417:47c2:6590 with SMTP id\n 586e51a60fabf-41cec142a9fmr1863949fac.14.1774638228404;\n Fri, 27 Mar 2026 12:03:48 -0700 (PDT)",
        "From": "David Lechner <dlechner@baylibre.com>",
        "Date": "Fri, 27 Mar 2026 14:03:16 -0500",
        "Subject": "[PATCH 1/3] power: pmic: mtk-pwrap: add init capability flag",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "7bit",
        "Message-Id": "<20260327-mtk-pmic-fixes-v1-1-ef874ca82409@baylibre.com>",
        "References": "<20260327-mtk-pmic-fixes-v1-0-ef874ca82409@baylibre.com>",
        "In-Reply-To": "<20260327-mtk-pmic-fixes-v1-0-ef874ca82409@baylibre.com>",
        "To": "Ryder Lee <ryder.lee@mediatek.com>, Weijie Gao <weijie.gao@mediatek.com>,\n Chunfeng Yun <chunfeng.yun@mediatek.com>,\n Igor Belwon <igor.belwon@mentallysanemainliners.org>,\n GSS_MTK_Uboot_upstream <GSS_MTK_Uboot_upstream@mediatek.com>,\n Jaehoon Chung <jh80.chung@samsung.com>, Peng Fan <peng.fan@nxp.com>,\n Tom Rini <trini@konsulko.com>",
        "Cc": "Julien Stephan <jstephan@baylibre.com>, u-boot@lists.denx.de,\n David Lechner <dlechner@baylibre.com>",
        "X-Mailer": "b4 0.16-dev",
        "X-Developer-Signature": "v=1; a=openpgp-sha256; l=1852; i=dlechner@baylibre.com;\n h=from:subject:message-id;\n bh=o1ujKM6Lqu2tEGTDLv2qZJX51UewTtNt6sy13NjKHjk=;\n b=owEBhAF7/pANAwAKAcLMIAH/AY/AAcsmYgBpxtR868aucY+gyejB0QWOJblEL099zyHyYw07x\n xo56weWcbyJAUoEAAEKADQWIQTsGNmeYg6D1pzYaJjCzCAB/wGPwAUCacbUfBYcZGxlY2huZXJA\n YmF5bGlicmUuY29tAAoJEMLMIAH/AY/ACWYH/iwHtdtnAN5Ri3cnk4++vLKYXXs78G/k8ppMy6p\n 0T1+H44Ad3MEk21M1xHpqJOj8aVXMrxQcm7VTO7L3SBT51lPOySKlS0ez91m+RmwJlcjZDVW89f\n tNkzQEu6uUcFbpOhYlUl3W/+vNbcWfR4TJAH9xBY4t0PSAJM8TTAFGu8qsG8QZAw2CVdFeNRy1R\n vf+/+Jw/7z0AdhmcdIMfL8X+xrdd1B/qpoq3g2HZk4IOhREsAt7FjBWi/WiRApLmVFcKR4E4mFI\n 6lZtkZ4ZI5WJ/rOjrwvbpbrj6B1ul9tXozSu984j2dEMf6KAk1MwgslBV1aRl7aoXiYh7S2XVds\n kxuw=",
        "X-Developer-Key": "i=dlechner@baylibre.com; a=openpgp;\n fpr=8A73D82A6A1F509907F373881F8AF88C82F77C03",
        "X-BeenThere": "u-boot@lists.denx.de",
        "X-Mailman-Version": "2.1.39",
        "Precedence": "list",
        "List-Id": "U-Boot discussion <u-boot.lists.denx.de>",
        "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>",
        "List-Archive": "<https://lists.denx.de/pipermail/u-boot/>",
        "List-Post": "<mailto:u-boot@lists.denx.de>",
        "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>",
        "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>",
        "Errors-To": "u-boot-bounces@lists.denx.de",
        "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>",
        "X-Virus-Scanned": "clamav-milter 0.103.8 at phobos.denx.de",
        "X-Virus-Status": "Clean"
    },
    "content": "Add a PWRAP_CAP_INIT capability flag to specify if it is safe to call\npwrap_init() or not. Not all targets define the registers accessed\nby pwrap_init(). In that case, it is expected that an earlier bootloader\nhas already initialized the PMIC. If not, we now return an error instead\nof trying to access undefined registers.\n\nSigned-off-by: David Lechner <dlechner@baylibre.com>\n---\n drivers/power/pmic/mtk-pwrap.c | 9 ++++++++-\n 1 file changed, 8 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/power/pmic/mtk-pwrap.c b/drivers/power/pmic/mtk-pwrap.c\nindex 446b78fb0ee..9ff06fdb3bd 100644\n--- a/drivers/power/pmic/mtk-pwrap.c\n+++ b/drivers/power/pmic/mtk-pwrap.c\n@@ -62,6 +62,8 @@ static const struct pmic_child_info mt6359_pmic_children_info[] = {\n #define PWRAP_CAP_INT1_EN\t\tBIT(3)\n #define PWRAP_CAP_WDT_SRC1\t\tBIT(4)\n #define PWRAP_CAP_ARB\t\t\tBIT(5)\n+/* To implement this capability, the registers used in pwrap_init() must be defined. */\n+#define PWRAP_CAP_INIT\t\t\tBIT(6)\n \n /* defines for slave device wrapper registers */\n enum dew_regs {\n@@ -752,6 +754,11 @@ static int mtk_pwrap_probe(struct udevice *dev)\n \t * Skip initialization here in this case.\n \t */\n \tif (!pwrap_readl(wrp, PWRAP_INIT_DONE2)) {\n+\t\tif (!HAS_CAP(wrp->master->caps, PWRAP_CAP_INIT)) {\n+\t\t\tdev_err(dev, \"initialization is required but not supported\\n\");\n+\t\t\treturn -ENODEV;\n+\t\t}\n+\n \t\tret = pwrap_init(wrp);\n \t\tif (ret) {\n \t\t\tdev_err(dev, \"init failed with %d\\n\", ret);\n@@ -905,7 +912,7 @@ static const struct pmic_wrapper_type pwrap_mt8365 = {\n \t.int1_en_all = 0x0,\n \t.spi_w = PWRAP_MAN_CMD_SPI_WRITE,\n \t.wdt_src = PWRAP_WDT_SRC_MASK_ALL,\n-\t.caps = PWRAP_CAP_INT1_EN | PWRAP_CAP_WDT_SRC1,\n+\t.caps = PWRAP_CAP_INT1_EN | PWRAP_CAP_WDT_SRC1 | PWRAP_CAP_INIT,\n };\n \n static const struct udevice_id mtk_pwrap_ids[] = {\n",
    "prefixes": [
        "1/3"
    ]
}