Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp341720ybl; Wed, 11 Dec 2019 19:42:34 -0800 (PST) X-Google-Smtp-Source: APXvYqyBOIC5we+RhH6kBhc+9aVWvI0PqBmy0k6/kv0IZR66jwYe1mKbbnOz0U5394/T5lL1KUHw X-Received: by 2002:a9d:4c88:: with SMTP id m8mr5652251otf.12.1576122154223; Wed, 11 Dec 2019 19:42:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576122154; cv=none; d=google.com; s=arc-20160816; b=qkJvtgT6WCfFcWb/xbPElG08buYqf0dfJ36T3TEn8+Gk6d0cdHtQRA4h9w7qyqHK+6 URsFIsPMGBqMKbRMNc4xt9TKZhhbVO7SbRiewTVDAEFpOkjTttrB2kCYq5fgEl8uE5vE BvQJerKhX/ZL/+Q/1RHSMggrnUlmCUraBbpw0Ogn00jgX/UE4FrNStKx4riJKRz8CtpK UKrxyfea6n7EcpniFYPkLr6cQ9t25O1G52oJIRrActYpEfjJ4ZDaXV1ToXdcfc5qQ9Ls FvIvokqlRJz3IgLGAqv/tPQH+dFqcRtN7R8cSJ7ZPHVEFfh2tWl2naPU3QsqcUEJ4iuT m/jw== 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; bh=YkN8Qj2fK9yzRWm1uktodcm51G+ht7uFvw22lipRBD4=; b=XOQivKskgM0L1yPgKJK/juoOK9wD0Ox0o/FApsxjgbvq8/TIuzWOFJhRJa65ovX17K /sBtRoHSEsu+tPuxJsdy0gHxWq6CjDUQLBw3xMs6mjjZXFBHj/nVtzqJsFXxtrM3lokh Snz5oVK+ZWnzIcX1lZq2+VWBt1r5UZ1SUkxdnfB7EqC9Yf8b7/SCXrodLr2KeR3KE0XK SIK3uRA/wfYA1wYX9pLFg0PH8NlItB+dLaNiiefa8UjhO+hWwR9beIphlAdnnCPN9e1U g7TLoST2lJIfdJs/ObeaugJYp5inpmVjpaCmHFjSdoP4nq2UZq8mEbNo4yKNtrPJydbC wHfg== 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 e190si2379273oib.113.2019.12.11.19.42.22; Wed, 11 Dec 2019 19:42:34 -0800 (PST) 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 S1727702AbfLLDkD (ORCPT + 99 others); Wed, 11 Dec 2019 22:40:03 -0500 Received: from mx2.suse.de ([195.135.220.15]:58596 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726759AbfLLDkB (ORCPT ); Wed, 11 Dec 2019 22:40:01 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 0861BAE57; Thu, 12 Dec 2019 03:39:59 +0000 (UTC) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org, linux-leds@vger.kernel.org Cc: Jacek Anaszewski , Pavel Machek , Dan Murphy , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Andreas=20F=C3=A4rber?= , zypeng@titanmec.com, Rob Herring , Mark Rutland , devicetree@vger.kernel.org Subject: [RFC 06/25] dt-bindings: leds: Add Titan Micro Electronics TM1628 Date: Thu, 12 Dec 2019 04:39:33 +0100 Message-Id: <20191212033952.5967-7-afaerber@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20191212033952.5967-1-afaerber@suse.de> References: <20191212033952.5967-1-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a YAML schema binding for TM1628 LED controller. Cc: zypeng@titanmec.com Signed-off-by: Andreas Färber --- @Rob: How could we express constraints on two-cell reg value ranges here? Should we also model constraints on reg range by #grids property? .../devicetree/bindings/leds/titanmec,tm1628.yaml | 80 ++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/titanmec,tm1628.yaml diff --git a/Documentation/devicetree/bindings/leds/titanmec,tm1628.yaml b/Documentation/devicetree/bindings/leds/titanmec,tm1628.yaml new file mode 100644 index 000000000000..024875656e79 --- /dev/null +++ b/Documentation/devicetree/bindings/leds/titanmec,tm1628.yaml @@ -0,0 +1,80 @@ +# SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/titanmec,tm1628.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Titan Micro Electronics TM1628 LED controller + +maintainers: + - Andreas Färber + +properties: + compatible: + enum: + - titanmec,tm1628 + + reg: + maxItems: 1 + + "#grids": + description: | + Number of GRID output lines to use. + This limits the number of available SEG output lines. + minimum: 4 + maximum: 7 + + "#address-cells": + const: 2 + + "#size-cells": + const: 0 + +required: + - compatible + - reg + +patternProperties: + "^.*@[1-7],([1-9]|1[02-4])$": + type: object + description: | + Properties for a single LED. + + properties: + reg: + description: | + 1-based grid number, followed by 1-based segment number. + maxItems: 1 + + linux,default-trigger: true + + required: + - reg + +examples: + - | + #include + + spi { + #address-cells = <1>; + #size-cells = <0>; + + led-controller@0 { + compatible = "titanmec,tm1628"; + reg = <0>; + spi-3-wire; + spi-lsb-first; + spi-max-frequency = <500000>; + #grids = <7>; + #address-cells = <2>; + #size-cells = <0>; + + colon@5,4 { + reg = <5 4>; + color = ; + function = LED_FUNCTION_INDICATOR; + linux,default-trigger = "heartbeat"; + }; + }; + }; +... -- 2.16.4