get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2215880,
    "url": "http://patchwork.ozlabs.org/api/patches/2215880/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/rtc-linux/patch/20260325-sc27xx-mfd-cells-v2-3-d0ebb60aa4a7@abscue.de/",
    "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": "<20260325-sc27xx-mfd-cells-v2-3-d0ebb60aa4a7@abscue.de>",
    "list_archive_url": null,
    "date": "2026-03-25T13:53:45",
    "name": "[v2,3/5] mfd: sprd-sc27xx: Switch to devm_mfd_add_devices()",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "3d7a7a2ddffb40fe0ddab3d40374e93c2d3eaafd",
    "submitter": {
        "id": 85322,
        "url": "http://patchwork.ozlabs.org/api/people/85322/?format=api",
        "name": "Otto Pflüger",
        "email": "otto.pflueger@abscue.de"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/rtc-linux/patch/20260325-sc27xx-mfd-cells-v2-3-d0ebb60aa4a7@abscue.de/mbox/",
    "series": [
        {
            "id": 497448,
            "url": "http://patchwork.ozlabs.org/api/series/497448/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/rtc-linux/list/?series=497448",
            "date": "2026-03-25T13:53:42",
            "name": "mfd: sc27xx: Use MFD cells and devm_mfd_add_devices()",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/497448/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2215880/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2215880/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-rtc+bounces-6250-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=abscue.de header.i=@abscue.de header.a=rsa-sha256\n header.s=dkim header.b=p0PwCT/n;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=104.64.211.4; helo=sin.lore.kernel.org;\n envelope-from=linux-rtc+bounces-6250-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=abscue.de header.i=@abscue.de\n header.b=\"p0PwCT/n\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=89.58.28.240",
            "smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=abscue.de",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=abscue.de"
        ],
        "Received": [
            "from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])\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 4fgpgK3T9Rz1xy1\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 26 Mar 2026 01:09:17 +1100 (AEDT)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sin.lore.kernel.org (Postfix) with ESMTP id 7A0473032314\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 25 Mar 2026 13:55:08 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 83C573DC4CD;\n\tWed, 25 Mar 2026 13:55:03 +0000 (UTC)",
            "from srv01.abscue.de (abscue.de [89.58.28.240])\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 33F443D9DB0;\n\tWed, 25 Mar 2026 13:55:01 +0000 (UTC)",
            "from fluffy-mammal.metal.fwg-cag.de (unknown\n [IPv6:2001:9e8:cde0:9600:8d27:ae39:1dce:2212])\n\tby srv01.abscue.de (Postfix) with ESMTPSA id E67781C00A8;\n\tWed, 25 Mar 2026 14:54:53 +0100 (CET)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774446903; cv=none;\n b=d/p8KKvDmS6FiwIy6nZs8MHjJJThG4Raw10rDK0CgKWpEPzNtnauvQCQcJcmbFMOwdOQ3Vhv5TsD6iKiGlO96vCRfNRKZflVkh97cPPbOZea26yJA8wo17XUkbWVMwkSNJGAzacs7ncxdyGTKTKn4Qu6HkA+4IN1fwVuhNJjBY0=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774446903; c=relaxed/simple;\n\tbh=pmjaHkkd1GTe7qUmzoQfztH+XwQtCIWX0+AnfIZurJg=;\n\th=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:\n\t In-Reply-To:To:Cc;\n b=Mt/kEG4IV0YwYZCnKegA/azfc94BlOmhkxZ+yPjXfWb8XOmKZSiaCSNRIMTa8bmuUQ9KxLVQJdpOVFK+ZyYUh/uNx1qeTFvVVXW18FphfbuTAs2ZhLQadE5AAEX36WThclrgLuVt5gjDpA69YhCgRV3R/V4sDx5T7CI197rvB7A=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=abscue.de;\n spf=pass smtp.mailfrom=abscue.de;\n dkim=pass (2048-bit key) header.d=abscue.de header.i=@abscue.de\n header.b=p0PwCT/n; arc=none smtp.client-ip=89.58.28.240",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=abscue.de; s=dkim;\n\tt=1774446894;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\t to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\t content-transfer-encoding:content-transfer-encoding:\n\t in-reply-to:in-reply-to:references:references;\n\tbh=oAeadNDLY6QXY+Bf5+OCfab+TpNiEHvWt9WUf5IakbE=;\n\tb=p0PwCT/nEYdkk1yT7UIDSrAIOhA46+Anm+Xkp6uAmG0bf9ZaPI/WGqBOKRtGC4Er/1xQ6B\n\tu+QYMSUPb6Oi6nnmpN4cvs535xW9pEqB+Dd34CdVWJZ3vyFlHLgIsxLUJu2RQ4uOVEJt4H\n\t+ZrjeSMpJJ53TtQBa5Zc4OFKjEj58SudGXrz3Fzw6h3KhnHJMwU0kL7bT3dYD968FxfNkQ\n\tqo7xY0IARb6nk2ZWN17YS12JnwPGoCI+9tJ+Q3QoM0vcbg74djGpr1HFGk6WgPfbWdip/g\n\tPKm2euM6dmoivbAADLdv/p0sQU74xVlhbXWvMvu6R6AM0d42IyBDiBv6C/JijQ==",
        "From": "=?utf-8?q?Otto_Pfl=C3=BCger?= <otto.pflueger@abscue.de>",
        "Date": "Wed, 25 Mar 2026 14:53:45 +0100",
        "Subject": "[PATCH v2 3/5] mfd: sprd-sc27xx: Switch to devm_mfd_add_devices()",
        "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": "8bit",
        "Message-Id": "<20260325-sc27xx-mfd-cells-v2-3-d0ebb60aa4a7@abscue.de>",
        "References": "<20260325-sc27xx-mfd-cells-v2-0-d0ebb60aa4a7@abscue.de>",
        "In-Reply-To": "<20260325-sc27xx-mfd-cells-v2-0-d0ebb60aa4a7@abscue.de>",
        "To": "Alexandre Belloni <alexandre.belloni@bootlin.com>,\n Rob Herring <robh@kernel.org>, Krzysztof Kozlowski <krzk+dt@kernel.org>,\n Conor Dooley <conor+dt@kernel.org>, Orson Zhai <orsonzhai@gmail.com>,\n Baolin Wang <baolin.wang@linux.alibaba.com>,\n Chunyan Zhang <zhang.lyra@gmail.com>, Lee Jones <lee@kernel.org>,\n Pavel Machek <pavel@kernel.org>, Liam Girdwood <lgirdwood@gmail.com>,\n Mark Brown <broonie@kernel.org>, Sebastian Reichel <sre@kernel.org>",
        "Cc": "linux-rtc@vger.kernel.org, devicetree@vger.kernel.org,\n  linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org,\n  linux-pm@vger.kernel.org,\n =?utf-8?q?Otto_Pfl=C3=BCger?= <otto.pflueger@abscue.de>",
        "X-Mailer": "b4 0.14.3"
    },
    "content": "To allow instantiating subdevices such as the regulator and poweroff\ndevices that do not have corresponding device tree nodes with a\n\"compatible\" property, use devm_mfd_add_devices() with MFD cells instead\nof devm_of_platform_populate(). Since different PMICs in the SC27xx\nseries contain different components, use separate MFD cell tables for\neach PMIC model. Define cells for all components that have upstream\ndrivers at this point.\n\nSigned-off-by: Otto Pflüger <otto.pflueger@abscue.de>\n---\n drivers/mfd/sprd-sc27xx-spi.c | 62 ++++++++++++++++++++++++++++++++++++-------\n 1 file changed, 53 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/drivers/mfd/sprd-sc27xx-spi.c b/drivers/mfd/sprd-sc27xx-spi.c\nindex d6b4350779e6..eb57023fdc3c 100644\n--- a/drivers/mfd/sprd-sc27xx-spi.c\n+++ b/drivers/mfd/sprd-sc27xx-spi.c\n@@ -14,6 +14,11 @@\n #include <linux/spi/spi.h>\n #include <uapi/linux/usb/charger.h>\n \n+enum sprd_pmic_type {\n+\tPMIC_TYPE_SC2730,\n+\tPMIC_TYPE_SC2731,\n+};\n+\n #define SPRD_PMIC_INT_MASK_STATUS\t0x0\n #define SPRD_PMIC_INT_RAW_STATUS\t0x4\n #define SPRD_PMIC_INT_EN\t\t0x8\n@@ -50,6 +55,29 @@ struct sprd_pmic_data {\n \tu32 charger_det;\n };\n \n+static const struct mfd_cell sc2730_devices[] = {\n+\tMFD_CELL_OF(\"sc2730-adc\", NULL, NULL, 0, 0, \"sprd,sc2730-adc\"),\n+\tMFD_CELL_OF(\"sc2730-bltc\", NULL, NULL, 0, 0, \"sprd,sc2730-bltc\"),\n+\tMFD_CELL_OF(\"sc2730-efuse\", NULL, NULL, 0, 0, \"sprd,sc2730-efuse\"),\n+\tMFD_CELL_OF(\"sc2730-eic\", NULL, NULL, 0, 0, \"sprd,sc2730-eic\"),\n+\tMFD_CELL_OF(\"sc2730-fgu\", NULL, NULL, 0, 0, \"sprd,sc2730-fgu\"),\n+\tMFD_CELL_OF(\"sc2730-rtc\", NULL, NULL, 0, 0, \"sprd,sc2730-rtc\"),\n+\tMFD_CELL_OF(\"sc2730-vibrator\", NULL, NULL, 0, 0, \"sprd,sc2730-vibrator\"),\n+};\n+\n+static const struct mfd_cell sc2731_devices[] = {\n+\tMFD_CELL_OF(\"sc2731-adc\", NULL, NULL, 0, 0, \"sprd,sc2731-adc\"),\n+\tMFD_CELL_OF(\"sc2731-bltc\", NULL, NULL, 0, 0, \"sprd,sc2731-bltc\"),\n+\tMFD_CELL_OF(\"sc2731-charger\", NULL, NULL, 0, 0, \"sprd,sc2731-charger\"),\n+\tMFD_CELL_OF(\"sc2731-efuse\", NULL, NULL, 0, 0, \"sprd,sc2731-efuse\"),\n+\tMFD_CELL_OF(\"sc2731-eic\", NULL, NULL, 0, 0, \"sprd,sc2731-eic\"),\n+\tMFD_CELL_OF(\"sc2731-fgu\", NULL, NULL, 0, 0, \"sprd,sc2731-fgu\"),\n+\tMFD_CELL_NAME(\"sc2731-poweroff\"),\n+\tMFD_CELL_NAME(\"sc2731-regulator\"),\n+\tMFD_CELL_OF(\"sc2731-rtc\", NULL, NULL, 0, 0, \"sprd,sc2731-rtc\"),\n+\tMFD_CELL_OF(\"sc2731-vibrator\", NULL, NULL, 0, 0, \"sprd,sc2731-vibrator\"),\n+};\n+\n /*\n  * Since different PMICs of SC27xx series can have different interrupt\n  * base address and irq number, we should save irq number and irq base\n@@ -152,12 +180,26 @@ static const struct regmap_config sprd_pmic_config = {\n static int sprd_pmic_probe(struct spi_device *spi)\n {\n \tstruct sprd_pmic *ddata;\n+\tenum sprd_pmic_type pmic_type;\n \tconst struct sprd_pmic_data *pdata;\n-\tint ret, i;\n+\tconst struct mfd_cell *cells;\n+\tint ret, i, num_cells;\n+\n+\tpmic_type = (enum sprd_pmic_type)of_device_get_match_data(&spi->dev);\n \n-\tpdata = of_device_get_match_data(&spi->dev);\n-\tif (!pdata) {\n-\t\tdev_err(&spi->dev, \"No matching driver data found\\n\");\n+\tswitch (pmic_type) {\n+\tcase PMIC_TYPE_SC2730:\n+\t\tpdata = &sc2730_data;\n+\t\tcells = sc2730_devices;\n+\t\tnum_cells = ARRAY_SIZE(sc2730_devices);\n+\t\tbreak;\n+\tcase PMIC_TYPE_SC2731:\n+\t\tpdata = &sc2731_data;\n+\t\tcells = sc2731_devices;\n+\t\tnum_cells = ARRAY_SIZE(sc2731_devices);\n+\t\tbreak;\n+\tdefault:\n+\t\tdev_err(&spi->dev, \"Invalid device ID\\n\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -204,7 +246,9 @@ static int sprd_pmic_probe(struct spi_device *spi)\n \t\treturn ret;\n \t}\n \n-\tret = devm_of_platform_populate(&spi->dev);\n+\tret = devm_mfd_add_devices(&spi->dev, PLATFORM_DEVID_AUTO,\n+\t\t\t\t   cells, num_cells, NULL, 0,\n+\t\t\t\t   regmap_irq_get_domain(ddata->irq_data));\n \tif (ret) {\n \t\tdev_err(&spi->dev, \"Failed to populate sub-devices %d\\n\", ret);\n \t\treturn ret;\n@@ -241,15 +285,15 @@ static DEFINE_SIMPLE_DEV_PM_OPS(sprd_pmic_pm_ops,\n \t\t\t\tsprd_pmic_suspend, sprd_pmic_resume);\n \n static const struct of_device_id sprd_pmic_match[] = {\n-\t{ .compatible = \"sprd,sc2730\", .data = &sc2730_data },\n-\t{ .compatible = \"sprd,sc2731\", .data = &sc2731_data },\n+\t{ .compatible = \"sprd,sc2730\", .data = (void *)PMIC_TYPE_SC2730 },\n+\t{ .compatible = \"sprd,sc2731\", .data = (void *)PMIC_TYPE_SC2731 },\n \t{},\n };\n MODULE_DEVICE_TABLE(of, sprd_pmic_match);\n \n static const struct spi_device_id sprd_pmic_spi_ids[] = {\n-\t{ .name = \"sc2730\", .driver_data = (unsigned long)&sc2730_data },\n-\t{ .name = \"sc2731\", .driver_data = (unsigned long)&sc2731_data },\n+\t{ .name = \"sc2730\", .driver_data = PMIC_TYPE_SC2730 },\n+\t{ .name = \"sc2731\", .driver_data = PMIC_TYPE_SC2731 },\n \t{},\n };\n MODULE_DEVICE_TABLE(spi, sprd_pmic_spi_ids);\n",
    "prefixes": [
        "v2",
        "3/5"
    ]
}