get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2216824,
    "url": "http://patchwork.ozlabs.org/api/patches/2216824/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/patch/20260327-mfd-si476x-v1-1-93298ca35d6d@kernel.org/",
    "project": {
        "id": 42,
        "url": "http://patchwork.ozlabs.org/api/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": "<20260327-mfd-si476x-v1-1-93298ca35d6d@kernel.org>",
    "list_archive_url": null,
    "date": "2026-03-27T08:37:26",
    "name": "mfd: si476x: Modernize GPIO handling",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "4b80c35fd587e33a53425e2080237b0e58683809",
    "submitter": {
        "id": 92050,
        "url": "http://patchwork.ozlabs.org/api/people/92050/?format=api",
        "name": "Linus Walleij",
        "email": "linusw@kernel.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-gpio/patch/20260327-mfd-si476x-v1-1-93298ca35d6d@kernel.org/mbox/",
    "series": [
        {
            "id": 497733,
            "url": "http://patchwork.ozlabs.org/api/series/497733/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/list/?series=497733",
            "date": "2026-03-27T08:37:26",
            "name": "mfd: si476x: Modernize GPIO handling",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/497733/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2216824/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2216824/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-gpio+bounces-34236-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=YLTdRMVi;\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-34236-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=\"YLTdRMVi\"",
            "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 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fhvGp1Z0Wz1y1j\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 27 Mar 2026 19:40:18 +1100 (AEDT)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 031883019534\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 27 Mar 2026 08:37:31 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 353E63D75A0;\n\tFri, 27 Mar 2026 08:37:30 +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 EC81436AB46;\n\tFri, 27 Mar 2026 08:37:29 +0000 (UTC)",
            "by smtp.kernel.org (Postfix) with ESMTPSA id 5CE6FC19423;\n\tFri, 27 Mar 2026 08:37:28 +0000 (UTC)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774600650; cv=none;\n b=XYn4GLWozgFG4jJOlXjeMH0ozmDsTWDHq8jvqmMBRhbAeNgq1f7aqHDRaW/nRD47mf+CorkqJXMN3qZCvDrDJw8qTdEK4YXD8MqVItY+fmykne3OlihJ/huN3JyuKty+KYYijjndKozVQISC37GV2QoQzdBWka2I4aQlBd8VGY8=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774600650; c=relaxed/simple;\n\tbh=+q1h5VFKKhJ4c0aTw+A6nTVOqEg9nRgPaKOLLg5nCaw=;\n\th=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc;\n b=M+zeDxddLt0FdoF3t3AH3605AesvBHsRzx5nRw1RWL8+aCDmpGmfqgOF/A5HQODR+2Z5mS9x9KFEAXGecM5Ued0drCqm53lulHBfhU9tEkfMuPzSnoXOPcADaj/UquHaDheQoicebR0/D6kQeybahOwD3v0r4U44c7u8RKhmoHM=",
        "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=YLTdRMVi; 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=1774600649;\n\tbh=+q1h5VFKKhJ4c0aTw+A6nTVOqEg9nRgPaKOLLg5nCaw=;\n\th=From:Date:Subject:To:Cc:From;\n\tb=YLTdRMViHSz9atckiNzi9FMwyPQaMzyi9ds4l/wRZ+V4me1XS+q46oN80X1NRADud\n\t RwCvWmT0AgZ2bDUU2UjtJhQ8QMZqgWqhUnYhrDkqyDIshnqiMABrrGm2QQqdYuhVDQ\n\t kf+1afebxVM9WIlrmOhR/tEFpdXbsyEYj7PneY+NAmD5BYno4U5jDkYQMHIQyv/SsD\n\t ORo6744st5Kh5xewMTh7W8P8p5iUuEsXkWftlLAgCXeoJTTguxy/sE95S0m0CAA/zG\n\t UN80U4hL2XbFyWTNXmmv5hsfLEcw1L4EERdL8vLdiDeCrm9SmkueJUWAEPluB8UMGJ\n\t hdXJktBK7twQg==",
        "From": "Linus Walleij <linusw@kernel.org>",
        "Date": "Fri, 27 Mar 2026 09:37:26 +0100",
        "Subject": "[PATCH] mfd: si476x: Modernize GPIO handling",
        "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-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "7bit",
        "Message-Id": "<20260327-mfd-si476x-v1-1-93298ca35d6d@kernel.org>",
        "X-B4-Tracking": "v=1; b=H4sIAAAAAAAC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE\n vPSU3UzU4B8JSMDIzMDYyNz3dy0FN3iTBNzswrdlDQTSwOzNEtzQyNLJaCGgqLUtMwKsGHRsbW\n 1ACDYsw5cAAAA",
        "X-Change-ID": "20260327-mfd-si476x-df4906f97129",
        "To": "Andrey Smirnov <andrew.smirnov@gmail.com>, Lee Jones <lee@kernel.org>,\n Bartosz Golaszewski <brgl@kernel.org>",
        "Cc": "linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,\n Linus Walleij <linusw@kernel.org>",
        "X-Mailer": "b4 0.14.3"
    },
    "content": "The SI476X driver depends on the legacy GPIO API. As it only\nreally use a single GPIO for reset, and this can be easily converted\nto use a GPIO descriptor, modernize the driver.\n\nThe \"reset\" GPIO is obtained from a device property, such as a\ndevice tree (\"reset-gpios\", which is standard, but this hardware has\nno DT bindings as of now) or a software node for static platforms.\n\nOut-of-tree users can easily adopt to providing a GPIO descriptor\nthis way.\n\nSigned-off-by: Linus Walleij <linusw@kernel.org>\n---\n drivers/mfd/Kconfig                 |  1 -\n drivers/mfd/si476x-cmd.c            |  1 -\n drivers/mfd/si476x-i2c.c            | 46 +++++++++++++------------------------\n include/linux/mfd/si476x-core.h     |  5 ++--\n include/linux/mfd/si476x-platform.h |  2 --\n 5 files changed, 19 insertions(+), 36 deletions(-)\n\n\n---\nbase-commit: 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f\nchange-id: 20260327-mfd-si476x-df4906f97129\n\nBest regards,",
    "diff": "diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig\nindex 7192c9d1d268..a5fd07366d8c 100644\n--- a/drivers/mfd/Kconfig\n+++ b/drivers/mfd/Kconfig\n@@ -1468,7 +1468,6 @@ config MFD_SEC_I2C\n config MFD_SI476X_CORE\n \ttristate \"Silicon Laboratories 4761/64/68 AM/FM radio.\"\n \tdepends on I2C\n-\tdepends on GPIOLIB_LEGACY\n \tselect MFD_CORE\n \tselect REGMAP_I2C\n \thelp\ndiff --git a/drivers/mfd/si476x-cmd.c b/drivers/mfd/si476x-cmd.c\nindex 3bb2decfebd3..58e9bea7e90a 100644\n--- a/drivers/mfd/si476x-cmd.c\n+++ b/drivers/mfd/si476x-cmd.c\n@@ -15,7 +15,6 @@\n #include <linux/atomic.h>\n #include <linux/i2c.h>\n #include <linux/device.h>\n-#include <linux/gpio.h>\n #include <linux/videodev2.h>\n \n #include <linux/mfd/si476x-core.h>\ndiff --git a/drivers/mfd/si476x-i2c.c b/drivers/mfd/si476x-i2c.c\nindex 899c0b5ea3aa..d9ef1776a703 100644\n--- a/drivers/mfd/si476x-i2c.c\n+++ b/drivers/mfd/si476x-i2c.c\n@@ -13,7 +13,7 @@\n #include <linux/slab.h>\n #include <linux/interrupt.h>\n #include <linux/delay.h>\n-#include <linux/gpio.h>\n+#include <linux/gpio/consumer.h>\n #include <linux/regulator/consumer.h>\n #include <linux/i2c.h>\n #include <linux/err.h>\n@@ -130,8 +130,8 @@ int si476x_core_start(struct si476x_core *core, bool soft)\n \tint err;\n \n \tif (!soft) {\n-\t\tif (gpio_is_valid(core->gpio_reset))\n-\t\t\tgpio_set_value_cansleep(core->gpio_reset, 1);\n+\t\tif (core->reset)\n+\t\t\tgpiod_set_value_cansleep(core->reset, 0);\n \n \t\tif (client->irq)\n \t\t\tenable_irq(client->irq);\n@@ -197,8 +197,8 @@ int si476x_core_start(struct si476x_core *core, bool soft)\n \telse\n \t\tcancel_delayed_work_sync(&core->status_monitor);\n \n-\tif (gpio_is_valid(core->gpio_reset))\n-\t\tgpio_set_value_cansleep(core->gpio_reset, 0);\n+\tif (core->reset)\n+\t\tgpiod_set_value_cansleep(core->reset, 1);\n \n \treturn err;\n }\n@@ -243,8 +243,8 @@ int si476x_core_stop(struct si476x_core *core, bool soft)\n \t\tcancel_delayed_work_sync(&core->status_monitor);\n \n \tif (!soft) {\n-\t\tif (gpio_is_valid(core->gpio_reset))\n-\t\t\tgpio_set_value_cansleep(core->gpio_reset, 0);\n+\t\tif (core->reset)\n+\t\t\tgpiod_set_value_cansleep(core->reset, 1);\n \t}\n \treturn err;\n }\n@@ -712,24 +712,18 @@ static int si476x_core_probe(struct i2c_client *client)\n \tatomic_set(&core->is_alive, 0);\n \tcore->power_state = SI476X_POWER_DOWN;\n \n+\tcore->reset = devm_gpiod_get_optional(&client->dev, \"reset\",\n+\t\t\t\t\t      GPIOD_OUT_HIGH);\n+\tif (IS_ERR(core->reset))\n+\t\treturn dev_err_probe(&client->dev, PTR_ERR(core->reset),\n+\t\t\t\t     \"error getting reset GPIO\\n\");\n+\tgpiod_set_consumer_name(core->reset, \"si476x reset\");\n+\n \tpdata = dev_get_platdata(&client->dev);\n \tif (pdata) {\n \t\tmemcpy(&core->power_up_parameters,\n \t\t       &pdata->power_up_parameters,\n \t\t       sizeof(core->power_up_parameters));\n-\n-\t\tcore->gpio_reset = -1;\n-\t\tif (gpio_is_valid(pdata->gpio_reset)) {\n-\t\t\trval = gpio_request(pdata->gpio_reset, \"si476x reset\");\n-\t\t\tif (rval) {\n-\t\t\t\tdev_err(&client->dev,\n-\t\t\t\t\t\"Failed to request gpio: %d\\n\", rval);\n-\t\t\t\treturn rval;\n-\t\t\t}\n-\t\t\tcore->gpio_reset = pdata->gpio_reset;\n-\t\t\tgpio_direction_output(core->gpio_reset, 0);\n-\t\t}\n-\n \t\tcore->diversity_mode = pdata->diversity_mode;\n \t\tmemcpy(&core->pinmux, &pdata->pinmux,\n \t\t       sizeof(struct si476x_pinmux));\n@@ -748,7 +742,7 @@ static int si476x_core_probe(struct i2c_client *client)\n \t\t\t\t       core->supplies);\n \tif (rval) {\n \t\tdev_err(&client->dev, \"Failed to get all of the regulators\\n\");\n-\t\tgoto free_gpio;\n+\t\treturn rval;\n \t}\n \n \tmutex_init(&core->cmd_lock);\n@@ -761,7 +755,7 @@ static int si476x_core_probe(struct i2c_client *client)\n \t\t\t   GFP_KERNEL);\n \tif (rval) {\n \t\tdev_err(&client->dev, \"Could not allocate the FIFO\\n\");\n-\t\tgoto free_gpio;\n+\t\treturn rval;\n \t}\n \tmutex_init(&core->rds_drainer_status_lock);\n \tinit_waitqueue_head(&core->rds_read_queue);\n@@ -827,11 +821,6 @@ static int si476x_core_probe(struct i2c_client *client)\n \n free_kfifo:\n \tkfifo_free(&core->rds_fifo);\n-\n-free_gpio:\n-\tif (gpio_is_valid(core->gpio_reset))\n-\t\tgpio_free(core->gpio_reset);\n-\n \treturn rval;\n }\n \n@@ -848,9 +837,6 @@ static void si476x_core_remove(struct i2c_client *client)\n \t\tcancel_delayed_work_sync(&core->status_monitor);\n \n \tkfifo_free(&core->rds_fifo);\n-\n-\tif (gpio_is_valid(core->gpio_reset))\n-\t\tgpio_free(core->gpio_reset);\n }\n \n \ndiff --git a/include/linux/mfd/si476x-core.h b/include/linux/mfd/si476x-core.h\nindex dd95c37ca134..e31c4433670a 100644\n--- a/include/linux/mfd/si476x-core.h\n+++ b/include/linux/mfd/si476x-core.h\n@@ -14,6 +14,7 @@\n \n #include <linux/kfifo.h>\n #include <linux/atomic.h>\n+#include <linux/gpio/consumer.h>\n #include <linux/i2c.h>\n #include <linux/regmap.h>\n #include <linux/mutex.h>\n@@ -103,7 +104,7 @@ enum si476x_power_state {\n  * @state: Current power state of the device.\n  * @supplues: Structure containing handles to all power supplies used\n  * by the device (NULL ones are ignored).\n- * @gpio_reset: GPIO pin connectet to the RSTB pin of the chip.\n+ * @reset: GPIO connected to the RSTB pin of the chip.\n  * @pinmux: Chip's configurable pins configuration.\n  * @diversity_mode: Chips role when functioning in diversity mode.\n  * @status_monitor: Polling worker used in polling use case scenarion\n@@ -139,7 +140,7 @@ struct si476x_core {\n \n \tstruct regulator_bulk_data supplies[4];\n \n-\tint gpio_reset;\n+\tstruct gpio_desc *reset;\n \n \tstruct si476x_pinmux pinmux;\n \tenum si476x_phase_diversity_mode diversity_mode;\ndiff --git a/include/linux/mfd/si476x-platform.h b/include/linux/mfd/si476x-platform.h\nindex cb99e16ca947..f9e1f6b27277 100644\n--- a/include/linux/mfd/si476x-platform.h\n+++ b/include/linux/mfd/si476x-platform.h\n@@ -246,8 +246,6 @@ enum si476x_phase_diversity_mode {\n  * Platform dependent definition\n  */\n struct si476x_platform_data {\n-\tint gpio_reset; /* < 0 if not used */\n-\n \tstruct si476x_power_up_args power_up_parameters;\n \tenum si476x_phase_diversity_mode diversity_mode;\n \n",
    "prefixes": []
}