Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp4205378ybl; Tue, 20 Aug 2019 08:26:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqydN/U3AnLGkC3s5loX7jObfApYhbNHG/+MI1JgkttAPSuKPsVZUsLgHfU7SDZW26F+Iser X-Received: by 2002:a63:e948:: with SMTP id q8mr24509151pgj.93.1566314817793; Tue, 20 Aug 2019 08:26:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566314817; cv=none; d=google.com; s=arc-20160816; b=w6X1iJrSOv5BhEW5L9IWBJkahe6SNpg2XoVTmPZYITuEkIG36E/kQiar6m/WuYu8Pb Uh+iWVgY/NT+KOzIppX38jveiuAMXpbc303FA6JvqO0y1Aa2EefD6jMtze/wCFMTdpJm mpi0pX5L7QzK6bSRCSqpkqKqkp/uMBrpYf86PsLPWLiI47PjbN9BWKBohxJ+WAaQqZS+ W7N9mfJj8xdfWP2SIvwxd++N4M0XQMQwdCIxEFph6FkIFYz0dIeSgHw8G43u0Nga40AC BViJGi0CXpSDaPvnHVhgJP+5l5HVJo5t9LygOtb5Ag4MqC+e3Wh/K09LsKSS9INe0BS9 Xvsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Q4b0B85va7Yq7z9hwv+GdVy+6rw6sv5lzBQ36/KIu00=; b=StrNTUniF9qdeg3swg3g8HwTvvCYH7iwL/XdI4HwFoqqdpznuFwuHXEU4LG7ZgtVne 9Ybq9S9wl+wOXU95K4HCCcMiu6gOztbAQZV+1Wb6SQ9DIOgYIJH2WbPXpuAvsXHwws7U xIIShWf9HqrEgGt/0fNq4SX17HbNB9IsZfm2SJ3ZDOO65l3jvCPV0C/kBNUltEiP7HX6 VcnRpIyskt3yrVBpxmDl0Sy7YFuNkWjFnZVGEeAhIPUHljEGnhIzenGmaXMdvoNGojKI AT8YecCkEtliLBnUDDu62gDc3mOO+/cCtJ+yYuufw+/llTL4N90E/KDdVaZVKQEHZUca nI5Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t190si12281800pgd.465.2019.08.20.08.26.41; Tue, 20 Aug 2019 08:26:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730020AbfHTPZa (ORCPT + 99 others); Tue, 20 Aug 2019 11:25:30 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:46167 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727304AbfHTPZa (ORCPT ); Tue, 20 Aug 2019 11:25:30 -0400 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=20Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Rob Herring , Mark Rutland Cc: kernel@pengutronix.de, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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>, + }; +... -- 2.20.1