get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1946318,
    "url": "http://patchwork.ozlabs.org/api/patches/1946318/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-pwm/patch/20240611125321.6927-2-tzimmermann@suse.de/",
    "project": {
        "id": 38,
        "url": "http://patchwork.ozlabs.org/api/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": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20240611125321.6927-2-tzimmermann@suse.de>",
    "list_archive_url": null,
    "date": "2024-06-11T12:41:56",
    "name": "[01/17] backlight: Add BL_CORE_ constants for power states",
    "commit_ref": null,
    "pull_url": null,
    "state": "handled-elsewhere",
    "archived": false,
    "hash": "20104f629f7c76d4ab3ac98f5f91c781f0ff9357",
    "submitter": {
        "id": 74535,
        "url": "http://patchwork.ozlabs.org/api/people/74535/?format=api",
        "name": "Thomas Zimmermann",
        "email": "tzimmermann@suse.de"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-pwm/patch/20240611125321.6927-2-tzimmermann@suse.de/mbox/",
    "series": [
        {
            "id": 410380,
            "url": "http://patchwork.ozlabs.org/api/series/410380/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-pwm/list/?series=410380",
            "date": "2024-06-11T12:41:57",
            "name": "backlight: Introduce power-state constants",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/410380/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1946318/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1946318/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-pwm+bounces-2415-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 spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=139.178.88.99; helo=sv.mirrors.kernel.org;\n envelope-from=linux-pwm+bounces-2415-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=195.135.223.130",
            "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=suse.de",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=suse.de",
            "smtp-out1.suse.de;\n\tnone"
        ],
        "Received": [
            "from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature ECDSA (secp384r1))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4Vz7rs0wSHz20Vv\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 11 Jun 2024 22:53:33 +1000 (AEST)",
            "from smtp.subspace.kernel.org (wormhole.subspace.kernel.org\n [52.25.139.140])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby sv.mirrors.kernel.org (Postfix) with ESMTPS id A8FA52829DF\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 11 Jun 2024 12:53:31 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id D12CA17C7A8;\n\tTue, 11 Jun 2024 12:53:27 +0000 (UTC)",
            "from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130])\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 3707417C21F;\n\tTue, 11 Jun 2024 12:53:26 +0000 (UTC)",
            "from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org\n [IPv6:2a07:de40:b281:104:10:150:64:97])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby smtp-out1.suse.de (Postfix) with ESMTPS id 5675D219B1;\n\tTue, 11 Jun 2024 12:53:24 +0000 (UTC)",
            "from imap1.dmz-prg2.suse.org (localhost [127.0.0.1])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 0DF6D13AAB;\n\tTue, 11 Jun 2024 12:53:24 +0000 (UTC)",
            "from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167])\n\tby imap1.dmz-prg2.suse.org with ESMTPSA\n\tid 8BY9AsRIaGbxMgAAD6G6ig\n\t(envelope-from <tzimmermann@suse.de>); Tue, 11 Jun 2024 12:53:24 +0000"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1718110407; cv=none;\n b=osDLnfzQQGzMvR5jlL1l4+5cbQAo+5cyFkvwh2CcReQigRnVGwt15LKnKzDvCivElGHzq1dp5o//RY4y/T6YxA88HFwTuPsCqWHRm0gCV6xZRQAeROk0Lu2ZOchRGVevsq9yj5fZjQLNNbK4JjDC3i+FEDtOAu315E0nC7NEIyg=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1718110407; c=relaxed/simple;\n\tbh=eT6RfcYax/sVicVqLrrK/Bwi39O6tDy5hSrkRdPCkJ4=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=A78MPLYrhOTu3u6HZv4WI4LoBq8v/ZidfKSH5PQN330a8p3l6p+S0rctxZ0aML0NrAUY4zQY3qYeRcxyj1731KJsVaEN/8zEwYR4OJbGrEaMKstSDrSrvuoGGWdJH5e6TrXH6431INfcAxvd0eJkD0HEGjsD9wvDH/nRwr8AFns=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=suse.de;\n spf=pass smtp.mailfrom=suse.de; arc=none smtp.client-ip=195.135.223.130",
        "From": "Thomas Zimmermann <tzimmermann@suse.de>",
        "To": "lee@kernel.org,\n\tdaniel.thompson@linaro.org,\n\tjingoohan1@gmail.com,\n\tdeller@gmx.de,\n\tlinus.walleij@linaro.org,\n\tf.suligoi@asem.it,\n\tukleinek@kernel.org",
        "Cc": "dri-devel@lists.freedesktop.org,\n\tlinux-fbdev@vger.kernel.org,\n\tlinux-pwm@vger.kernel.org,\n\tThomas Zimmermann <tzimmermann@suse.de>",
        "Subject": "[PATCH 01/17] backlight: Add BL_CORE_ constants for power states",
        "Date": "Tue, 11 Jun 2024 14:41:56 +0200",
        "Message-ID": "<20240611125321.6927-2-tzimmermann@suse.de>",
        "X-Mailer": "git-send-email 2.45.2",
        "In-Reply-To": "<20240611125321.6927-1-tzimmermann@suse.de>",
        "References": "<20240611125321.6927-1-tzimmermann@suse.de>",
        "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-Transfer-Encoding": "8bit",
        "X-Rspamd-Pre-Result": [
            "action=no action;\n\tmodule=replies;\n\tMessage is reply to one we originated",
            "action=no action;\n\tmodule=replies;\n\tMessage is reply to one we originated"
        ],
        "X-Rspamd-Action": "no action",
        "X-Spam-Level": "",
        "X-Spamd-Result": "default: False [-4.00 / 50.00];\n\tREPLY(-4.00)[]",
        "X-Rspamd-Server": "rspamd1.dmz-prg2.suse.org",
        "X-Rspamd-Queue-Id": "5675D219B1",
        "X-Spam-Flag": "NO",
        "X-Spam-Score": "-4.00"
    },
    "content": "Duplicate FB_BLANK_ constants as BL_CORE_ constants in the backlight\nheader file. Allows backlight drivers to avoid including the fbdev\nheader file and removes a compile-time dependency between the two\nsubsystems.\n\nThe new BL_CORE constants have the same values as their FB_BLANK_\ncounterparts. Hence UAPI and internal semantics do not change. The\nbacklight drivers can be converted one by one.\n\nBacklight code or drivers do not use FB_BLANK_VSYNC_SUSPEND and\nFB_BLANK_HSYNC_SUSPEND, so no new constants for these are being\nadded.\n\nThe semantics of FB_BLANK_NORMAL appear inconsistent. In fbdev,\nNORMAL means display off with sync enabled. In backlight code,\nthis translates to turn the backlight off, but some drivers\ninterpret it as backlight on. So we keep the current code as is,\nbut mark BL_CORE_NORMAL as deprecated. Drivers should be fixed\nand the constant removed. This affects ams369fg06 and a few DRM\npanel drivers.\n\nSigned-off-by: Thomas Zimmermann <tzimmermann@suse.de>\n---\n Documentation/ABI/stable/sysfs-class-backlight |  7 ++++---\n include/linux/backlight.h                      | 16 ++++++++++------\n 2 files changed, 14 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/Documentation/ABI/stable/sysfs-class-backlight b/Documentation/ABI/stable/sysfs-class-backlight\nindex 023fb52645f8b..6102d6bebdf9a 100644\n--- a/Documentation/ABI/stable/sysfs-class-backlight\n+++ b/Documentation/ABI/stable/sysfs-class-backlight\n@@ -3,10 +3,11 @@ Date:\t\tApril 2005\n KernelVersion:\t2.6.12\n Contact:\tRichard Purdie <rpurdie@rpsys.net>\n Description:\n-\t\tControl BACKLIGHT power, values are FB_BLANK_* from fb.h\n+\t\tControl BACKLIGHT power, values are compatible with\n+\t\tFB_BLANK_* from fb.h\n \n-\t\t - FB_BLANK_UNBLANK (0)   : power on.\n-\t\t - FB_BLANK_POWERDOWN (4) : power off\n+\t\t - 0 (FB_BLANK_UNBLANK)   : power on.\n+\t\t - 4 (FB_BLANK_POWERDOWN) : power off\n Users:\t\tHAL\n \n What:\t\t/sys/class/backlight/<backlight>/brightness\ndiff --git a/include/linux/backlight.h b/include/linux/backlight.h\nindex 19a1c0e22629d..e0cfd89ffadd2 100644\n--- a/include/linux/backlight.h\n+++ b/include/linux/backlight.h\n@@ -210,14 +210,18 @@ struct backlight_properties {\n \t * When the power property is updated update_status() is called.\n \t *\n \t * The possible values are: (0: full on, 1 to 3: power saving\n-\t * modes; 4: full off), see FB_BLANK_XXX.\n+\t * modes; 4: full off), see BL_CORE_XXX constants.\n \t *\n \t * When the backlight device is enabled @power is set\n-\t * to FB_BLANK_UNBLANK. When the backlight device is disabled\n-\t * @power is set to FB_BLANK_POWERDOWN.\n+\t * to BL_CORE_UNBLANK. When the backlight device is disabled\n+\t * @power is set to BL_CORE_POWERDOWN.\n \t */\n \tint power;\n \n+#define BL_CORE_UNBLANK\t\t(0)\n+#define BL_CORE_NORMAL\t\t(1) // deprecated; don't use in new code\n+#define BL_CORE_POWERDOWN\t(4)\n+\n \t/**\n \t * @type: The type of backlight supported.\n \t *\n@@ -346,7 +350,7 @@ static inline int backlight_enable(struct backlight_device *bd)\n \tif (!bd)\n \t\treturn 0;\n \n-\tbd->props.power = FB_BLANK_UNBLANK;\n+\tbd->props.power = BL_CORE_UNBLANK;\n \tbd->props.state &= ~BL_CORE_FBBLANK;\n \n \treturn backlight_update_status(bd);\n@@ -361,7 +365,7 @@ static inline int backlight_disable(struct backlight_device *bd)\n \tif (!bd)\n \t\treturn 0;\n \n-\tbd->props.power = FB_BLANK_POWERDOWN;\n+\tbd->props.power = BL_CORE_POWERDOWN;\n \tbd->props.state |= BL_CORE_FBBLANK;\n \n \treturn backlight_update_status(bd);\n@@ -380,7 +384,7 @@ static inline int backlight_disable(struct backlight_device *bd)\n  */\n static inline bool backlight_is_blank(const struct backlight_device *bd)\n {\n-\treturn bd->props.power != FB_BLANK_UNBLANK ||\n+\treturn bd->props.power != BL_CORE_UNBLANK ||\n \t       bd->props.state & (BL_CORE_SUSPENDED | BL_CORE_FBBLANK);\n }\n \n",
    "prefixes": [
        "01/17"
    ]
}