From patchwork Thu Dec 12 03:39:45 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: 181401 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp371859ile; Wed, 11 Dec 2019 19:40:53 -0800 (PST) X-Google-Smtp-Source: APXvYqxX6ePy0MdN+5qFElIp+H3eF4Ux5+rGL6EBpIX5/x18pLOy9bb5YEqyL5ojOcr5IgpPTf/z X-Received: by 2002:a9d:6f11:: with SMTP id n17mr5598650otq.126.1576122053139; Wed, 11 Dec 2019 19:40:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576122053; cv=none; d=google.com; s=arc-20160816; b=fl4vV2VGKJdU5yodTcsiWZbU2QKOMReuTkcALFcj+JnYkHiA437GwihffXGzeB+imD G9rxjivkCbaN6iJ+oAKLt4Xs2YFs+5BrceL9tM6dJJNkmsBu+FUDnMt4wcMjGa0tRAvo YecHFoOIJ1NSgJUY2qKCEwWherutpOGEEGjtq0MgUTkSsEm1mAN2MLkoqBKxmwekcwh+ jvbwJcqlY+uorrbPecruaxGFfGOBQH6ray4FR6po8QAJmRNUMKDZLCn/SGZ1KTm51/mR epU+zr3dxUxVUkR3PerLFZwHNY1zVhiAdWJdUh19YqRvFNqGKag5sMssnO7gbZYwrt/t zTMw== 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=992+52dYziSsyavXwh9d5wtxg7DokaFQ8LFxiCKL75A=; b=ueRmbeajB3ik8Z92AHBxPH0wga3e1oRkMsAwoamlqDkxB1/ldZWQsUfw1/GA77TlFj /SKb/pvctN5cK+vloDWePBKkZNshHtKqo/Urusr7UQHokkpvhptIOwTdjvHzl5lxf/tL zVrOvE7tj+cgUVHMeCA+Ykxj+eRd8ALpZ42nrla5dd5vfHFZJGIv3445nBxqh0jLvUgA VMeNedV06UsRhTl/wR0zmXI49otZ9CSmxwlAf8xRCdgYucHILLmwpX/36r+5JPR9aBg5 Tg7LgCZRoiSbzat5YVUA8HalepZN8J2EpZ8C9BHdqfuHD093l91lk8V8QVTQCSVYE4GT f64Q== 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 w129si2440339oig.83.2019.12.11.19.40.52; Wed, 11 Dec 2019 19:40:53 -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 S1727987AbfLLDkv (ORCPT + 27 others); Wed, 11 Dec 2019 22:40:51 -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 S1727743AbfLLDkH (ORCPT ); Wed, 11 Dec 2019 22:40:07 -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 5E564AFA8; Thu, 12 Dec 2019 03:40:05 +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?= , Rob Herring , Mark Rutland , devicetree@vger.kernel.org Subject: [RFC 18/25] dt-bindings: leds: tm1628: Define display child nodes Date: Thu, 12 Dec 2019 04:39:45 +0100 Message-Id: <20191212033952.5967-19-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 Amend the individual LEDs by allowing to specify one special child node with more than one reg entry, with value zero having wildcard meaning. Signed-off-by: Andreas Färber --- Read the cover letter for further discussion of concept and alternatives. .../devicetree/bindings/leds/titanmec,tm1628.yaml | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) -- 2.16.4 diff --git a/Documentation/devicetree/bindings/leds/titanmec,tm1628.yaml b/Documentation/devicetree/bindings/leds/titanmec,tm1628.yaml index 50205e3c3624..cf6c8d81e68c 100644 --- a/Documentation/devicetree/bindings/leds/titanmec,tm1628.yaml +++ b/Documentation/devicetree/bindings/leds/titanmec,tm1628.yaml @@ -53,6 +53,24 @@ patternProperties: required: - reg + "^display@([1-7],0|0,([1-9]|1[02-4]))$": + type: object + description: | + Properties for a sequence of 7-segment digits composed of multiple LEDs. + + properties: + reg: + description: | + One or more tuples of grid number and segment number in visual order. + A segment of zero indicates that the corresponding grid output lines + represent the individual segments; a grid of zero indicates that the + corresponding segment output lines represent the individual segments. + minItems: 1 + maxItems: 7 + + required: + - reg + examples: - | #include @@ -71,6 +89,40 @@ examples: #address-cells = <2>; #size-cells = <0>; + display@0,8 { + reg = <0 8>, <0 7>, <0 6>, <0 5>; + }; + + colon@5,4 { + reg = <5 4>; + color = ; + function = LED_FUNCTION_INDICATOR; + linux,default-trigger = "heartbeat"; + }; + }; + }; + + - | + #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 = <6>; + #address-cells = <2>; + #size-cells = <0>; + + display@1,0 { + reg = <1 0>, <2 0>, <3 0>, <4 0>; + }; + colon@5,4 { reg = <5 4>; color = ;