get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2234574,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/2234574/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/patch/20260507212451.3333185-3-arnd@kernel.org/",
    "project": {
        "id": 42,
        "url": "http://patchwork.ozlabs.org/api/1.2/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": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260507212451.3333185-3-arnd@kernel.org>",
    "list_archive_url": null,
    "date": "2026-05-07T21:24:50",
    "name": "[2/3,v5,net-next] p54spi: convert to devicetree",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "98cb8b7c46d10b4c1ebcc7bf589dc8d4ed30b421",
    "submitter": {
        "id": 80402,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/80402/?format=api",
        "name": "Arnd Bergmann",
        "email": "arnd@kernel.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-gpio/patch/20260507212451.3333185-3-arnd@kernel.org/mbox/",
    "series": [
        {
            "id": 503272,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/503272/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/list/?series=503272",
            "date": "2026-05-07T21:24:48",
            "name": "wireless: p54 devicetree conversion",
            "version": 5,
            "mbox": "http://patchwork.ozlabs.org/series/503272/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2234574/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2234574/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-gpio+bounces-36415-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=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=joFeMxav;\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-gpio+bounces-36415-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=\"joFeMxav\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201"
        ],
        "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 4gBQNL27nlz1yJq\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 08 May 2026 07:28:34 +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 5D80C30A5C44\n\tfor <incoming@patchwork.ozlabs.org>; Thu,  7 May 2026 21:25:22 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 9653B344DAD;\n\tThu,  7 May 2026 21:25:21 +0000 (UTC)",
            "from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org\n [10.30.226.201])\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 55D66343D85;\n\tThu,  7 May 2026 21:25:21 +0000 (UTC)",
            "by smtp.kernel.org (Postfix) with ESMTPSA id E33C5C2BCC7;\n\tThu,  7 May 2026 21:25:15 +0000 (UTC)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1778189121; cv=none;\n b=Z/pd3mVyNVYk3lR2kaBicCMomEhF66tac/TPnTDS20ul0oUrSu6abWlBRXiipKBE+nsSESxLPHxBKvbqqx0BQjbgDjqAy8mPLCP4tlVhtsFxzSFXQ/Pe4ObHsU2DEkLKZSIBOIfLm5coiZsHy8BmXOU8IZf8n6gayR850FJ9nss=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1778189121; c=relaxed/simple;\n\tbh=p5t+JM3lfiw9lH48miW27NEkEgOXRNL8J8aC9VfoV+k=;\n\th=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:\n\t MIME-Version;\n b=oeJYxJzUWEuDfbZfvl7Abri2+XFQkteSfI/p9NWv8p5jnn42ElJEKDPVk98Ep2zKeDAzMkGDosWmu0U7FDjArZKzEeYKhBWR1CV/SWzDIOOGSgDSrTWKP3iAubPPUxeNBtiJWEj+poId0sreaZbw7jYI8519+2Nc7RyE6pBwTH0=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=joFeMxav; arc=none smtp.client-ip=10.30.226.201",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1778189121;\n\tbh=p5t+JM3lfiw9lH48miW27NEkEgOXRNL8J8aC9VfoV+k=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=joFeMxav2cbvkSjpcFV+IRYIaJZ2ND24vIzjvO3QuFSjLaFxqCoGxKfQr7opRGQc7\n\t 3lON8Tcxm/tY/jQQgr3mAlmn6rISw1iVq3CtqTN2zspiwkrYBCHl2X4E3If6niEUbb\n\t v5Of/tFshr10705WIy83BlgeY430ZebJ5WQ0dF6d66yiYNAGr+vz6xvVGT204UZ4y6\n\t ujxpyhzyA5V2HZkjwk2JBMevhQNsuo/gFsEuABM+QSPs9durfV7Gc3zFZa7B6nUmEf\n\t pvbm8me+27HgorJskeXs4AWhv6sZKdSgzorQ/HVgsSed7MDUFAWm0PKaqmyNqNmr27\n\t bofGuP+yjzxZg==",
        "From": "Arnd Bergmann <arnd@kernel.org>",
        "To": "netdev@vger.kernel.org",
        "Cc": "Arnd Bergmann <arnd@arndb.de>, \"Aaro Koskinen\" <aaro.koskinen@iki.fi>,\n \"Andreas Kemnade\" <andreas@kemnade.info>,\n \"Bartosz Golaszewski\" <brgl@kernel.org>,\n =?utf-8?q?Beno=C3=AEt_Cousson?= <bcousson@baylibre.com>,\n \"David S. Miller\" <davem@davemloft.net>,\n \"Dmitry Torokhov\" <dmitry.torokhov@gmail.com>,\n \"Eric Dumazet\" <edumazet@google.com>, \"Felipe Balbi\" <balbi@kernel.org>,\n \"Jakub Kicinski\" <kuba@kernel.org>,\n \"Johannes Berg\" <johannes@sipsolutions.net>,\n \"Kevin Hilman\" <khilman@baylibre.com>,\n \"Krzysztof Kozlowski\" <krzk+dt@kernel.org>,\n \"Linus Walleij\" <linusw@kernel.org>, \"Paolo Abeni\" <pabeni@redhat.com>,\n \"Rob Herring\" <robh+dt@kernel.org>, \"Roger Quadros\" <rogerq@kernel.org>,\n \"Tony Lindgren\" <tony@atomide.com>, linux-wireless@vger.kernel.org,\n devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,\n linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org,\n linux-omap@vger.kernel.org, Christian Lamparter <chunkeey@gmail.com>",
        "Subject": "[PATCH 2/3] [v5 net-next] p54spi: convert to devicetree",
        "Date": "Thu,  7 May 2026 23:24:50 +0200",
        "Message-Id": "<20260507212451.3333185-3-arnd@kernel.org>",
        "X-Mailer": "git-send-email 2.39.5",
        "In-Reply-To": "<20260507212451.3333185-1-arnd@kernel.org>",
        "References": "<20260507212451.3333185-1-arnd@kernel.org>",
        "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": "From: Arnd Bergmann <arnd@arndb.de>\n\nThe Prism54 SPI driver hardcodes GPIO numbers and expects users to\npass them as module parameters, apparently a relic from its life as a\nstaging driver. This works because there is only one user, the Nokia\nN8x0 tablet.\n\nConvert this to the gpio descriptor interface and DT based probing\nto improve this and simplify the code at the same time.\n\nAcked-by: Christian Lamparter <chunkeey@gmail.com>\nReviewed-by: Linus Walleij <linusw@kernel.org>\nSigned-off-by: Arnd Bergmann <arnd@arndb.de>\n---\nv5:\n - fix irq assignment # https://sashiko.dev/#/patchset/20260430081242.3686993-1-arnd%40kernel.org\n\nv4:\n - make gpio line optional again\n - fix EPROBE_DEFER handling\n - match only st,stlc4560 compatible value, with binding change\n\nv3:\n - rebase an older patch\n---\n arch/arm/mach-omap2/board-n8x0.c           | 18 ------\n drivers/net/wireless/intersil/p54/p54spi.c | 67 ++++++++--------------\n drivers/net/wireless/intersil/p54/p54spi.h |  3 +\n 3 files changed, 26 insertions(+), 62 deletions(-)",
    "diff": "diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c\nindex 969265d5d5c6..d9acd32c5457 100644\n--- a/arch/arm/mach-omap2/board-n8x0.c\n+++ b/arch/arm/mach-omap2/board-n8x0.c\n@@ -20,7 +20,6 @@\n #include <linux/spi/spi.h>\n #include <linux/usb/musb.h>\n #include <linux/mmc/host.h>\n-#include <linux/platform_data/spi-omap2-mcspi.h>\n #include <linux/platform_data/mmc-omap.h>\n #include <linux/mfd/menelaus.h>\n \n@@ -106,21 +105,6 @@ static void __init n8x0_usb_init(void) {}\n \n #endif /*CONFIG_USB_MUSB_TUSB6010 */\n \n-\n-static struct omap2_mcspi_device_config p54spi_mcspi_config = {\n-\t.turbo_mode\t= 0,\n-};\n-\n-static struct spi_board_info n800_spi_board_info[] __initdata = {\n-\t{\n-\t\t.modalias\t= \"p54spi\",\n-\t\t.bus_num\t= 2,\n-\t\t.chip_select\t= 0,\n-\t\t.max_speed_hz   = 48000000,\n-\t\t.controller_data = &p54spi_mcspi_config,\n-\t},\n-};\n-\n #if defined(CONFIG_MENELAUS) && IS_ENABLED(CONFIG_MMC_OMAP)\n \n /*\n@@ -524,7 +508,5 @@ omap_late_initcall(n8x0_late_initcall);\n void * __init n8x0_legacy_init(void)\n {\n \tboard_check_revision();\n-\tspi_register_board_info(n800_spi_board_info,\n-\t\t\t\tARRAY_SIZE(n800_spi_board_info));\n \treturn &mmc1_data;\n }\ndiff --git a/drivers/net/wireless/intersil/p54/p54spi.c b/drivers/net/wireless/intersil/p54/p54spi.c\nindex 9d66dcae54e0..d18be2545028 100644\n--- a/drivers/net/wireless/intersil/p54/p54spi.c\n+++ b/drivers/net/wireless/intersil/p54/p54spi.c\n@@ -8,6 +8,7 @@\n  */\n \n #include <linux/module.h>\n+#include <linux/mod_devicetable.h>\n #include <linux/platform_device.h>\n #include <linux/interrupt.h>\n #include <linux/firmware.h>\n@@ -15,7 +16,7 @@\n #include <linux/irq.h>\n #include <linux/spi/spi.h>\n #include <linux/etherdevice.h>\n-#include <linux/gpio.h>\n+#include <linux/gpio/consumer.h>\n #include <linux/slab.h>\n \n #include \"p54spi.h\"\n@@ -30,19 +31,6 @@\n MODULE_FIRMWARE(\"3826.arm\");\n MODULE_FIRMWARE(\"3826.eeprom\");\n \n-/* gpios should be handled in board files and provided via platform data,\n- * but because it's currently impossible for p54spi to have a header file\n- * in include/linux, let's use module parameters for now\n- */\n-\n-static int p54spi_gpio_power = 97;\n-module_param(p54spi_gpio_power, int, 0444);\n-MODULE_PARM_DESC(p54spi_gpio_power, \"gpio number for power line\");\n-\n-static int p54spi_gpio_irq = 87;\n-module_param(p54spi_gpio_irq, int, 0444);\n-MODULE_PARM_DESC(p54spi_gpio_irq, \"gpio number for irq line\");\n-\n static void p54spi_spi_read(struct p54s_priv *priv, u8 address,\n \t\t\t      void *buf, size_t len)\n {\n@@ -262,14 +250,14 @@ static int p54spi_upload_firmware(struct ieee80211_hw *dev)\n \n static void p54spi_power_off(struct p54s_priv *priv)\n {\n-\tdisable_irq(gpio_to_irq(p54spi_gpio_irq));\n-\tgpio_set_value(p54spi_gpio_power, 0);\n+\tdisable_irq(priv->irq);\n+\tgpiod_set_value(priv->gpio_powerdown, 1);\n }\n \n static void p54spi_power_on(struct p54s_priv *priv)\n {\n-\tgpio_set_value(p54spi_gpio_power, 1);\n-\tenable_irq(gpio_to_irq(p54spi_gpio_irq));\n+\tgpiod_set_value(priv->gpio_powerdown, 0);\n+\tenable_irq(priv->irq);\n \n \t/* need to wait a while before device can be accessed, the length\n \t * is just a guess\n@@ -608,31 +596,20 @@ static int p54spi_probe(struct spi_device *spi)\n \t\tgoto err_free;\n \t}\n \n-\tret = gpio_request(p54spi_gpio_power, \"p54spi power\");\n-\tif (ret < 0) {\n-\t\tdev_err(&priv->spi->dev, \"power GPIO request failed: %d\", ret);\n+\tpriv->gpio_powerdown = gpiod_get_optional(&spi->dev, \"powerdown\", GPIOD_OUT_HIGH);\n+\tif (IS_ERR(priv->gpio_powerdown)) {\n+\t\tret = dev_err_probe(&priv->spi->dev, PTR_ERR(priv->gpio_powerdown),\n+\t\t\t\t    \"powerdown GPIO request failed\\n\");\n \t\tgoto err_free;\n \t}\n \n-\tret = gpio_request(p54spi_gpio_irq, \"p54spi irq\");\n-\tif (ret < 0) {\n-\t\tdev_err(&priv->spi->dev, \"irq GPIO request failed: %d\", ret);\n-\t\tgoto err_free_gpio_power;\n-\t}\n-\n-\tgpio_direction_output(p54spi_gpio_power, 0);\n-\tgpio_direction_input(p54spi_gpio_irq);\n-\n-\tret = request_irq(gpio_to_irq(p54spi_gpio_irq),\n-\t\t\t  p54spi_interrupt, IRQF_NO_AUTOEN, \"p54spi\",\n-\t\t\t  priv->spi);\n+\tret = request_irq(spi->irq, p54spi_interrupt, IRQF_NO_AUTOEN, \"p54spi\", priv->spi);\n \tif (ret < 0) {\n \t\tdev_err(&priv->spi->dev, \"request_irq() failed\");\n-\t\tgoto err_free_gpio_irq;\n+\t\tgoto err_free_gpio_power;\n \t}\n \n-\tirq_set_irq_type(gpio_to_irq(p54spi_gpio_irq), IRQ_TYPE_EDGE_RISING);\n-\n+\tpriv->irq = spi->irq;\n \tINIT_WORK(&priv->work, p54spi_work);\n \tinit_completion(&priv->fw_comp);\n \tINIT_LIST_HEAD(&priv->tx_pending);\n@@ -659,11 +636,9 @@ static int p54spi_probe(struct spi_device *spi)\n \n err_free_common:\n \trelease_firmware(priv->firmware);\n-\tfree_irq(gpio_to_irq(p54spi_gpio_irq), spi);\n-err_free_gpio_irq:\n-\tgpio_free(p54spi_gpio_irq);\n+\tfree_irq(priv->irq, spi);\n err_free_gpio_power:\n-\tgpio_free(p54spi_gpio_power);\n+\tgpiod_put(priv->gpio_powerdown);\n err_free:\n \tp54_free_common(priv->hw);\n \treturn ret;\n@@ -675,10 +650,8 @@ static void p54spi_remove(struct spi_device *spi)\n \n \tp54_unregister_common(priv->hw);\n \n-\tfree_irq(gpio_to_irq(p54spi_gpio_irq), spi);\n-\n-\tgpio_free(p54spi_gpio_power);\n-\tgpio_free(p54spi_gpio_irq);\n+\tfree_irq(priv->irq, spi);\n+\tgpiod_put(priv->gpio_powerdown);\n \trelease_firmware(priv->firmware);\n \n \tmutex_destroy(&priv->mutex);\n@@ -686,10 +659,16 @@ static void p54spi_remove(struct spi_device *spi)\n \tp54_free_common(priv->hw);\n }\n \n+static const struct of_device_id p54spi_of_ids[] = {\n+\t{ .compatible = \"st,stlc4560\", },\n+\t{ },\n+};\n+MODULE_DEVICE_TABLE(of, p54spi_of_ids);\n \n static struct spi_driver p54spi_driver = {\n \t.driver = {\n \t\t.name\t\t= \"p54spi\",\n+\t\t.of_match_table = p54spi_of_ids,\n \t},\n \n \t.probe\t\t= p54spi_probe,\ndiff --git a/drivers/net/wireless/intersil/p54/p54spi.h b/drivers/net/wireless/intersil/p54/p54spi.h\nindex e5619a13fd61..118785cc635a 100644\n--- a/drivers/net/wireless/intersil/p54/p54spi.h\n+++ b/drivers/net/wireless/intersil/p54/p54spi.h\n@@ -107,6 +107,9 @@ struct p54s_priv {\n \n \tenum fw_state fw_state;\n \tconst struct firmware *firmware;\n+\n+\tstruct gpio_desc *gpio_powerdown;\n+\tint irq;\n };\n \n #endif /* P54SPI_H */\n",
    "prefixes": [
        "2/3",
        "v5",
        "net-next"
    ]
}