From patchwork Tue Aug 20 15:25:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 11104067 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 125E61395 for ; Tue, 20 Aug 2019 15:25:37 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E44CB206BB for ; Tue, 20 Aug 2019 15:25:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="KcpYBcXz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E44CB206BB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=LIlRKq+TduvnIHxXpNe8+iuwxC+lL4jgE/9Q+OCM7WA=; b=KcpYBcXzdl1DQD e+DclvYgzPrs4zWc330o8BXDM//p4b5GYdL3pgdTdADL/U3gtl8Oezf8PqZBZGunXXyNAT1iKpWg9 3Ri0hvsVzo8GcPDMyxcJNH8+hwo73OWpowemWJuGz9BdknymNwLCYgjvloubLCnMYJd8og6I2Posr phAXMHOk06sWfUNdoYIC6J+chrCt3lRs8EeMJM+Jgek9aGa+BZgMXVGrJqakorWkj7z+Vz31dafFW mT1iHLebsvJrdc8kw9Pcfyo4NWsr+ib4GgNyWxYGdZCEilRu1SJBU/OG1KSGL9jHHlbMus/GOd8dz rCidbwl0cpasZz7Tasmw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i060u-0004xw-GX; Tue, 20 Aug 2019 15:25:36 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i060q-0004wx-T0 for linux-arm-kernel@lists.infradead.org; Tue, 20 Aug 2019 15:25:34 +0000 Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1i060j-00088F-U1; Tue, 20 Aug 2019 17:25:25 +0200 Received: from ukl by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1i060b-0000UV-79; Tue, 20 Aug 2019 17:25:17 +0200 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Rob Herring , Mark Rutland Subject: [PATCH RFC] dt-bindings: regulator: define a mux regulator Date: Tue, 20 Aug 2019 17:25:11 +0200 Message-Id: <20190820152511.15307-1-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190820_082532_930927_2D8C2DF4 X-CRM114-Status: GOOD ( 14.55 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org A mux regulator is used to provide current on one of several outputs. It might look as follows: ,------------. --; we still needed something to implement compatibility to the currently defined bindings. Signed-off-by: Uwe Kleine-König --- Hello, the obvious alternative is to add (here) eight subnodes to represent the eight outputs. This is IMHO less pretty, but wouldn't need to introduce #regulator-cells. Apart from reg = <..> and a phandle there is (I think) nothing that needs to be specified in the subnodes because all properties of an output (apart from the address) apply to all outputs. What do you think? Best regards Uwe .../bindings/regulator/mux-regulator.yaml | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/mux-regulator.yaml diff --git a/Documentation/devicetree/bindings/regulator/mux-regulator.yaml b/Documentation/devicetree/bindings/regulator/mux-regulator.yaml new file mode 100644 index 000000000000..f06dbb969090 --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/mux-regulator.yaml @@ -0,0 +1,52 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/mux-regulator.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MUX regulators + +properties: + compatible: + const: XXX,adb708 + + enable-gpios: + maxItems: 1 + + address-gpios: + description: Array of typically three GPIO pins used to select the + regulator's output. The least significant address GPIO must be listed + first. The others follow in order of significance. + minItems: 1 + + "#regulator-cells": + const: 1 + + regulator-name: + description: A string used to construct the sub regulator's names + $ref: "/schemas/types.yaml#/definitions/string" + + supply: + description: input supply + +required: + - compatible + - regulator-name + - supply + + +examples: + - | + mux-regulator { + compatible = "regulator-mux"; + + regulator-name = "blafasel"; + + supply = <&muxin_regulator>; + + enable-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>; + address-gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>, + <&gpio2 3 GPIO_ACTIVE_HIGH>, + <&gpio2 4 GPIO_ACTIVE_HIGH>, + }; +...