Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp727536ybm; Thu, 28 May 2020 13:36:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzvJI9FoGFRuz8dfnxgDRNtfQx7dZ8GfMpSoU0PXGwfzhJwgwdosMZIfZR3wGXYU6h1HTf X-Received: by 2002:a17:906:7c5a:: with SMTP id g26mr4190872ejp.200.1590698188763; Thu, 28 May 2020 13:36:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590698188; cv=none; d=google.com; s=arc-20160816; b=JWbU9wdOG03bFXVDIqxoTQvqA8r3a9xO+QPbmLT4ghDzYjG90qJsJWvXhIRrioLory aC/C7LLoqeb3mI4um3Bcjlsr9R/n7L6VTeT319h6hobZtcrHe2dfd1QkuSq8VeSc1iA3 0iRlA2YG6xbunae33Xz+Y+WQAGp19pY0PaEJIhq1nRydRFvbdWwBVxkOgXPlvXZltS6e lYCJ9H3UDx4HqwYHUyjWmhHVVHExGfbKIieZrBe/F//xDk+0qatjhXswLBPKH/ULTfho ByZ2bJmYXvIHBniabcAd/NSoqE9PzncXt29xlfNBgVUSzm6sgATOPRoRWFCYmjaDLVkp J4ZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=vdh9srAwYXFtjIshEOcBhDQcTxqtKhCVIrHTMTzmp34=; b=hIadYomJa40kZP4hjif0M6NVDm8BvYZoIoJCeJmcRvXu9YvJEQmwZeTAI2xB+CCGLu g3c3xqKaDkpBI/DWCMlfRc5uTgKMZAEOse7uftnZf4asOZuEpMU2/YSkddoLO31jmLh6 OUKUdBYdD+xu7eG0GA8G95kl/kY2XMMFj20+wDc7ZGX5lAS1z1s4481EVftcyFpM4rZB xsg0gj7WB6q83vEBmL/AkN/FadoeO3r5Adca7HQu2X/OE4yTkbJ0ktLlKyAqmHvN76NM ihjhdZQtNmg/j6VRAxJgv1zOjHazKMbNHz2GmBO+I/tLpOzBWGMSrFk7MEIsdFnb7sOt sLHQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l13si3748627ejx.63.2020.05.28.13.36.06; Thu, 28 May 2020 13:36:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407254AbgE1UcE (ORCPT + 99 others); Thu, 28 May 2020 16:32:04 -0400 Received: from mail-io1-f65.google.com ([209.85.166.65]:41040 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2407092AbgE1UcB (ORCPT ); Thu, 28 May 2020 16:32:01 -0400 Received: by mail-io1-f65.google.com with SMTP id o5so31590125iow.8; Thu, 28 May 2020 13:32:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=vdh9srAwYXFtjIshEOcBhDQcTxqtKhCVIrHTMTzmp34=; b=BMOo0BWEFwkORKcII7uLpB4Q7zENRtCqiTG1bLVQL4BbVgC5k6fTEx/h71CyerR7LD rr0G17AkZytoR3Ol1pNt6iiMoZ+Ei49I2Fal8z+vytqLGT/J4TMO9UteB7MMeAOCRzSZ TT4h7aVnZZ0WjsEqSDec5xxWnewtvOI0enqs56r4GScfSYCaXpkNFfZLDhUE71JYXnQg 7yF8BXHjkG89GtUHKwwH43LNcX0FVIAUr9En4PWEl66Scw5HYMomIkLhY0dBOUtNeUNZ KerV9tMfN7f9L/k121RfVwAtJEfANQknM71kBQrGchlWe1Fq11dKxko4lvIBh+PdM5p7 cBKg== X-Gm-Message-State: AOAM531zQf0WU3kzSdcTWcf7Hhv01BGpXxVbEyrV8coWawpgtU96JvWT BE4sL8u0uEFED0CFjvHG+A== X-Received: by 2002:a05:6638:262:: with SMTP id x2mr4397106jaq.10.1590697919893; Thu, 28 May 2020 13:31:59 -0700 (PDT) Received: from xps15 ([64.188.179.252]) by smtp.gmail.com with ESMTPSA id j17sm3592551ilq.79.2020.05.28.13.31.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 May 2020 13:31:59 -0700 (PDT) Received: (nullmailer pid 628195 invoked by uid 1000); Thu, 28 May 2020 20:31:58 -0000 Date: Thu, 28 May 2020 14:31:58 -0600 From: Rob Herring To: Anson Huang Cc: lgirdwood@gmail.com, broonie@kernel.org, paul.liu@linaro.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Linux-imx@nxp.com Subject: Re: [PATCH] dt-bindings: regulator: Convert anatop regulator to json-schema Message-ID: <20200528203158.GA624130@bogus> References: <1589788505-18024-1-git-send-email-Anson.Huang@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1589788505-18024-1-git-send-email-Anson.Huang@nxp.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 18, 2020 at 03:55:05PM +0800, Anson Huang wrote: > Convert the anatop regulator binding to DT schema format using json-schema. > > Signed-off-by: Anson Huang > --- > .../bindings/regulator/anatop-regulator.txt | 40 --------- > .../bindings/regulator/anatop-regulator.yaml | 94 ++++++++++++++++++++++ > 2 files changed, 94 insertions(+), 40 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/regulator/anatop-regulator.txt > create mode 100644 Documentation/devicetree/bindings/regulator/anatop-regulator.yaml > > diff --git a/Documentation/devicetree/bindings/regulator/anatop-regulator.txt b/Documentation/devicetree/bindings/regulator/anatop-regulator.txt > deleted file mode 100644 > index a3106c7..0000000 > --- a/Documentation/devicetree/bindings/regulator/anatop-regulator.txt > +++ /dev/null > @@ -1,40 +0,0 @@ > -Anatop Voltage regulators > - > -Required properties: > -- compatible: Must be "fsl,anatop-regulator" > -- regulator-name: A string used as a descriptive name for regulator outputs > -- anatop-reg-offset: Anatop MFD register offset > -- anatop-vol-bit-shift: Bit shift for the register > -- anatop-vol-bit-width: Number of bits used in the register > -- anatop-min-bit-val: Minimum value of this register > -- anatop-min-voltage: Minimum voltage of this regulator > -- anatop-max-voltage: Maximum voltage of this regulator > - > -Optional properties: > -- anatop-delay-reg-offset: Anatop MFD step time register offset > -- anatop-delay-bit-shift: Bit shift for the step time register > -- anatop-delay-bit-width: Number of bits used in the step time register > -- vin-supply: The supply for this regulator > -- anatop-enable-bit: Regulator enable bit offset > - > -Any property defined as part of the core regulator > -binding, defined in regulator.txt, can also be used. > - > -Example: > - > - regulator-vddpu { > - compatible = "fsl,anatop-regulator"; > - regulator-name = "vddpu"; > - regulator-min-microvolt = <725000>; > - regulator-max-microvolt = <1300000>; > - regulator-always-on; > - anatop-reg-offset = <0x140>; > - anatop-vol-bit-shift = <9>; > - anatop-vol-bit-width = <5>; > - anatop-delay-reg-offset = <0x170>; > - anatop-delay-bit-shift = <24>; > - anatop-delay-bit-width = <2>; > - anatop-min-bit-val = <1>; > - anatop-min-voltage = <725000>; > - anatop-max-voltage = <1300000>; > - }; > diff --git a/Documentation/devicetree/bindings/regulator/anatop-regulator.yaml b/Documentation/devicetree/bindings/regulator/anatop-regulator.yaml > new file mode 100644 > index 0000000..a8c9dd0 > --- /dev/null > +++ b/Documentation/devicetree/bindings/regulator/anatop-regulator.yaml > @@ -0,0 +1,94 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/regulator/anatop-regulator.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Freescale Anatop Voltage Regulators > + > +maintainers: > + - Ying-Chun Liu (PaulLiu) > + > +allOf: > + - $ref: "regulator.yaml#" > + > +properties: > + compatible: > + const: fsl,anatop-regulator > + > + regulator-name: > + $ref: '/schemas/types.yaml#/definitions/string' > + description: string used as a descriptive name for regulator outputs Standard property, right? It already has a definition. > + > + anatop-reg-offset: > + $ref: '/schemas/types.yaml#/definitions/uint32' > + description: u32 value representing the anatop MFD register offset. > + > + anatop-vol-bit-shift: > + $ref: '/schemas/types.yaml#/definitions/uint32' > + description: u32 value representing the bit shift for the register. > + > + anatop-vol-bit-width: > + $ref: '/schemas/types.yaml#/definitions/uint32' > + description: u32 value representing the number of bits used in the register. > + > + anatop-min-bit-val: > + $ref: '/schemas/types.yaml#/definitions/uint32' > + description: u32 value representing the minimum value of this register. > + > + anatop-min-voltage: > + $ref: '/schemas/types.yaml#/definitions/uint32' > + description: u32 value representing the minimum voltage of this regulator. > + > + anatop-max-voltage: > + $ref: '/schemas/types.yaml#/definitions/uint32' > + description: u32 value representing the maximum voltage of this regulator. > + > + anatop-delay-reg-offset: > + $ref: '/schemas/types.yaml#/definitions/uint32' > + description: u32 value representing the anatop MFD step time register offset. > + > + anatop-delay-bit-shift: > + $ref: '/schemas/types.yaml#/definitions/uint32' > + description: u32 value representing the bit shift for the step time register. > + > + anatop-delay-bit-width: > + $ref: '/schemas/types.yaml#/definitions/uint32' > + description: u32 value representing the number of bits used in the step time register. > + > + anatop-enable-bit: > + $ref: '/schemas/types.yaml#/definitions/uint32' > + description: u32 value representing regulator enable bit offset. > + > + vin-supply: > + $ref: '/schemas/types.yaml#/definitions/phandle' > + description: input supply phandle. > + > +required: > + - compatible > + - regulator-name > + - anatop-reg-offset > + - anatop-vol-bit-shift > + - anatop-vol-bit-width > + - anatop-min-bit-val > + - anatop-min-voltage > + - anatop-max-voltage Add here: unevaluatedProperties: false > + > +examples: > + - | > + regulator-vddpu { > + compatible = "fsl,anatop-regulator"; > + regulator-name = "vddpu"; > + regulator-min-microvolt = <725000>; > + regulator-max-microvolt = <1300000>; > + regulator-always-on; > + anatop-reg-offset = <0x140>; > + anatop-vol-bit-shift = <9>; > + anatop-vol-bit-width = <5>; > + anatop-delay-reg-offset = <0x170>; > + anatop-delay-bit-shift = <24>; > + anatop-delay-bit-width = <2>; > + anatop-min-bit-val = <1>; > + anatop-min-voltage = <725000>; > + anatop-max-voltage = <1300000>; > + }; > -- > 2.7.4 >