get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2226562,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2226562/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/patch/77cc91a966bfcbeaad825b8be607dbd7a85dbbdb.1776872453.git.happycpu@gmail.com/",
    "project": {
        "id": 42,
        "url": "http://patchwork.ozlabs.org/api/1.1/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": ""
    },
    "msgid": "<77cc91a966bfcbeaad825b8be607dbd7a85dbbdb.1776872453.git.happycpu@gmail.com>",
    "date": "2026-04-22T16:05:04",
    "name": "[v1,2/2] gpio: 74x164: support 'registers-default' DT property for initial state",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "51c7c3c6e53c318f739c16397a5420a42b205cfb",
    "submitter": {
        "id": 93205,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/93205/?format=api",
        "name": "Chanhong Jung",
        "email": "happycpu@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-gpio/patch/77cc91a966bfcbeaad825b8be607dbd7a85dbbdb.1776872453.git.happycpu@gmail.com/mbox/",
    "series": [
        {
            "id": 501038,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/501038/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/list/?series=501038",
            "date": "2026-04-22T16:05:02",
            "name": "gpio: 74x164: seed the chain from DT at probe time",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/501038/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2226562/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2226562/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "\n <linux-gpio+bounces-35363-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=20251104 header.b=U4rbNoMF;\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-35363-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=\"U4rbNoMF\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.210.178",
            "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 4g146309Wjz1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 23 Apr 2026 02:13:47 +1000 (AEST)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 640F130DBF81\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 16:06:14 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 5A29237F017;\n\tWed, 22 Apr 2026 16:05:19 +0000 (UTC)",
            "from mail-pf1-f178.google.com (mail-pf1-f178.google.com\n [209.85.210.178])\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 86EC438B157\n\tfor <linux-gpio@vger.kernel.org>; Wed, 22 Apr 2026 16:05:16 +0000 (UTC)",
            "by mail-pf1-f178.google.com with SMTP id\n d2e1a72fcca58-82fcd0aa2dbso1052783b3a.0\n        for <linux-gpio@vger.kernel.org>;\n Wed, 22 Apr 2026 09:05:16 -0700 (PDT)",
            "from happycpu-p1.. ([121.160.151.7])\n        by smtp.gmail.com with ESMTPSA id\n d2e1a72fcca58-82f8ec003dcsm18151031b3a.52.2026.04.22.09.05.13\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Wed, 22 Apr 2026 09:05:15 -0700 (PDT)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776873919; cv=none;\n b=S2FYxtUNtxHweVgFtlZ5TMNx+KGLclsv/qQRAOSujc3rhWYJr1Yh5ZU/2rKZfBbSGkS3puTVPExI5lDPBBhfpxuiFrCFTwkkXxHABYBJ/+yy2AUljoSuBfTY3uD2u0Q5BYqP6GMdH1ABRx2zfnFS03gZgbulFdDd772m2dhTvOI=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776873919; c=relaxed/simple;\n\tbh=VgOr825JFd85qpx9ZSe3P5UBh8fNbkiALkxKCmKvveY=;\n\th=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:\n\t MIME-Version;\n b=Wpn3KcAOKAK+SRYdhUsx0hVUcAXwQxQvrIEJl3s7mq6WzpNbwnsCfXveeXxf3rzWePMExCHnxEur8B5uZt+P0Hy2BlIxy0BXkfzEjjd0wKPwd1uPNLV7Xa8P44tRdvmNJ+cLK7Eiu+0oRjqwZvQ9lZDmYNxBpxnpaeIwT8x+J2o=",
        "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=U4rbNoMF; arc=none smtp.client-ip=209.85.210.178",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20251104; t=1776873916; x=1777478716;\n darn=vger.kernel.org;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=r78Ht7d3rD0nKWuIXu8vxDpeZ4/LkBaXzBNsFb0PtOo=;\n        b=U4rbNoMFQuAci9G8rVh8tGL7tiwcAwZh5UnmQHdJLpbKQr2/OSu6KSulDw1MA9q+OV\n         1TRgxivxt9TELwvEbRkSD88MiH0891ykjZtgaJM17+Ttzxgw+nPHvE+cpYB1JX2SbOtv\n         0zOFpXu6E6StIla6WPK/dmSiKuI3Cql5N4lK5NjsLWS1II0EhRT8Qasy5EFic9IDjj7Y\n         ijv4H6C121lEUaDJ53EOw1Je86sDpOZEfqD6kNmAi2ZIB+e4eypTC2gV/AOj13liTgLq\n         WeLqQeKE0TTit0+x5v/aJAGG0CZxh4HpqxIgCmiN5X3tG0L49BcEssOmH3FQyDsvDObZ\n         w0Yg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1776873916; x=1777478716;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n         :to:cc:subject:date:message-id:reply-to;\n        bh=r78Ht7d3rD0nKWuIXu8vxDpeZ4/LkBaXzBNsFb0PtOo=;\n        b=CqutqnkAlKODQpun7QrK297g9wyFT1qc2c0dtB71bzVjZxJeLEyNS8DvAPLX0tAKmy\n         90/E63o8o4tpjrm0nGlnMg+7FTBqhcFd0X2auNRAONJYn9sAa36hGQOKzC1DfTSrjNDz\n         NcUCdZ7YM5RxZ3KzxQfqLF9vFd1lgDySb7v3MAipVSnRe1dqYtSsoDEvkDr8v/u09897\n         ENzNi1y32XLmFDz0qCbFPtIX14fbw+H110Ne/3x3dZASXhcNd6+xnHqA3vLmS6sPsCoF\n         HeZLJvaRg9TEvafk1Uu3H4wP+stWkKWQNZsXssMP4bn2grJSlc5rK0JkzeZEj94JNH1y\n         mlOg==",
        "X-Gm-Message-State": "AOJu0YwpLIBzXvUUMVgbDbmjrqZOIFn97EgNXVjwUe2K7IlsPbbV2O9f\n\tOu9ki+B8y6qfFrREBQae0DtIx6Nq4cgCDtUB7JtK4bgu1HCzzlPioskS",
        "X-Gm-Gg": "AeBDievrNHRxi0a8tn7afc7t5bZg9nOCYrjRpYw3xG+hK5Qvo5f2ElxACB7Fb76QEjQ\n\t3L7dGObtHeuyTepQy1vZ7SeTbmOAVQOuGVK7Tv6k2phQgZtVIVFTg6vBLfoh4YXF/HcQd9LhTK2\n\tLcvpXTl60HYq9M00yxa63bruPLMcnXUHvPLcDKpY5EaaInsQn92HA1xEz6duuf3qIS+jx4Io9me\n\tgmKQrQ+4j3J9ZzmUqqCYKyfNvmSX+rqpMe3B0KapZGkFZpH9BXWh/GaEVe7Q1XLRPwc83JQaBMG\n\tO/DSEe+NTPHByVhv3zjHuUsQi98+q9yIsXx99RILxDAkOwKA9/++p65f38vbfGI/B3heNB/wHIi\n\tttXxzRWFcEqD/MkArqGHiqeTD9Tqwqff1Fs/aoqaOQTe4niEwJQgNn7+Cw6Bkz3MpkGJfNbnE9E\n\ttbK/y9F42UHd0/7yuNTAfqPx2tlyH+k1SHw8X01hxUeALcHV2QEcdah8AOHlSmhTNn",
        "X-Received": "by 2002:a05:6a00:3a20:b0:82f:50ef:3eab with SMTP id\n d2e1a72fcca58-82f8b54738emr19822095b3a.28.1776873915614;\n        Wed, 22 Apr 2026 09:05:15 -0700 (PDT)",
        "From": "Chanhong Jung <happycpu@gmail.com>",
        "To": "Linus Walleij <linusw@kernel.org>,\n\tBartosz Golaszewski <brgl@kernel.org>,\n\tRob Herring <robh@kernel.org>,\n\tKrzysztof Kozlowski <krzk+dt@kernel.org>,\n\tConor Dooley <conor+dt@kernel.org>,\n\tMaxime Ripard <mripard@kernel.org>",
        "Cc": "linux-gpio@vger.kernel.org,\n\tdevicetree@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org",
        "Subject": "[PATCH v1 2/2] gpio: 74x164: support 'registers-default' DT property\n for initial state",
        "Date": "Thu, 23 Apr 2026 01:05:04 +0900",
        "Message-Id": "\n <77cc91a966bfcbeaad825b8be607dbd7a85dbbdb.1776872453.git.happycpu@gmail.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<cover.1776872453.git.happycpu@gmail.com>",
        "References": "<cover.1776872453.git.happycpu@gmail.com>",
        "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": "74HC595 and 74LVC594 chains retain their output state from the first\nserial write onwards. Today the driver always kicks that first write\nfrom a zero-initialised buffer, so every output comes up low until user\nspace issues a write. Boards that rely on the chain to drive signals\nwhose power-on state matters (active-low indicators, reset lines, etc.)\nhave no way to express the desired initial pattern via DT, and must\nreinvent it from user space each time after probe.\n\nRead the new optional 'registers-default' u8 array into chip->buffer\nafter the buffer's size becomes known (so __counted_by() is satisfied)\nand before the first __gen_74x164_write_config(). Absence of the\nproperty keeps the current zeroing behaviour; an invalid size is\nrejected with dev_err_probe() so that dtbs_check violations surface\nloudly at probe time.\n\nThe matching binding change documents the property's layout. The\ncorresponding U-Boot driver (drivers/gpio/74x164_gpio.c) has honoured\nthe same property for years, so the two bootstages can now agree on\nthe initial state without user-space involvement.\n\nSigned-off-by: Chanhong Jung <happycpu@gmail.com>\n---\n drivers/gpio/gpio-74x164.c | 14 ++++++++++++++\n 1 file changed, 14 insertions(+)",
    "diff": "diff --git a/drivers/gpio/gpio-74x164.c b/drivers/gpio/gpio-74x164.c\nindex c226524ef..b433a4a61 100644\n--- a/drivers/gpio/gpio-74x164.c\n+++ b/drivers/gpio/gpio-74x164.c\n@@ -134,6 +134,20 @@ static int gen_74x164_probe(struct spi_device *spi)\n \n \tchip->registers = nregs;\n \n+\t/*\n+\t * Optionally seed the chain with a board-specified pattern so that\n+\t * the outputs come up in a known state on the first SPI write. When\n+\t * the property is absent, the buffer stays zeroed by devm_kzalloc()\n+\t * and the existing behaviour is preserved.\n+\t */\n+\tif (device_property_present(dev, \"registers-default\")) {\n+\t\tret = device_property_read_u8_array(dev, \"registers-default\",\n+\t\t\t\t\t\t    chip->buffer, nregs);\n+\t\tif (ret)\n+\t\t\treturn dev_err_probe(dev, ret,\n+\t\t\t\t\t     \"Invalid 'registers-default'\\n\");\n+\t}\n+\n \tchip->gpiod_oe = devm_gpiod_get_optional(dev, \"enable\", GPIOD_OUT_LOW);\n \tif (IS_ERR(chip->gpiod_oe))\n \t\treturn PTR_ERR(chip->gpiod_oe);\n",
    "prefixes": [
        "v1",
        "2/2"
    ]
}