From patchwork Thu Dec 12 03:39:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 181405 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp372124ile; Wed, 11 Dec 2019 19:41:11 -0800 (PST) X-Google-Smtp-Source: APXvYqyA7V7TRe2Etom8CoEOibEETFYVxpIVFMoDdce+wgWOj8r53cdtMran1nl9IuRauztniQxP X-Received: by 2002:a05:6830:1415:: with SMTP id v21mr5944261otp.188.1576122071860; Wed, 11 Dec 2019 19:41:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576122071; cv=none; d=google.com; s=arc-20160816; b=mVXqhcVplyAzq8v7b4ww/toUYkRivXEBOLod2NiLpPTJIl7FGtD4qw0bKYVoXRHYgd b94qSpgUD2w+tTJLRHXqnoQAE6ZbnLSRjCtpy4DirueRV0Hf284a/a2DKoPPKRwoZ9rH 0FSffJ6HXggYf0PrBPwp07GZmKaLGh/68Qq5yqvP6mKKqPuTUz6avhxShEG4EMX2P8Dt Es/ztzJYeZCp4VQsOtgBin/Ewm7N5eivi4oPa9K67EzkH2vJeqWOGwdfkBc6UhE1Kgd4 aCutxhRwmG8Ts5oCqzM/qZlxIk1OiwllQTG1lh/nQZOTO7VGossJW3YMDEspJw2EblIr SmhQ== 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 r65si2395195oig.69.2019.12.11.19.41.11; Wed, 11 Dec 2019 19:41:11 -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 S1727716AbfLLDkE (ORCPT + 27 others); Wed, 11 Dec 2019 22:40:04 -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_F=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_F=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 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 -- 2.16.4 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"; + }; + }; + }; +...