Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp6329977ybp; Tue, 15 Oct 2019 13:14:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqzRDHrkSdxCZ55N3OBi4MXmxNU9qGHa8IupuKyHp+bz0hGPo0IDiBE2rbZGdHp+Rw971GPh X-Received: by 2002:a50:8f03:: with SMTP id 3mr36605279edy.195.1571170449916; Tue, 15 Oct 2019 13:14:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571170449; cv=none; d=google.com; s=arc-20160816; b=h62OA78DEvAYUPQORPnyX+yTsOBqkdzC9leXA1jy6hgrg4xTXF07CEJrDNkENvRL3R 6IuxgWmWAEw+RQSHxIpa1TYBMm7IZMK6cH7+Fml+LsmMZKjjbGtMWrXoZcbG5eEM3I1H 7Ob7KuCrGkmZvv5ZHZCRC5DtfJK4fRNdDIda0c6T5QVSjzbSV3PoEEr0A53LqEV4dOQL q4EEmcw0K1hmvC+zm3hm9LNk20VrCbVkL0JmoWPJaTMzPDnXhuQGu/bhZzQRcrk1tRVT PZ7AeIb7YQITa3Q+g1ohMDiR3cX/nBTDCb8+l9LjfqFAhjBQsJfi9egW1zevUaJ24T5Y +y8A== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=XUVahl6lQQfTwOULvlZwTKr25yI+4iuUdZYRUHEnntA=; b=pS7SY6VNyhfMXqeS637H6SDb7yx+L2FU7JwOgNww4ml5IqLdfNR3G1NDLStffWZQx1 h4KXY9zk1jnyL3G4SH8SHcqx0FmXt0PgoW/4ZalwtExdsZvmQHz9Ac+vTBECjwS7nF+k VJc8BTyhHqQN+XbPahdwjf/CCV4qryYPwxfD5hu8CSOd9hC8cVGgzW6olk5WLhTBHYA8 NRVwL09DIHjRyCkB3DgYHoVVm/+NvK25TCA7kPAdh7fZST0Ol4VBV50q5nIxMtJpUKfM HNCRE5YKQm/MOsXdzRTVEm838f5AR3AQaEAzG1DSKCNQA4qtWnNmHtVuMBVSzrfeqEIZ bGrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=zCAjIvin; 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 o7si15432133edc.342.2019.10.15.13.13.46; Tue, 15 Oct 2019 13:14:09 -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; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=zCAjIvin; 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 S2387951AbfJOQXT (ORCPT + 99 others); Tue, 15 Oct 2019 12:23:19 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:38965 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387943AbfJOQXQ (ORCPT ); Tue, 15 Oct 2019 12:23:16 -0400 Received: by mail-wr1-f65.google.com with SMTP id r3so24641034wrj.6 for ; Tue, 15 Oct 2019 09:23:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XUVahl6lQQfTwOULvlZwTKr25yI+4iuUdZYRUHEnntA=; b=zCAjIvinDVzNO70l4dp4gdcj7ySO2afbkHfthwm3r0kDIWzIuRkaNoBPOD6Tdpwkct 5JC+DH9JW1irmJT7dEoZfQ9bXhs7yEPHGFmD+P8i9MbXsvvSV1Am5NRtyhzZAnDm7t50 XNRCg59aJCEDRTDKxHmQDAuELIdUCdCLaXrRJhYQW1h8JQuyHRyHNHXadCrtMlsddHXy +xrwk+23oq8yM0sBjM1LVL/5owuYZ5/maEXsPee8fT+przZja6dclnhdirJAvytk1b1y z5vj8kbXhdfvdXEuocs+Tbg2g0+factEQ0zAxKrwVNNwWfOOLBr/MK2sm/4IQHifoord Dpkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XUVahl6lQQfTwOULvlZwTKr25yI+4iuUdZYRUHEnntA=; b=mgQf3QWUYpGtUMQgjHHmu0Z6rG7F1kS9ZfePjjzUwH6wYvwP65Mp+CKMBGdAfmaR/e INEnf+9iaqgoTPPeiOzPoBF63kUOChLRx1KtmeP6H9ZVZvD/5fXAFj6FIlSMT9ONoAvQ XCjz0fxFAiQFaRH42VZhvbII6R+hdg6d+pgxLHV+jM0r4udd0bEntxm1MDg7PNt2v8/e Og/NwF7vYRcd7MYVLa1VUHsdiHEGhc8BgkZY0Bu9wfV90GmmGN+PxJLE2WhLUnol8h/r YLIWVnJiGIXwrAGj4fobM5MNwRFC5Nklki4/28ne4nobLC+bb9hXZFTdFTIEHdVGI2Gt TNUw== X-Gm-Message-State: APjAAAVNhHes/YgUhZkADY71RrAOKzwTi1krWMrKU2qvuPOb2VrLz0wx xjLRsMslnvG2wjREOwQJQDLEuw== X-Received: by 2002:a5d:42c2:: with SMTP id t2mr3755409wrr.251.1571156592681; Tue, 15 Oct 2019 09:23:12 -0700 (PDT) Received: from debian-brgl.home ([2a01:cb1d:af:5b00:6d6c:8493:1ab5:dad7]) by smtp.gmail.com with ESMTPSA id x129sm41427605wmg.8.2019.10.15.09.23.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Oct 2019 09:23:12 -0700 (PDT) From: Bartosz Golaszewski To: Rob Herring , Mark Rutland , Dmitry Torokhov , Jacek Anaszewski , Pavel Machek , Dan Murphy , Lee Jones , Sebastian Reichel , Liam Girdwood , Mark Brown Cc: 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: [PATCH v2 5/6] dt-bindings: leds: max77650: convert the binding document to yaml Date: Tue, 15 Oct 2019 18:22:59 +0200 Message-Id: <20191015162300.22024-6-brgl@bgdev.pl> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191015162300.22024-1-brgl@bgdev.pl> References: <20191015162300.22024-1-brgl@bgdev.pl> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bartosz Golaszewski Convert the binding document for MAX77650 LED module to YAML. Signed-off-by: Bartosz Golaszewski Acked-by: Sebastian Reichel --- .../bindings/leds/leds-max77650.txt | 58 +------------ .../bindings/leds/leds-max77650.yaml | 82 +++++++++++++++++++ 2 files changed, 83 insertions(+), 57 deletions(-) create mode 100644 Documentation/devicetree/bindings/leds/leds-max77650.yaml diff --git a/Documentation/devicetree/bindings/leds/leds-max77650.txt b/Documentation/devicetree/bindings/leds/leds-max77650.txt index 3a67115cc1da..33d6ff23f0ef 100644 --- a/Documentation/devicetree/bindings/leds/leds-max77650.txt +++ b/Documentation/devicetree/bindings/leds/leds-max77650.txt @@ -1,57 +1 @@ -LED driver for MAX77650 PMIC from Maxim Integrated. - -This module is part of the MAX77650 MFD device. For more details -see Documentation/devicetree/bindings/mfd/max77650.txt. - -The LED controller is represented as a sub-node of the PMIC node on -the device tree. - -This device has three current sinks. - -Required properties: --------------------- -- compatible: Must be "maxim,max77650-led" -- #address-cells: Must be <1>. -- #size-cells: Must be <0>. - -Each LED is represented as a sub-node of the LED-controller node. Up to -three sub-nodes can be defined. - -Required properties of the sub-node: ------------------------------------- - -- reg: Must be <0>, <1> or <2>. - -Optional properties of the sub-node: ------------------------------------- - -- label: See Documentation/devicetree/bindings/leds/common.txt -- linux,default-trigger: See Documentation/devicetree/bindings/leds/common.txt - -For more details, please refer to the generic GPIO DT binding document -. - -Example: --------- - - 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"; - }; - }; +This file has been moved to leds-max77650.yaml. diff --git a/Documentation/devicetree/bindings/leds/leds-max77650.yaml b/Documentation/devicetree/bindings/leds/leds-max77650.yaml new file mode 100644 index 000000000000..bb541ff67f80 --- /dev/null +++ b/Documentation/devicetree/bindings/leds/leds-max77650.yaml @@ -0,0 +1,82 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/leds-max77650.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: LED driver for MAX77650 PMIC from Maxim Integrated. + +maintainers: + - Bartosz Golaszewski + +description: | + This module is part of the MAX77650 MFD device. For more details + see Documentation/devicetree/bindings/mfd/max77650.txt. + + The LED controller is represented as a sub-node of the PMIC node on + the device tree. + + This device has three current sinks. + +properties: + compatible: + const: maxim,max77650-led + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + +patternProperties: + "^led@[0-2]$": + type: object + description: | + Properties for a single LED. + + properties: + reg: + description: + Index of the LED. + maxItems: 1 + minimum: 0 + maximum: 2 + + label: + $ref: "/schemas/types.yaml#/definitions/string" + description: + The label of this LED. + + linux,default-trigger: + $ref: "/schemas/types.yaml#/definitions/string" + description: + String defining the default trigger assigned to this LED. + +required: + - compatible + - "#address-cells" + - "#size-cells" + +examples: + - | + 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"; + }; + }; -- 2.23.0