get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2227502,
    "url": "http://patchwork.ozlabs.org/api/patches/2227502/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/rtc-linux/patch/20260424-s2mu005-pmic-v5-6-fcbc9da5a004@disroot.org/",
    "project": {
        "id": 9,
        "url": "http://patchwork.ozlabs.org/api/projects/9/?format=api",
        "name": "Linux RTC development",
        "link_name": "rtc-linux",
        "list_id": "linux-rtc.vger.kernel.org",
        "list_email": "linux-rtc@vger.kernel.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260424-s2mu005-pmic-v5-6-fcbc9da5a004@disroot.org>",
    "list_archive_url": null,
    "date": "2026-04-23T19:39:05",
    "name": "[v5,06/11] mfd: sec: resolve PMIC revision in S2MU005",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "3b044d6f95f5496fd8c8c5e67d84a1b94d6b1bdb",
    "submitter": {
        "id": 88698,
        "url": "http://patchwork.ozlabs.org/api/people/88698/?format=api",
        "name": "Kaustabh Chakraborty",
        "email": "kauschluss@disroot.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/rtc-linux/patch/20260424-s2mu005-pmic-v5-6-fcbc9da5a004@disroot.org/mbox/",
    "series": [
        {
            "id": 501238,
            "url": "http://patchwork.ozlabs.org/api/series/501238/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/rtc-linux/list/?series=501238",
            "date": "2026-04-23T19:39:00",
            "name": "Support for Samsung S2MU005 PMIC and its sub-devices",
            "version": 5,
            "mbox": "http://patchwork.ozlabs.org/series/501238/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2227502/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2227502/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-rtc+bounces-6402-incoming=patchwork.ozlabs.org@vger.kernel.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "linux-rtc@vger.kernel.org"
        ],
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=disroot.org header.i=@disroot.org header.a=rsa-sha256\n header.s=mail header.b=ku9I2Uqu;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-rtc+bounces-6402-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=disroot.org header.i=@disroot.org\n header.b=\"ku9I2Uqu\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=178.21.23.139",
            "smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=disroot.org",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=disroot.org"
        ],
        "Received": [
            "from sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::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 4g1myd0VYPz1y2d\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 24 Apr 2026 05:54:49 +1000 (AEST)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 0E41730E5A5B\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 23 Apr 2026 19:50:35 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id A8AAE397E75;\n\tThu, 23 Apr 2026 19:50:34 +0000 (UTC)",
            "from layka.disroot.org (layka.disroot.org [178.21.23.139])\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 23BCC391E73;\n\tThu, 23 Apr 2026 19:50:32 +0000 (UTC)",
            "from mail01.disroot.lan (localhost [127.0.0.1])\n\tby disroot.org (Postfix) with ESMTP id BD62C26EC7;\n\tThu, 23 Apr 2026 21:50:31 +0200 (CEST)",
            "from layka.disroot.org ([127.0.0.1])\n by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id 09-GytBVZI6t; Thu, 23 Apr 2026 21:50:31 +0200 (CEST)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776973834; cv=none;\n b=TAGrR1hDNYsA4NV3fsTxeg3MzEc8UTjKa6zSZCh2gGOiwSTirZc7MwDugtQbx2iDf/nwNDuvM55s8KyTA1YMEl4tzd8JnCo05KzFHXzFpB2SHk5Cz3XOyx5Vs17bj8KVM235eycOlAho0C8pYyELE2H7lD5m0ZYneIGAL8OMPd0=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776973834; c=relaxed/simple;\n\tbh=SEkUWKgRpe6vdksyqBr5521jAeA/CZj1U2dwz0Gcgqw=;\n\th=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:\n\t In-Reply-To:To:Cc;\n b=bjK4KIcKKntN/5t8HbaJLjZTAufijxH7ET8P9JU2+FrStCIxHaaTWk1qAP26sLOsqZIyWnTweM56UOHX01hXEqr/c9JlsvEcqtaAXC1Up/xut4/tk22hJp+DRY5QL1EC+TM45ZhsOjYGp7fzvENbkOD9HNcs2wr4nhm+dKLD3p4=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=disroot.org;\n spf=pass smtp.mailfrom=disroot.org;\n dkim=pass (2048-bit key) header.d=disroot.org header.i=@disroot.org\n header.b=ku9I2Uqu; arc=none smtp.client-ip=178.21.23.139",
        "X-Virus-Scanned": "SPAM Filter at disroot.org",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail;\n\tt=1776973831; bh=SEkUWKgRpe6vdksyqBr5521jAeA/CZj1U2dwz0Gcgqw=;\n\th=From:Date:Subject:References:In-Reply-To:To:Cc;\n\tb=ku9I2Uqu231RmaAEajc6DDXInOrULwY1JB0nSrhGRaEuee+j2X97vg6jlxd56pzFx\n\t NWU4zs4/1Z9cC3IOQDtNVz/+6fx9xHX1D+RkhdnSCcGeiXMxKMwjnSBafYxWZBjmTe\n\t g9TsahdsAPLMvwvWNhNuJ298gQNlp4d8rKYSdYW5iqNfIr+i9bSq+gDc9KIctjb12U\n\t Y7wSCP5RvRSMkS0QW0PfEbQldULBc8mBqW4HrHxkkzfDrSb7wpsaal8Y7STeYSoPmd\n\t quX2ccxMjPTD/WNlFU83MvQNYff2njR9vlMp+s/ASAGYM1EU9Kz+yve18ldT4lKI41\n\t xGuKcmU5lqULA==",
        "From": "Kaustabh Chakraborty <kauschluss@disroot.org>",
        "Date": "Fri, 24 Apr 2026 01:09:05 +0530",
        "Subject": "[PATCH v5 06/11] mfd: sec: resolve PMIC revision in S2MU005",
        "Precedence": "bulk",
        "X-Mailing-List": "linux-rtc@vger.kernel.org",
        "List-Id": "<linux-rtc.vger.kernel.org>",
        "List-Subscribe": "<mailto:linux-rtc+subscribe@vger.kernel.org>",
        "List-Unsubscribe": "<mailto:linux-rtc+unsubscribe@vger.kernel.org>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "7bit",
        "Message-Id": "<20260424-s2mu005-pmic-v5-6-fcbc9da5a004@disroot.org>",
        "References": "<20260424-s2mu005-pmic-v5-0-fcbc9da5a004@disroot.org>",
        "In-Reply-To": "<20260424-s2mu005-pmic-v5-0-fcbc9da5a004@disroot.org>",
        "To": "Lee Jones <lee@kernel.org>, Pavel Machek <pavel@kernel.org>,\n  Rob Herring <robh@kernel.org>, Krzysztof Kozlowski <krzk+dt@kernel.org>,\n  Conor Dooley <conor+dt@kernel.org>, MyungJoo Ham <myungjoo.ham@samsung.com>,\n  Chanwoo Choi <cw00.choi@samsung.com>, Sebastian Reichel <sre@kernel.org>,\n  Krzysztof Kozlowski <krzk@kernel.org>,\n =?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@linaro.org>,\n  Alexandre Belloni <alexandre.belloni@bootlin.com>,\n  Jonathan Corbet <corbet@lwn.net>, Shuah Khan <skhan@linuxfoundation.org>,\n  Nam Tran <trannamatk@gmail.com>,\n =?utf-8?b?xYF1a2FzeiBMZWJpZWR6acWEc2tp?= <kernel@lvkasz.us>",
        "Cc": "linux-leds@vger.kernel.org, devicetree@vger.kernel.org,\n linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,\n linux-samsung-soc@vger.kernel.org, linux-rtc@vger.kernel.org,\n linux-doc@vger.kernel.org, Kaustabh Chakraborty <kauschluss@disroot.org>"
    },
    "content": "In devices other than S2MPG1X, the revision can be retrieved from the\nfirst register of the PMIC regmap. In S2MU005 however, the location is\nin offset 0x73. Introduce a switch-case block to allow selecting the\nREG_ID register.\n\nS2MU005 also has a field mask for the revision. Apply it using\nFIELD_GET() and get the extracted value.\n\nSigned-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>\n---\n drivers/mfd/sec-common.c | 18 ++++++++++++------\n 1 file changed, 12 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/drivers/mfd/sec-common.c b/drivers/mfd/sec-common.c\nindex afc9e691bb67c..fe92bc4a3dd26 100644\n--- a/drivers/mfd/sec-common.c\n+++ b/drivers/mfd/sec-common.c\n@@ -16,6 +16,7 @@\n #include <linux/mfd/samsung/irq.h>\n #include <linux/mfd/samsung/s2mps11.h>\n #include <linux/mfd/samsung/s2mps13.h>\n+#include <linux/mfd/samsung/s2mu005.h>\n #include <linux/module.h>\n #include <linux/of.h>\n #include <linux/pm.h>\n@@ -119,20 +120,25 @@ static const struct mfd_cell s2mu005_devs[] = {\n \n static void sec_pmic_dump_rev(struct sec_pmic_dev *sec_pmic)\n {\n-\tunsigned int val;\n+\tunsigned int reg, mask, val;\n \n-\t/* For s2mpg1x, the revision is in a different regmap */\n \tswitch (sec_pmic->device_type) {\n \tcase S2MPG10:\n \tcase S2MPG11:\n+\t\t/* For s2mpg1x, the revision is in a different regmap */\n \t\treturn;\n-\tdefault:\n+\tcase S2MU005:\n+\t\treg = S2MU005_REG_ID;\n+\t\tmask = S2MU005_ID_MASK;\n \t\tbreak;\n+\tdefault:\n+\t\t/* For other device types, REG_ID is always the first register. */\n+\t\treg = S2MPS11_REG_ID;\n+\t\tmask = ~0;\n \t}\n \n-\t/* For each device type, the REG_ID is always the first register */\n-\tif (!regmap_read(sec_pmic->regmap_pmic, S2MPS11_REG_ID, &val))\n-\t\tdev_dbg(sec_pmic->dev, \"Revision: 0x%x\\n\", val);\n+\tif (!regmap_read(sec_pmic->regmap_pmic, reg, &val))\n+\t\tdev_dbg(sec_pmic->dev, \"Revision: 0x%x\\n\", field_get(mask, val));\n }\n \n static void sec_pmic_configure(struct sec_pmic_dev *sec_pmic)\n",
    "prefixes": [
        "v5",
        "06/11"
    ]
}