Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2230085/?format=api
{ "id": 2230085, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2230085/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/patch/20260429074356.118420-3-herve.codina@bootlin.com/", "project": { "id": 42, "url": "http://patchwork.ozlabs.org/api/1.1/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": "" }, "msgid": "<20260429074356.118420-3-herve.codina@bootlin.com>", "date": "2026-04-29T07:43:38", "name": "[v2,02/17] ASoC: dt-bindings: Add support for the GPIOs driven amplifier", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "6d713668ca8cc19dec5c4f5fddac4480422bac1a", "submitter": { "id": 81983, "url": "http://patchwork.ozlabs.org/api/1.1/people/81983/?format=api", "name": "Herve Codina", "email": "herve.codina@bootlin.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-gpio/patch/20260429074356.118420-3-herve.codina@bootlin.com/mbox/", "series": [ { "id": 502009, "url": "http://patchwork.ozlabs.org/api/1.1/series/502009/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/list/?series=502009", "date": "2026-04-29T07:43:41", "name": "ASoC: Add support for GPIOs driven amplifiers", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/502009/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2230085/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2230085/checks/", "tags": {}, "headers": { "Return-Path": "\n <linux-gpio+bounces-35761-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=bootlin.com header.i=@bootlin.com header.a=rsa-sha256\n header.s=dkim header.b=fBvQl4xC;\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-35761-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com\n header.b=\"fBvQl4xC\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=185.246.84.56", "smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=bootlin.com", "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=bootlin.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 4g58Xt2mZSz1yHv\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 29 Apr 2026 17:47:42 +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 6AFFA30ABE15\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 29 Apr 2026 07:44:26 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 801463A784D;\n\tWed, 29 Apr 2026 07:44:24 +0000 (UTC)", "from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56])\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 1EEC93A6EF1;\n\tWed, 29 Apr 2026 07:44:15 +0000 (UTC)", "from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233])\n\tby smtpout-02.galae.net (Postfix) with ESMTPS id 9F9A71A347B;\n\tWed, 29 Apr 2026 07:44:14 +0000 (UTC)", "from mail.galae.net (mail.galae.net [212.83.136.155])\n\tby smtpout-01.galae.net (Postfix) with ESMTPS id 746E4601DF;\n\tWed, 29 Apr 2026 07:44:14 +0000 (UTC)", "from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon)\n with ESMTPSA id 3248010729898;\n\tWed, 29 Apr 2026 09:44:11 +0200 (CEST)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1777448664; cv=none;\n b=aoDwQQvgB8dcy5A9LqwC4tPGbu+IU+2MSFygvp4Q4OVtLHryNei00NBsEDzi9qU2sDbW1xkAuJr5iqpk0BRHjNb0eShlGndPmJLVvHKGiMAcZresw+GWBdUxIY12avIbMcdwqbsaBbW7PzD2p6Vxh6UpqnGvBDRmkDwNvLESni0=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1777448664; c=relaxed/simple;\n\tbh=p66r+zCwkOwB1S0QW0mE5+VDJePu1ZvrY2w3dA98YBY=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=oUWK3Jg3QspK5ezVUbQWpKj1N1rZMwl+lYoJSuPCoH88mHFsgkLk1+0C9WuD/067A4Ym6hnEM52xNGLtxGubdKqJZ0DtJQApB+ubs5X/BURWZaqCEBD64EaU84T7Gv6WduqF7SeFHFn2pReRUGk6eq2x7rvA8tLmBx0FIhxiUpg=", "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=bootlin.com;\n spf=pass smtp.mailfrom=bootlin.com;\n dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com\n header.b=fBvQl4xC; arc=none smtp.client-ip=185.246.84.56", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim;\n\tt=1777448653; h=from:subject:date:message-id:to:cc:mime-version:\n\t content-transfer-encoding:in-reply-to:references;\n\tbh=IxcuUJb+ByJPJw8uSLEtbL63MS3PIf1zV8Q9uCPz0+s=;\n\tb=fBvQl4xCao0eGGnMmPG2s1DuPaxy2W8fEM20BESEF93T/oo5E8tSoEmE3jZ3gbhYXk5DCP\n\tX5D56yJQMOvAbm+wQbTZFDHXGglNqq1DRQWeLjDfXodjgu8PTBMlrSVFYdlc4WwcR1jC2f\n\tzwp7o7O+Cj6d1rnQvRX3K6Hbomzi/KQcuarx8Zid8lQn8p8CPseWlU7V1GIo6bMczV3rkn\n\thBE2K6YtF5rzxMRoh1vyrw1vqlDznRdci6PR3TxjPTGWQlXva5ERKzHmERzBOVFOizPdBG\n\tWzyKSiB2YUVac0EjVjR+p17J/fh1M76Mev/T7lohOgh5H7jCadPyvYcITGZ+JQ==", "From": "Herve Codina <herve.codina@bootlin.com>", "To": "Herve Codina <herve.codina@bootlin.com>,\n\tBartosz Golaszewski <brgl@kernel.org>,\n\tLinus Walleij <linusw@kernel.org>,\n\tLiam Girdwood <lgirdwood@gmail.com>,\n\tMark Brown <broonie@kernel.org>,\n\tRob Herring <robh@kernel.org>,\n\tKrzysztof Kozlowski <krzk+dt@kernel.org>,\n\tConor Dooley <conor+dt@kernel.org>,\n\tSaravana Kannan <saravanak@kernel.org>,\n\tJaroslav Kysela <perex@perex.cz>,\n\tTakashi Iwai <tiwai@suse.com>", "Cc": "linux-sound@vger.kernel.org,\n\tlinux-gpio@vger.kernel.org,\n\tdevicetree@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org,\n\tChristophe Leroy <christophe.leroy@csgroup.eu>,\n\tThomas Petazzoni <thomas.petazzoni@bootlin.com>", "Subject": "[PATCH v2 02/17] ASoC: dt-bindings: Add support for the GPIOs driven\n amplifier", "Date": "Wed, 29 Apr 2026 09:43:38 +0200", "Message-ID": "<20260429074356.118420-3-herve.codina@bootlin.com>", "X-Mailer": "git-send-email 2.53.0", "In-Reply-To": "<20260429074356.118420-1-herve.codina@bootlin.com>", "References": "<20260429074356.118420-1-herve.codina@bootlin.com>", "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", "X-Last-TLS-Session-Version": "TLSv1.3" }, "content": "Some amplifiers based on analog switches and op-amps can be present in\nthe audio path and can be driven by GPIOs in order to control their gain\nvalue, their mute and/or bypass functions.\n\nThose components needs to be viewed as audio components in order to be\nfully integrated in the audio path.\n\ngpio-audio-amp allows to consider these GPIO driven amplifiers as\nauxiliary audio devices.\n\nSigned-off-by: Herve Codina <herve.codina@bootlin.com>\n---\n .../bindings/sound/gpio-audio-amp.yaml | 270 ++++++++++++++++++\n 1 file changed, 270 insertions(+)\n create mode 100644 Documentation/devicetree/bindings/sound/gpio-audio-amp.yaml", "diff": "diff --git a/Documentation/devicetree/bindings/sound/gpio-audio-amp.yaml b/Documentation/devicetree/bindings/sound/gpio-audio-amp.yaml\nnew file mode 100644\nindex 000000000000..46f99cdd2a97\n--- /dev/null\n+++ b/Documentation/devicetree/bindings/sound/gpio-audio-amp.yaml\n@@ -0,0 +1,270 @@\n+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)\n+%YAML 1.2\n+---\n+$id: http://devicetree.org/schemas/sound/gpio-audio-amp.yaml#\n+$schema: http://devicetree.org/meta-schemas/core.yaml#\n+\n+title: Audio amplifier driven by GPIOs\n+\n+maintainers:\n+ - Herve Codina <herve.codina@bootlin.com>\n+\n+description: |\n+ Audio GPIO amplifiers are driven by GPIO in order to control the gain value\n+ of the amplifier, its mute function and/or its bypass function.\n+\n+ Those amplifiers are based on discrete components (analog switches, op-amps\n+ and more) where some of them, mostly analog switches, are controlled by GPIOs\n+ to adjust the gain value of the whole amplifier and/or to control\n+ the mute and/or bypass function.\n+\n+ For instance, the following piece of hardware is a GPIO amplifier\n+\n+ +5VA\n+ ^\n+ |\\ |\n+ | \\\n+ Vin >---------------------------|+ \\\n+ | +-------+-----> Vout\n+ .--\\/\\/\\/--+------------|- / |\n+ | | | / |\n+ v | |/ | |\n+ GND o v |\n+ \\ GND |\n+ gpio >-----------> \\ |\n+ o o |\n+ | | |\n+ | '--\\/\\/\\/--. |\n+ | +--\\/\\/\\/--'\n+ '---------------'\n+\n+properties:\n+ compatible:\n+ oneOf:\n+ - const: gpio-audio-amp-mono\n+ description:\n+ A single channel amplifier. All features apply to this sole channel.\n+\n+ - const: gpio-audio-amp-stereo\n+ description:\n+ A dual channel amplifier (left and rignt). All features apply to both\n+ channels producing the same effect on both channels at the same time.\n+\n+ vdd-supply:\n+ description: Main power supply of the amplifier\n+\n+ vddio-supply:\n+ description: Power supply related to the control path\n+\n+ vdda1-supply:\n+ description: Analog power supply\n+\n+ vdda2-supply:\n+ description: Additional analog power supply\n+\n+ mute-gpios:\n+ description: GPIO to control the mute function\n+ maxItems: 1\n+\n+ bypass-gpios:\n+ description: GPIO to control the bypass function\n+ maxItems: 1\n+\n+ gain-gpios:\n+ description: |\n+ GPIOs to control the amplifier gain\n+\n+ The gain value is computed from GPIOs value from 0 to 2^N-1 with N the\n+ number of GPIO described. The first GPIO described is the lsb of the gain\n+ value.\n+\n+ For instance assuming 2 gpios\n+ gain-gpios = <&gpio1 GPIO_ACTIVE_HIGH> <&gpio2 GPIO_ACTIVE_HIGH>;\n+ The gain value will be the following:\n+\n+ gpio1 | gpio2 | gain\n+ ------+-------+-----\n+ 0 | 0 | 0b00 -> 0\n+ 1 | 0 | 0b01 -> 1\n+ 0 | 1 | 0b10 -> 2\n+ 1 | 1 | 0b11 -> 3\n+ ------+-------+-----\n+\n+ Note: The gain value, bits set to 1 or 0, indicate the state active (bit\n+ set) or the state inactive (bit unset) of the related GPIO. The\n+ physical voltage corresponding to this active/inactive state is\n+ given by the GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW flags.\n+\n+ minItems: 1\n+ maxItems: 16\n+\n+ gain-ranges:\n+ $ref: /schemas/types.yaml#/definitions/uint32-matrix\n+ description: |\n+ A list of one or more ranges of possible values. Each range is defined by\n+ the first and last point in the range. Each point is defined by the pair\n+ (GPIOs value, Gain in 0.01 dB unit).\n+\n+ Ranges can be contiguous or holes can be present between ranges if some\n+ gpios value should not be used. Also in a range the first point and the\n+ last point can be identical. In that case, the range contains only one\n+ item, the given point.\n+\n+ items:\n+ items:\n+ - description: GPIOs value of the first point in the range\n+ - description: Gain in 0.01 dB unit of the first point in the range\n+ - description: GPIOs value of the last point in the range\n+ - description: Gain in 0.01 dB unit of the last point in the range\n+ description: |\n+ A range defines a linear function (linear in dB) from the first point\n+ to the last point, both included. The number of items in the range is\n+ N = abs(first_point.gpio_value - last_point.gpio_value) + 1\n+\n+ It allows to define the gain range from the first_point.gain to\n+ the last_point.gain, both points included.\n+\n+ Gain (0.01 dB unit)\n+ ^\n+ | last\n+ +- - - - - - - - - - + point\n+ | + .\n+ | + .\n+ | + .\n+ +- - - - + .\n+ | first . .\n+ | point . .\n+ | . .\n+ +--------+-----------+---> gpios\n+ value\n+\n+ Note: Even if first_point.gpio_value is lower than last_point.gpio_value\n+ and first_point.gain is lower than last_point.gain in the above\n+ graphic, all combination of values are supported leading to an\n+ increasing or a decreasing linear segment.\n+\n+ minItems: 1\n+ maxItems: 65536\n+\n+ gain-labels:\n+ $ref: /schemas/types.yaml#/definitions/string-array\n+ minItems: 2\n+ maxItems: 65536\n+ description: |\n+ List of the gain labels attached to the combination of GPIOs controlling\n+ the gain. The first label is related to the gain value 0, the second label\n+ is related to the gain value 1 and so on.\n+\n+ With 2 GPIOs controlling the gain, GPIOs value can be 0, 1, 2 and 3.\n+ Assuming that gain value set the hardware according to the following\n+ table:\n+\n+ GPIOs | Hardware\n+ value | amplification\n+ ------+--------------\n+ 0 | Low\n+ 1 | Middle\n+ 2 | High\n+ 3 | Max\n+ ------+--------------\n+\n+ The description using gain labels can be:\n+ gain-labels = \"Low\", \"Middle\", \"High\", \"Max\";\n+\n+dependencies:\n+ gain-ranges: [ gain-gpios ]\n+ gain-labels: [ gain-gpios ]\n+\n+required:\n+ - compatible\n+ - vdd-supply\n+\n+anyOf:\n+ - required:\n+ - gain-gpios\n+ - required:\n+ - mute-gpios\n+ - required:\n+ - bypass-gpios\n+\n+allOf:\n+ - $ref: component-common.yaml#\n+ - if:\n+ required:\n+ - gain-ranges\n+ then:\n+ properties:\n+ gain-labels: false\n+ - if:\n+ required:\n+ - gain-labels\n+ then:\n+ properties:\n+ gain-ranges: false\n+\n+unevaluatedProperties: false\n+\n+examples:\n+ - |\n+ #include <dt-bindings/gpio/gpio.h>\n+\n+ /* Gain controlled by gpios */\n+ amplifier-0 {\n+ compatible = \"gpio-audio-amp-mono\";\n+ vdd-supply = <®ulator>;\n+ gain-gpios = <&gpio 0 GPIO_ACTIVE_HIGH>, <&gpio 1 GPIO_ACTIVE_HIGH>;\n+ };\n+\n+ /* Gain controlled by gpio using a simple range on a stereo amplifier */\n+ amplifier-1 {\n+ compatible = \"gpio-audio-amp-stereo\";\n+ vdd-supply = <®ulator>;\n+ gain-gpios = <&gpio 0 GPIO_ACTIVE_HIGH>, <&gpio 1 GPIO_ACTIVE_HIGH>;\n+ gain-ranges = <0 (-300) 3 600>;\n+ };\n+\n+ /* Gain controlled by gpio with labels */\n+ amplifier-3 {\n+ compatible = \"gpio-audio-amp-mono\";\n+ vdd-supply = <®ulator>;\n+ gain-gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;\n+ gain-labels = \"Low\", \"High\";\n+ };\n+\n+ /* A mutable stereo amplifier without any gain control */\n+ amplifier-4 {\n+ compatible = \"gpio-audio-amp-stereo\";\n+ vdd-supply = <®ulator>;\n+ mute-gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;\n+ };\n+\n+ /*\n+ * Several supplies, gain controlled using more complex ranges, mute and\n+ * bypass.\n+ *\n+ * Assuming 3 gpios for controlling the gain with the following table\n+ * gpios value Gain\n+ * 0b000 Do not use (gpios value not allowed)\n+ * 0b001 - 3dB\n+ * 0b010 + 3dB\n+ * 0b011 + 10dB\n+ * 0b100 Do not use (gpios value not allowed)\n+ * 0b101 + 6dB\n+ * 0b110 + 7dB\n+ * 0b111 + 8dB\n+ */\n+ amplifier-5 {\n+ compatible = \"gpio-audio-amp-mono\";\n+ vdd-supply = <®ulator>;\n+ vddio-supply = <®ulator1>;\n+ vdda1-supply = <®ulator2>;\n+ gain-gpios = <&gpio 0 GPIO_ACTIVE_HIGH>,\n+ <&gpio 1 GPIO_ACTIVE_HIGH>,\n+ <&gpio 2 GPIO_ACTIVE_HIGH>;\n+ gain-ranges = <1 (-300) 2 300>,\n+ <3 1000 3 1000>,\n+ <5 600 7 800>;\n+ mute-gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;\n+ bypass-gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;\n+ };\n+...\n", "prefixes": [ "v2", "02/17" ] }