Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1285582ybg; Fri, 18 Oct 2019 15:13:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqyVkww0okA24JntBzZW2FqZ5t+BF5V+4HHaHqSXPPjyLEGQX/j0maYtGqJcipRwfXX2UKdg X-Received: by 2002:a17:906:b7d0:: with SMTP id fy16mr11122498ejb.207.1571436839408; Fri, 18 Oct 2019 15:13:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571436839; cv=none; d=google.com; s=arc-20160816; b=pEYLM9KCqFDiWuoAVpHX5GxRgrUA0wL1BPWn1rt8NHujY5wkeFPAF7up/l+0db0lJy lnbnSZA6ZxbyZx+I3raHQ56S50giS35LzPXyI616x5q8jkAYTTBoxBu8rRzFTYOtQomV +4VroDSNqcHWP25gUsK/rVRaoFhcxY0BHO7+yjA7qhhp0ijDXtrkPaYIuU5u7hQx+3Wo be1xFfnCLrPP4ITUUkgzR+VhUuhSGvEgkkhSoYP8wsI3ERcg+JebrHMCOkyBs072WNP0 kWkFu0R86eio2eap3YclrkXatyHPUtHherbHG5JagIqrRxdq5M+Vk6rQIC2qDYJIPd2H gdYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=OnxgCaPx91Saoqy8npEJzvJj20RILVf3jGePsqx/d+Y=; b=OHc9QtqOua1KDsB9G1FwRluIO0Wzb6ov6fLEKibsjUrHLn+FCrSvY02wjU13plQf/T ZkY8kABmhvpd9dmN1M3zxiYvrh8QU1OHcuHb08Ooet7HS4vESfyXXwBmcl5xj+OfqZ1o 4/G/2b8HbT6iao/GBwTsV+OzsYakE9ZO1x0AvZnOYa8FObMqiUYF+1wJPCr0/xhcpTjq gwK13Ut8fKtgKHmL/hakgNgNpJasGCgsZXa4nRj9G2wn55kukTP3uKDKBAUExuQ+T32G Lbt3Hp1D5ePF6p/hFXO2Jb0p9mfpLHaM5PqVC0zYT8g6XjMlK/yhFvETj933luy3HJp4 bcZw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l12si5850484edk.444.2019.10.18.15.13.36; Fri, 18 Oct 2019 15:13:59 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404375AbfJQSbK (ORCPT + 99 others); Thu, 17 Oct 2019 14:31:10 -0400 Received: from mail-ot1-f68.google.com ([209.85.210.68]:38160 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731227AbfJQSbJ (ORCPT ); Thu, 17 Oct 2019 14:31:09 -0400 Received: by mail-ot1-f68.google.com with SMTP id e11so2764206otl.5; Thu, 17 Oct 2019 11:31:08 -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:user-agent; bh=OnxgCaPx91Saoqy8npEJzvJj20RILVf3jGePsqx/d+Y=; b=axB+eSX3ohxhK8SK+y0s66fYpluc3IXt3xtes8L0Q8x+n/R9ljjy10vtYr4T8+iwos CDLd5mzkv/m/G7O9zvQw4+FxwKLCOhpSvF8376VBBs/DiEn1EIwWLg0XcYijEnB0Vhsz ArCFfrhzybk7uXc9rIBD/dLaN1qqGAHmkR0Xf1fZcBEL01oDGxaa50nLTFlhktaPyG1j 0ltHm0sk4gfnY2rdek3tutzuZwwT5iN8ImYX7l+Mb92FVxa6bsRWm+58bfqdkc1E0zvL eGK9Vp2aVsQi1OEYdmj0wmMALds9HDX8XzsWuFm5RSZj343tDP7Jq5CP7HIpwNwyClye LM4w== X-Gm-Message-State: APjAAAVJOoKF2q8VOwjBO/qMvT4FveyDg3NN6Arm3wyIdj3vgeoGq7OP uNpmeobodXFok2S3symwyg== X-Received: by 2002:a9d:7398:: with SMTP id j24mr4392143otk.287.1571337068346; Thu, 17 Oct 2019 11:31:08 -0700 (PDT) Received: from localhost (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id y137sm718064oie.53.2019.10.17.11.31.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Oct 2019 11:31:07 -0700 (PDT) Date: Thu, 17 Oct 2019 13:31:06 -0500 From: Rob Herring To: Bartosz Golaszewski Cc: Mark Rutland , Dmitry Torokhov , Jacek Anaszewski , Pavel Machek , Dan Murphy , Lee Jones , Sebastian Reichel , Liam Girdwood , Mark Brown , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org, linux-pm@vger.kernel.org, Bartosz Golaszewski Subject: Re: [PATCH v3 1/6] dt-bindings: mfd: max77650: convert the binding document to yaml Message-ID: <20191017183106.GA11667@bogus> References: <20191017071234.8719-1-brgl@bgdev.pl> <20191017071234.8719-2-brgl@bgdev.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191017071234.8719-2-brgl@bgdev.pl> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 17, 2019 at 09:12:29AM +0200, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > Convert the binding document for MAX77650 core MFD module to YAML. > > Signed-off-by: Bartosz Golaszewski > --- > .../devicetree/bindings/mfd/max77650.txt | 46 ------ > .../devicetree/bindings/mfd/max77650.yaml | 151 ++++++++++++++++++ > 2 files changed, 151 insertions(+), 46 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/mfd/max77650.txt > create mode 100644 Documentation/devicetree/bindings/mfd/max77650.yaml > > diff --git a/Documentation/devicetree/bindings/mfd/max77650.txt b/Documentation/devicetree/bindings/mfd/max77650.txt > deleted file mode 100644 > index b529d8d19335..000000000000 > --- a/Documentation/devicetree/bindings/mfd/max77650.txt > +++ /dev/null > @@ -1,46 +0,0 @@ > -MAX77650 ultra low-power PMIC from Maxim Integrated. > - > -Required properties: > -------------------- > -- compatible: Must be "maxim,max77650" > -- reg: I2C device address. > -- interrupts: The interrupt on the parent the controller is > - connected to. > -- interrupt-controller: Marks the device node as an interrupt controller. > -- #interrupt-cells: Must be <2>. > - > -- gpio-controller: Marks the device node as a gpio controller. > -- #gpio-cells: Must be <2>. The first cell is the pin number and > - the second cell is used to specify the gpio active > - state. > - > -Optional properties: > --------------------- > -gpio-line-names: Single string containing the name of the GPIO line. > - > -The GPIO-controller module is represented as part of the top-level PMIC > -node. The device exposes a single GPIO line. > - > -For device-tree bindings of other sub-modules (regulator, power supply, > -LEDs and onkey) refer to the binding documents under the respective > -sub-system directories. > - > -For more details on GPIO bindings, please refer to the generic GPIO DT > -binding document . > - > -Example: > --------- > - > - pmic@48 { > - compatible = "maxim,max77650"; > - reg = <0x48>; > - > - interrupt-controller; > - interrupt-parent = <&gpio2>; > - #interrupt-cells = <2>; > - interrupts = <3 IRQ_TYPE_LEVEL_LOW>; > - > - gpio-controller; > - #gpio-cells = <2>; > - gpio-line-names = "max77650-charger"; > - }; > diff --git a/Documentation/devicetree/bindings/mfd/max77650.yaml b/Documentation/devicetree/bindings/mfd/max77650.yaml > new file mode 100644 > index 000000000000..66a447e1cf56 > --- /dev/null > +++ b/Documentation/devicetree/bindings/mfd/max77650.yaml > @@ -0,0 +1,151 @@ > +# SPDX-License-Identifier: GPL-2.0 > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/mfd/max77650.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: MAX77650 ultra low-power PMIC from Maxim Integrated. > + > +maintainers: > + - Bartosz Golaszewski > + > +description: | > + This document describes the DT properties of the core MFD controller. So does every file in this directory. Describe what this chip is. > + > + The GPIO-controller module is represented as part of the top-level PMIC > + node. The device exposes a single GPIO line. > + > + For device-tree bindings of other sub-modules (regulator, power supply, > + LEDs and onkey) refer to the binding documents under the respective > + sub-system directories. > + > + For more details on GPIO bindings, please refer to the generic GPIO DT > + binding document . Also fairly useless and another reference to maintain... > + > +properties: > + compatible: > + const: maxim,max77650 > + > + reg: > + description: > + I2C device address. > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + interrupt-controller: true > + > + "#interrupt-cells": > + const: 2 > + description: > + The first cell is the IRQ number, the second cell is the trigger type. > + > + gpio-controller: true > + > + "#gpio-cells": > + const: 2 > + description: > + The first cell is the pin number and the second cell is used to specify > + the gpio active state. > + > + gpio-line-names: > + maxItems: 1 > + description: > + Single string containing the name of the GPIO line. > + > + regulators: > + $ref: ../regulator/max77650-regulator.yaml Not bisectable... This patch needs to come last. > + > + charger: > + $ref: ../power/supply/max77650-charger.yaml > + > + leds: > + $ref: ../leds/leds-max77650.yaml > + > + onkey: > + $ref: ../input/max77650-onkey.yaml > + > +required: > + - compatible > + - reg > + - interrupts > + - interrupt-controller > + - "#interrupt-cells" > + - gpio-controller > + - "#gpio-cells" None of the child nodes are required? > + > +examples: > + - | > + #include > + #include > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + > + pmic@48 { > + compatible = "maxim,max77650"; > + reg = <0x48>; > + > + interrupt-controller; > + interrupt-parent = <&gpio2>; > + #interrupt-cells = <2>; > + interrupts = <3 IRQ_TYPE_LEVEL_LOW>; > + > + gpio-controller; > + #gpio-cells = <2>; > + gpio-line-names = "max77650-charger"; > + > + regulators { > + compatible = "maxim,max77650-regulator"; > + > + max77650_ldo: regulator@0 { > + regulator-compatible = "ldo"; > + regulator-name = "max77650-ldo"; > + regulator-min-microvolt = <1350000>; > + regulator-max-microvolt = <2937500>; > + }; > + > + max77650_sbb0: regulator@1 { > + regulator-compatible = "sbb0"; > + regulator-name = "max77650-sbb0"; > + regulator-min-microvolt = <800000>; > + regulator-max-microvolt = <1587500>; > + }; > + }; > + > + charger { > + compatible = "maxim,max77650-charger"; > + input-voltage-min-microvolt = <4200000>; > + input-current-limit-microamp = <285000>; > + }; > + > + leds { > + compatible = "maxim,max77650-led"; > + #address-cells = <1>; > + #size-cells = <0>; > + > + led@0 { > + reg = <0>; > + label = "blue:usr0"; > + }; > + > + led@1 { > + reg = <1>; > + label = "red:usr1"; > + linux,default-trigger = "heartbeat"; > + }; > + > + led@2 { > + reg = <2>; > + label = "green:usr2"; > + }; > + }; > + > + onkey { > + compatible = "maxim,max77650-onkey"; > + linux,code = ; > + maxim,onkey-slide; > + }; > + }; > + }; > -- > 2.23.0 >