get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2223544,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2223544/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-pwm/patch/20260415143724.447340-2-u.kleine-koenig@baylibre.com/",
    "project": {
        "id": 38,
        "url": "http://patchwork.ozlabs.org/api/1.1/projects/38/?format=api",
        "name": "Linux PWM development",
        "link_name": "linux-pwm",
        "list_id": "linux-pwm.vger.kernel.org",
        "list_email": "linux-pwm@vger.kernel.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20260415143724.447340-2-u.kleine-koenig@baylibre.com>",
    "date": "2026-04-15T14:37:25",
    "name": "[libpwm] pwmtestperf: Implement -I for inversed polarity requests",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "4b7dad49f159d6a7327f86b42f02b290b449cc23",
    "submitter": {
        "id": 88686,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/88686/?format=api",
        "name": "Uwe Kleine-König (The Capable Hub)",
        "email": "u.kleine-koenig@baylibre.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-pwm/patch/20260415143724.447340-2-u.kleine-koenig@baylibre.com/mbox/",
    "series": [
        {
            "id": 499999,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/499999/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-pwm/list/?series=499999",
            "date": "2026-04-15T14:37:25",
            "name": "[libpwm] pwmtestperf: Implement -I for inversed polarity requests",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/499999/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2223544/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2223544/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "\n <linux-pwm+bounces-8588-incoming=patchwork.ozlabs.org@vger.kernel.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "linux-pwm@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=baylibre-com.20251104.gappssmtp.com\n header.i=@baylibre-com.20251104.gappssmtp.com header.a=rsa-sha256\n header.s=20251104 header.b=ydtbJb7h;\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-pwm+bounces-8588-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=baylibre-com.20251104.gappssmtp.com\n header.i=@baylibre-com.20251104.gappssmtp.com header.b=\"ydtbJb7h\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.128.41",
            "smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=baylibre.com",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=baylibre.com"
        ],
        "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 4fwkRq1tHJz1yHc\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 16 Apr 2026 00:44:07 +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 D013C30CBB66\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 15 Apr 2026 14:37:51 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 2ED303D412C;\n\tWed, 15 Apr 2026 14:37:51 +0000 (UTC)",
            "from mail-wm1-f41.google.com (mail-wm1-f41.google.com\n [209.85.128.41])\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 326A43D3322\n\tfor <linux-pwm@vger.kernel.org>; Wed, 15 Apr 2026 14:37:45 +0000 (UTC)",
            "by mail-wm1-f41.google.com with SMTP id\n 5b1f17b1804b1-488aa77a06eso113066625e9.0\n        for <linux-pwm@vger.kernel.org>; Wed, 15 Apr 2026 07:37:45 -0700 (PDT)",
            "from localhost\n (p200300f65f20eb084c777289617ec110.dip0.t-ipconnect.de.\n [2003:f6:5f20:eb08:4c77:7289:617e:c110])\n        by smtp.gmail.com with UTF8SMTPSA id\n 5b1f17b1804b1-488ee038752sm139796925e9.9.2026.04.15.07.37.43\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Wed, 15 Apr 2026 07:37:43 -0700 (PDT)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776263870; cv=none;\n b=S+7cZ3C9EviOh3nGV6/Zr3kPFK9/5rxXJtDtZQQ7Dvv5fNHpP/oG7nWtm4Y7t/Y7svoljD6JXN+DajW3katYTpJt1vr+6B3iKffd0HsMf9mnSYm4cabL8/4SXu8JxgEKAJj5rTBWZwv4hMZm8Iyy98d3zM/xcJW2iNn90n6Hjbg=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776263870; c=relaxed/simple;\n\tbh=LfIjyYyx/IBzVebqbxiNT5LiUQSWc2N9K+ipy/DWAZE=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type;\n b=b2EflMm6tzxLbes5j54bWssUlsMM/eA8d+qT6bI3HaXZN0e/2dmdAmseRUAukqq1t5nnSGobvwyRBETJWeui40GeBD7vuJJ05PbyX81YhnJknUFfS/t2UpGrDFZMccyVaTOJTOggckWqlOS6P3m60qOutSxC9hNzCQMuWBItLU4=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=baylibre.com;\n spf=pass smtp.mailfrom=baylibre.com;\n dkim=pass (2048-bit key) header.d=baylibre-com.20251104.gappssmtp.com\n header.i=@baylibre-com.20251104.gappssmtp.com header.b=ydtbJb7h;\n arc=none smtp.client-ip=209.85.128.41",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=baylibre-com.20251104.gappssmtp.com; s=20251104; t=1776263864;\n x=1776868664; darn=vger.kernel.org;\n        h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n         :to:from:from:to:cc:subject:date:message-id:reply-to;\n        bh=klFDyUaS6A1zBMNDfZ0ty7X4uEZ5w3VLCL8oBFl7J5E=;\n        b=ydtbJb7hTDVmE1Dz+TNY1CQjBzvHsLkWZ4dT9YMwAJQFKncbM0IxABezwj6Oo45d77\n         WfXh7F8OFQmWfucEf8ixEDnOPGiCw52MO2wLteW9bPmzKKKQ4W3l9UUH5VPHftKieK1Q\n         qU/uMk8SBN7eRQy+9IUHxXkRMpOtEvi0VeEazdzCBsBtVPHt0/HtOyinFWa2a9JCL0yW\n         C6aDyH+96iVnjdL/dvlzvQuwJ8yWABi/M6vtFlGbwtgiAby60VNSXBHWKqJq7ChcCY8H\n         VfJ+8fBW3JscqKJoOteJxxRVcb9FvrqtT2YffPTcZr8z01VC5h/r3YS+fWNakZBeEKgE\n         WOvw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1776263864; x=1776868664;\n        h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n         :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=klFDyUaS6A1zBMNDfZ0ty7X4uEZ5w3VLCL8oBFl7J5E=;\n        b=ZNepi0mODM4LJQz586uHyBIKwVO6GgVogV1kCy1f1aZF4qEXCSnjDnBT9d95hj7QTl\n         Gfg2lvPL/prwbDKjAdHw9ZqQMcq58eFy17IDk+IWHfSJbBiCDdmWrzSHYlCIyuiC/bIt\n         gVm189yvFEBtvC3Emo+hDZeYwwR12hZHoBf0xzt0CRiMoPCMtf+GVoHR9OYFcb809mFF\n         jmeamd0C0+K+S6xTNOgsDQMeHrM0E1I2km4mQxQRsnt5HFDPPh0r0xsR6oYV1xChZ6kb\n         g/FBJ4UDLhSkbwIFXCBpxX7g5ptCw8TQTb2PMajhxUPWbRr74Po/ro0uGt83tYg4ut0z\n         /YNw==",
        "X-Gm-Message-State": "AOJu0YysgXCFDTgRPcZmXBIXE9C4WLTER7gmnNeTgGy1+kLswzPYzxAS\n\thCfy+6t8bK6uOOwq3AknCfz0TGc/9aWSkdJLeMxK4x/uWLG+2xxRNSPF4e4OgFsMg8oYSEOAsdE\n\t5ZUzY",
        "X-Gm-Gg": "AeBDies40sg7vYUGEKpim36hzGSXIUeYhkHE0d4z+sar7C4ciMDXK9EKUvm0DIxh/+b\n\tG+nXmelIlDPXBFqAZLPT9YpRdCqKnbTxTbdD6OF8aSWxYPBYxiJtatXTti88hPhRufjt8fIEUIj\n\tIXG3K+TcX7HSw0wMJBwLjw6WmZsYiXHL0R5pnER/bZyQ4r+lJUVptkXzAio9u0hk/y6Mh6/i/Wi\n\tRi2YLXRgzTI2Vp1Gg+qJRVguAaEU+n0zNIYOIXswFc71k6xijV5Fv/PyG/wzWg+6qqXtAOnaCLg\n\t0kYh1skeUE0BbDQlBWDA2w5wdIb+G5heEAZIAScMtewL3zgbJ4p77fcVIXYTbyy3MxyZEWw2WsA\n\tnuib34G0hckbZSCv/+DHpqb5NSEkgDY17xUP0dOIVx5I/k039NeBFRMk6kSZknSRhrGksaPtmCB\n\tLc5zJAH1q4Mt/3iczH1sf79VNWCcGHIY1zmXI1MrESX1o1IYXkENu3QenOZ9zG0Q+DnKzHbHZYS\n\tQ8V0JxoZGu41TDvUvG5wBKnbw==",
        "X-Received": "by 2002:a05:600c:a311:b0:483:7903:c3b1 with SMTP id\n 5b1f17b1804b1-488d68607fbmr227578655e9.20.1776263864108;\n        Wed, 15 Apr 2026 07:37:44 -0700 (PDT)",
        "From": "=?utf-8?q?Uwe_Kleine-K=C3=B6nig?= <u.kleine-koenig@baylibre.com>",
        "To": "linux-pwm@vger.kernel.org",
        "Cc": "Andrea della Porta <andrea.porta@suse.com>",
        "Subject": "[PATCH libpwm] pwmtestperf: Implement -I for inversed polarity\n requests",
        "Date": "Wed, 15 Apr 2026 16:37:25 +0200",
        "Message-ID": "<20260415143724.447340-2-u.kleine-koenig@baylibre.com>",
        "X-Mailer": "git-send-email 2.47.3",
        "Precedence": "bulk",
        "X-Mailing-List": "linux-pwm@vger.kernel.org",
        "List-Id": "<linux-pwm.vger.kernel.org>",
        "List-Subscribe": "<mailto:linux-pwm+subscribe@vger.kernel.org>",
        "List-Unsubscribe": "<mailto:linux-pwm+unsubscribe@vger.kernel.org>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "X-Developer-Signature": "v=1; a=openpgp-sha256; l=3121;\n i=u.kleine-koenig@baylibre.com; h=from:subject;\n bh=LfIjyYyx/IBzVebqbxiNT5LiUQSWc2N9K+ipy/DWAZE=;\n b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBp36Kk1sGFVjHggig6sRmR5jT+wrWun3Z4GddvR\n TK5xONajAiJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCad+ipAAKCRCPgPtYfRL+\n TugzB/9Z72ejKRy0vDGu3ecChs7h3QN/GTx/KL6FZQ+0R1HZecPReUeRYcJK2CO4iSMtcQNr5mD\n IA1kb9h18DhmYDyF79uMZO8/vesWZzVsfr9vjRGuT6+nujjZIwh2hXL3WyYBYkNfVV7pP7Txp+h\n yzf2zk28yASHIevOYAgA0XZ7qeUyBFy1DwKwQU1fNnOSFn142GztKcbsyXmElU0Qro9yMS0MMfW\n Hir5eG/LtZad2uehcvczyRClo/ml242LKBYmP6CA1eqoW0CjTTOvCadZSeTu3mLIJv0+wEhJZF+\n Y5lmI53GyPy1xeBipsrItWHi8tafTYwJRqXNLv/U4TBLqpxh",
        "X-Developer-Key": "i=u.kleine-koenig@baylibre.com; a=openpgp;\n fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6",
        "Content-Transfer-Encoding": "8bit"
    },
    "content": "The driver handling for .duty_offset_ns > 0 isn't always trivial to get\nright. So make pwmtestperf capable to do some tests with a non-zero duty\noffset.\n\nFix a typo in the manpage en passant.\n\nSigned-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>\n---\nHello,\n\ntriggered by a driver submission by Andrea della Porta[1], this increases\ntest coverage to (hopefully) catch issues around driver handling of\nduty offset.\n\nTesing that on stm32 indeed found a bug, will send a patch for that\nlater.\n\nBest regards\nUwe\n\n[1] https://lore.kernel.org/linux-pwm/adkrHkANCzxO8KUP@monoceros/\n\n pwmtestperf.1 | 13 +++++++++++--\n pwmtestperf.c | 17 ++++++++++++++++-\n 2 files changed, 27 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/pwmtestperf.1 b/pwmtestperf.1\nindex 74dc8e30f32a..944564c14a0b 100644\n--- a/pwmtestperf.1\n+++ b/pwmtestperf.1\n@@ -13,6 +13,7 @@ pwmtestperf \\- Applies a simple test pattern to a PWM output\n .IB periodlength ]\n .RB [ \\-S\\~\\c\n .IB step ]\n+.RB [ \\-I ]\n .RB [ \\-v ]\n .YS\n .SH Description\n@@ -27,7 +28,7 @@ and\n \n The fixed period is specified by\n .I periodlength\n-and the duty length is increased in each steps by\n+and the duty length is increased in each step by\n .I step \n up from 0 to\n .IR periodlength .\n@@ -35,7 +36,11 @@ up from 0 to\n .I step \n is negative, it decreases from\n .I periodlength\n-to 0.\n+to 0. With\n+.B \\-I\n+given the duty offset in each request is chosen to describe an inversed\n+polarity waveform, that is a falling edge at the end of each period. Otherwise\n+the duty offset is zero.\n .\n .SH Options\n .\n@@ -68,6 +73,10 @@ in nanoseconds defines the length of the periods of the waveform to be set.\n in nanoseconds defines the step the duty length is increased in each step. (Or decreased if negative.)\n .\n .TP\n+.B \\-I\n+Use requests with inverted polarity.\n+.\n+.TP\n .B \\-v\n Emit some information during runtime.\n .\ndiff --git a/pwmtestperf.c b/pwmtestperf.c\nindex 72abf3987459..95be2b6fe64e 100644\n--- a/pwmtestperf.c\n+++ b/pwmtestperf.c\n@@ -22,16 +22,21 @@ int main(int argc, char *const argv[])\n \tint ret;\n \tint opt;\n \tlong long step = 1;\n+\tbool inverted = false;\n \n \tunsigned int chipno = 0;\n \tunsigned int pwmno = 0;\n \n-\twhile ((opt = getopt(argc, argv, \"c:p:P:S:\")) != -1) {\n+\twhile ((opt = getopt(argc, argv, \"c:Ip:P:S:\")) != -1) {\n \t\tswitch (opt) {\n \t\tcase 'c':\n \t\t\tchipno = atoi(optarg);\n \t\t\tbreak;\n \n+\t\tcase 'I':\n+\t\t\tinverted = true;\n+\t\t\tbreak;\n+\n \t\tcase 'p':\n \t\t\tpwmno = atoi(optarg);\n \t\t\tbreak;\n@@ -67,6 +72,16 @@ int main(int argc, char *const argv[])\n \t}\n \n \tfor (wf.duty_length_ns = (step > 0 ? 0 : wf.period_length_ns); wf.duty_length_ns <= wf.period_length_ns; wf.duty_length_ns += step) {\n+\n+\t\t/*\n+\t\t * .duty_length_ns must be < .period_length_ns, so don't invert\n+\t\t * for .duty_length_ns == 0.\n+\t\t */\n+\t\tif (inverted && wf.duty_length_ns)\n+\t\t\twf.duty_offset_ns = wf.period_length_ns - wf.duty_length_ns;\n+\t\telse\n+\t\t\twf.duty_offset_ns = 0;\n+\n \t\tret = pwm_set_waveform(pwm, &wf);\n \t\tif (ret < 0) {\n \t\t\tperror(\"Failed to configure PWM\");\n",
    "prefixes": [
        "libpwm"
    ]
}