get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2216821,
    "url": "http://patchwork.ozlabs.org/api/patches/2216821/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/patch/20260327-asoc-uda1380-v1-1-f6f91be9b7f8@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-asoc-uda1380-v1-1-f6f91be9b7f8@kernel.org>",
    "list_archive_url": null,
    "date": "2026-03-27T08:05:47",
    "name": "ASoC: uda1380: Modernize the driver",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "7c137aade3c6d7e9f5d6f1c8e3ca35de3cedbfac",
    "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-asoc-uda1380-v1-1-f6f91be9b7f8@kernel.org/mbox/",
    "series": [
        {
            "id": 497730,
            "url": "http://patchwork.ozlabs.org/api/series/497730/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/list/?series=497730",
            "date": "2026-03-27T08:05:47",
            "name": "ASoC: uda1380: Modernize the driver",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/497730/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2216821/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2216821/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-gpio+bounces-34233-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=eTpDLsLO;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=linux-gpio+bounces-34233-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=\"eTpDLsLO\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201"
        ],
        "Received": [
            "from tor.lore.kernel.org (tor.lore.kernel.org\n [IPv6:2600:3c04:e001:36c::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 4fhtXT5Bhrz1xy1\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 27 Mar 2026 19:07:05 +1100 (AEDT)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 0EEBD301A7E5\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 27 Mar 2026 08:05:54 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id D260938839E;\n\tFri, 27 Mar 2026 08:05:52 +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 04CE13CD8DE;\n\tFri, 27 Mar 2026 08:05:51 +0000 (UTC)",
            "by smtp.kernel.org (Postfix) with ESMTPSA id 839B8C19423;\n\tFri, 27 Mar 2026 08:05:49 +0000 (UTC)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774598752; cv=none;\n b=cLB9z+0Yd5CRlH0aroMUkQ6aOkbqhXFqjLTq98AHznrjSlOlNGdnVODtb9TZ0frcNWwgKSHL2yDhcu1fMrj8zT+71k/94p1cUS96cGPYgjEu3eIFyHRIG/pC09srf7dNFEDGaNTPFGFwCr8n2pb4H4xbAOHVmMO730vajfhzb5Y=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774598752; c=relaxed/simple;\n\tbh=Bv4/Y8lJ6NAbAEPN6r/5Z3DUXsK0z/ia4RMACrqi9ZU=;\n\th=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc;\n b=dsN88Gov6RFkKcDSOdrDHov3Pf0WQmWLqGEXBcb3a4f2WZWcAdh6Lj1E1PjCPa8cjgaV8V5MqFe6ig3rgimArxtwcqLHMF1s+vXgTKc1U83ivJFfJRslE1y2tI3oQvhN1wJ+3fQmHgdnrHywAXqOm2xIRzkcLZGAnZj6JPXDPJc=",
        "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=eTpDLsLO; 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=1774598751;\n\tbh=Bv4/Y8lJ6NAbAEPN6r/5Z3DUXsK0z/ia4RMACrqi9ZU=;\n\th=From:Date:Subject:To:Cc:From;\n\tb=eTpDLsLO6Cd65yxoP3gzCMOhkjhmxEGSkuoop5OPlbLZO9y9H+CTeHiPB8oVHlyjE\n\t FuDO0yzqhcC/lamg86m45VpoyWxdrZnHgjlWbnwc/kfUMiDPfJw9eJzy7dMC8GtnZf\n\t rxfbwUhML5Wxl1bKKtm8Sx7hBbY5g2+W8a01VZ2joWLMviKdWK4jY5Dp9OOHseRqgD\n\t yEdm4og4laxBs3Qa7GRoDepx1H+71XuVIxUM3EB7ZEie6nx+1jWpZcYNzjrarY4M3R\n\t qwcDB1YHR4I0hWtY2Wz+49QPAU2I8EH6nNrBrYh1rT2z/bmTEr+NNc3Qf/2JkSnf30\n\t 8+gNLj6kgqLBA==",
        "From": "Linus Walleij <linusw@kernel.org>",
        "Date": "Fri, 27 Mar 2026 09:05:47 +0100",
        "Subject": "[PATCH] ASoC: uda1380: Modernize the driver",
        "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-asoc-uda1380-v1-1-f6f91be9b7f8@kernel.org>",
        "X-B4-Tracking": "v=1; b=H4sIAAAAAAAC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE\n vPSU3UzU4B8JSMDIzMDYyNz3cTi/GTd0pREQ2MLA13jtGQzc3NzYyMTy0QloJaCotS0zAqwcdG\n xtbUA38MAml4AAAA=",
        "X-Change-ID": "20260327-asoc-uda1380-3fc67773249a",
        "To": "Philipp Zabel <p.zabel@pengutronix.de>,\n Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,\n Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>,\n Bartosz Golaszewski <brgl@kernel.org>",
        "Cc": "linux-sound@vger.kernel.org, linux-gpio@vger.kernel.org,\n Linus Walleij <linusw@kernel.org>",
        "X-Mailer": "b4 0.14.3"
    },
    "content": "This codec driver depended on the legacy GPIO API, and nothing\nin the kernel is defining the platform data.\n\nSince there may be out of tree users, migrate to GPIO descriptors,\ndrop the platform data that is unused, and assign the dac_clk the\nvalue that was used in all platforms found in a historical dig.\n\nAdd some menuconfig so the codec can be selected and tested.\n\nSigned-off-by: Linus Walleij <linusw@kernel.org>\n---\nMaybe this driver should rather be deleted if there are no\nreal users left, but that can be done after this patch if\nso desired. This makes the driver usable on contemporary Linux.\n---\n include/sound/uda1380.h    | 19 ----------------\n sound/soc/codecs/Kconfig   |  6 +++--\n sound/soc/codecs/uda1380.c | 56 +++++++++++++++++++++++++---------------------\n 3 files changed, 34 insertions(+), 47 deletions(-)\n\n\n---\nbase-commit: 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f\nchange-id: 20260327-asoc-uda1380-3fc67773249a\n\nBest regards,",
    "diff": "diff --git a/include/sound/uda1380.h b/include/sound/uda1380.h\ndeleted file mode 100644\nindex 2e42ea2d0cfd..000000000000\n--- a/include/sound/uda1380.h\n+++ /dev/null\n@@ -1,19 +0,0 @@\n-/* SPDX-License-Identifier: GPL-2.0-only */\n-/*\n- * UDA1380 ALSA SoC Codec driver\n- *\n- * Copyright 2009 Philipp Zabel\n- */\n-\n-#ifndef __UDA1380_H\n-#define __UDA1380_H\n-\n-struct uda1380_platform_data {\n-\tint gpio_power;\n-\tint gpio_reset;\n-\tint dac_clk;\n-#define UDA1380_DAC_CLK_SYSCLK 0\n-#define UDA1380_DAC_CLK_WSPLL  1\n-};\n-\n-#endif /* __UDA1380_H */\ndiff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig\nindex adb3fb923be3..c374a50fb6e0 100644\n--- a/sound/soc/codecs/Kconfig\n+++ b/sound/soc/codecs/Kconfig\n@@ -2364,9 +2364,11 @@ config SND_SOC_UDA1342\n \t  mic inputs), stereo audio DAC, with basic audio processing.\n \n config SND_SOC_UDA1380\n-\ttristate\n+\ttristate \"Philips UDA1380 CODEC\"\n \tdepends on I2C\n-\tdepends on GPIOLIB_LEGACY\n+\thelp\n+\t  The UDA1380 codec is used in the HTC Magician and on a number of\n+\t  Samsung reference boards.\n \n config SND_SOC_WCD_CLASSH\n \ttristate\ndiff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c\nindex 9e9c540a45ca..421ae6cb7d8d 100644\n--- a/sound/soc/codecs/uda1380.c\n+++ b/sound/soc/codecs/uda1380.c\n@@ -16,7 +16,7 @@\n #include <linux/types.h>\n #include <linux/slab.h>\n #include <linux/errno.h>\n-#include <linux/gpio.h>\n+#include <linux/gpio/consumer.h>\n #include <linux/delay.h>\n #include <linux/i2c.h>\n #include <linux/workqueue.h>\n@@ -25,7 +25,9 @@\n #include <sound/initval.h>\n #include <sound/soc.h>\n #include <sound/tlv.h>\n-#include <sound/uda1380.h>\n+\n+#define UDA1380_DAC_CLK_SYSCLK 0\n+#define UDA1380_DAC_CLK_WSPLL  1\n \n #include \"uda1380.h\"\n \n@@ -36,6 +38,8 @@ struct uda1380_priv {\n \tstruct work_struct work;\n \tstruct i2c_client *i2c;\n \tu16 *reg_cache;\n+\tstruct gpio_desc *power;\n+\tstruct gpio_desc *reset;\n };\n \n /*\n@@ -150,13 +154,12 @@ static void uda1380_sync_cache(struct snd_soc_component *component)\n \n static int uda1380_reset(struct snd_soc_component *component)\n {\n-\tstruct uda1380_platform_data *pdata = component->dev->platform_data;\n \tstruct uda1380_priv *uda1380 = snd_soc_component_get_drvdata(component);\n \n-\tif (gpio_is_valid(pdata->gpio_reset)) {\n-\t\tgpio_set_value(pdata->gpio_reset, 1);\n+\tif (uda1380->reset) {\n+\t\tgpiod_set_value(uda1380->reset, 1);\n \t\tmdelay(1);\n-\t\tgpio_set_value(pdata->gpio_reset, 0);\n+\t\tgpiod_set_value(uda1380->reset, 0);\n \t} else {\n \t\tu8 data[3];\n \n@@ -589,9 +592,9 @@ static int uda1380_set_bias_level(struct snd_soc_component *component,\n \tenum snd_soc_bias_level level)\n {\n \tstruct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);\n+\tstruct uda1380_priv *uda1380 = snd_soc_component_get_drvdata(component);\n \tint pm = uda1380_read_reg_cache(component, UDA1380_PM);\n \tint reg;\n-\tstruct uda1380_platform_data *pdata = component->dev->platform_data;\n \n \tswitch (level) {\n \tcase SND_SOC_BIAS_ON:\n@@ -601,8 +604,8 @@ static int uda1380_set_bias_level(struct snd_soc_component *component,\n \t\tbreak;\n \tcase SND_SOC_BIAS_STANDBY:\n \t\tif (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_OFF) {\n-\t\t\tif (gpio_is_valid(pdata->gpio_power)) {\n-\t\t\t\tgpio_set_value(pdata->gpio_power, 1);\n+\t\t\tif (uda1380->power) {\n+\t\t\t\tgpiod_set_value(uda1380->power, 1);\n \t\t\t\tmdelay(1);\n \t\t\t\tuda1380_reset(component);\n \t\t\t}\n@@ -612,10 +615,10 @@ static int uda1380_set_bias_level(struct snd_soc_component *component,\n \t\tuda1380_write(component, UDA1380_PM, 0x0);\n \t\tbreak;\n \tcase SND_SOC_BIAS_OFF:\n-\t\tif (!gpio_is_valid(pdata->gpio_power))\n+\t\tif (!uda1380->power)\n \t\t\tbreak;\n \n-\t\tgpio_set_value(pdata->gpio_power, 0);\n+\t\tgpiod_set_value(uda1380->power, 0);\n \n \t\t/* Mark mixer regs cache dirty to sync them with\n \t\t * codec regs on power on.\n@@ -694,13 +697,12 @@ static struct snd_soc_dai_driver uda1380_dai[] = {\n \n static int uda1380_probe(struct snd_soc_component *component)\n {\n-\tstruct uda1380_platform_data *pdata =component->dev->platform_data;\n \tstruct uda1380_priv *uda1380 = snd_soc_component_get_drvdata(component);\n \tint ret;\n \n \tuda1380->component = component;\n \n-\tif (!gpio_is_valid(pdata->gpio_power)) {\n+\tif (!uda1380->power) {\n \t\tret = uda1380_reset(component);\n \t\tif (ret)\n \t\t\treturn ret;\n@@ -709,7 +711,7 @@ static int uda1380_probe(struct snd_soc_component *component)\n \tINIT_WORK(&uda1380->work, uda1380_flush_work);\n \n \t/* set clock input */\n-\tswitch (pdata->dac_clk) {\n+\tswitch (uda1380->dac_clk) {\n \tcase UDA1380_DAC_CLK_SYSCLK:\n \t\tuda1380_write_reg_cache(component, UDA1380_CLK, 0);\n \t\tbreak;\n@@ -742,6 +744,7 @@ static const struct snd_soc_component_driver soc_component_dev_uda1380 = {\n static int uda1380_i2c_probe(struct i2c_client *i2c)\n {\n \tstruct uda1380_platform_data *pdata = i2c->dev.platform_data;\n+\tstruct device *dev = &i2c->dev;\n \tstruct uda1380_priv *uda1380;\n \tint ret;\n \n@@ -753,19 +756,20 @@ static int uda1380_i2c_probe(struct i2c_client *i2c)\n \tif (uda1380 == NULL)\n \t\treturn -ENOMEM;\n \n-\tif (gpio_is_valid(pdata->gpio_reset)) {\n-\t\tret = devm_gpio_request_one(&i2c->dev, pdata->gpio_reset,\n-\t\t\tGPIOF_OUT_INIT_LOW, \"uda1380 reset\");\n-\t\tif (ret)\n-\t\t\treturn ret;\n-\t}\n+\tuda1380->reset = devm_gpiod_get_optional(dev, \"reset\", GPIOD_OUT_LOW);\n+\tif (IS_ERR(uda1380->reset))\n+\t\treturn dev_err_probe(dev, PTR_ERR(uda1380->reset),\n+\t\t\t\t     \"error obtaining reset GPIO\\n\");\n+\tgpiod_set_consumer_name(uda1380->reset, \"uda1380 reset\");\n \n-\tif (gpio_is_valid(pdata->gpio_power)) {\n-\t\tret = devm_gpio_request_one(&i2c->dev, pdata->gpio_power,\n-\t\t\tGPIOF_OUT_INIT_LOW, \"uda1380 power\");\n-\t\tif (ret)\n-\t\t\treturn ret;\n-\t}\n+\tuda1380->power = devm_gpiod_get_optional(dev, \"power\", GPIOD_OUT_LOW);\n+\tif (IS_ERR(uda1380->power))\n+\t\treturn dev_err_probe(dev, PTR_ERR(uda1380->power),\n+\t\t\t\t     \"error obtaining power GPIO\\n\");\n+\tgpiod_set_consumer_name(uda1380->power, \"uda1380 power\");\n+\n+\t/* TODO: add device properties to make WPLL selectable here */\n+\tuda1380->dac_clk = UDA1380_DAC_CLK_SYSCLK;\n \n \tuda1380->reg_cache = devm_kmemdup_array(&i2c->dev, uda1380_reg, ARRAY_SIZE(uda1380_reg),\n \t\t\t\t\t\tsizeof(uda1380_reg[0]), GFP_KERNEL);\n",
    "prefixes": []
}