Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp161604lqs; Mon, 4 Mar 2024 20:00:30 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUSQLVjPc4sAhWC1v9mrj/UTvmPSPWjvSv8kE3G7Mr10rCun8/WDqvowUN29XyT9YPHtzQaV/5DqVFakN0L46STT9zKeGlduonhfn3xAQ== X-Google-Smtp-Source: AGHT+IGFynd0Tmrr2S7OYjaGncU9j3u0d//jOR3+FmzH9TUvfXt9lUcVPJ2HONsp3dRGNGWQEb7x X-Received: by 2002:a05:6358:4429:b0:17b:9e19:4fb9 with SMTP id z41-20020a056358442900b0017b9e194fb9mr631453rwc.22.1709611230553; Mon, 04 Mar 2024 20:00:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709611230; cv=pass; d=google.com; s=arc-20160816; b=qkQ5QNrPm8ugwimKU1eEyX/Zdxlk2mvW/b01ZTrR5exRNu2VTZmhk1pM7UpjR9heod j/HmEruFPVDRxrg8aZX1AQixflngpPMlLVok279Rwcd8fWKYJnruZfy46vQ0+ph20UIJ Nxrd/nz8spj1YBFYjWaBC9hVamSVqjOr+l1/zGBWXJlQW3evMcdQy3nmFKuU/fnMpWc+ xxhJwGEtsP57QbWUgmrIVCUGPY9QaIA9PjQLy80/qPQ8lpzX2Fd8ht+hHJOFQvEyJlMs i4IQPmW0mpzRWgBgzFNLy5HDBnI30S1K8TziZi/qsaouRG5RqsZz5S/eHMa1oJHarUGB v/bA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=xNOHpglBjcYe1JZrqyyKifiDXG6JqFWYwr4cN2SpPQ0=; fh=QDRlth7QZgma/wnCaKQT7MRTEjUL92OEFIhwJeNSnHo=; b=d4xjw23DLM/ebFPKNzAff7vMvBFxtqSHlxDox0j5WCqwM/MOGWAkiQh+NA8Zwlrk2t g5aCMZT6hGPcZwbXmu6Y8WUylUd3powJQOvZkw8C3LIOs+9wDRkxkqGeSI3H7WHjWi6P dUseGCZmXFh2P6VzOnEMKO/rjKjkRE4yOOdmdYyQ0w461V9K/R5Nvs4id25Jkr6hBpwG 5WSv5k6AoR6TyzyB0obYgPW5S7aolmDb5hDsp0LXcwehIUp6QsTYHLrVR3esEQBmkW62 MGdhwulakDHv9uVCbJx7FE2O8CRrmbAfJMIqUZq8z9h6/6dKYhR/jVhwF4U9rc9Obqow MXgQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=PP4nYQ5b; arc=pass (i=1 spf=pass spfdomain=alliedtelesis.co.nz dkim=pass dkdomain=alliedtelesis.co.nz dmarc=pass fromdomain=alliedtelesis.co.nz); spf=pass (google.com: domain of linux-kernel+bounces-91636-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91636-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=alliedtelesis.co.nz Return-Path: Received: from sy.mirrors.kernel.org ([147.75.48.161]) by mx.google.com with ESMTPS id g34-20020a635662000000b005dc42014e30si9564311pgm.692.2024.03.04.20.00.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 20:00:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-91636-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=PP4nYQ5b; arc=pass (i=1 spf=pass spfdomain=alliedtelesis.co.nz dkim=pass dkdomain=alliedtelesis.co.nz dmarc=pass fromdomain=alliedtelesis.co.nz); spf=pass (google.com: domain of linux-kernel+bounces-91636-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91636-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=alliedtelesis.co.nz Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id C7F46B23CB2 for ; Tue, 5 Mar 2024 03:59:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 19DD040BE7; Tue, 5 Mar 2024 03:59:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=alliedtelesis.co.nz header.i=@alliedtelesis.co.nz header.b="PP4nYQ5b" Received: from gate2.alliedtelesis.co.nz (gate2.alliedtelesis.co.nz [202.36.163.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5BA39405FD for ; Tue, 5 Mar 2024 03:59:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.36.163.20 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709611143; cv=none; b=mjj2e+kMmUofraFucAHAzYc/U1UTVVJCh9fDZfKdWdDjP7sCR1VPLu0QnEvb/EhZ75cW451VIzfJaCp0MJKSEOBQE2+3mhEYLAcofnfIGmBX4QrKJ55eebk1EXxPkgLNbbCBvMTRk6wGX8WIgkncOogXoA/qBcXjzfRhvzQtao4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709611143; c=relaxed/simple; bh=kEOoLiiPz8igxf5L/W0rqxXGP621kvD+OKWf1GoMszk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ABqeJJP5ctf7O9iDE5WZMJc1bNDn2Ito8xmY9xkwWUkomDRWENq8/eZF9+hO6vqkr65YnnErwFEuJ/mzFnfdtV6qb4MjRcVE97m7z/bOI+9+pArCCES9GwChU6EAgLTZP8p6cwxW5HICb8mFfsfelKdp9kZA4YG9wgy8eD9ghzM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=alliedtelesis.co.nz; spf=pass smtp.mailfrom=alliedtelesis.co.nz; dkim=pass (2048-bit key) header.d=alliedtelesis.co.nz header.i=@alliedtelesis.co.nz header.b=PP4nYQ5b; arc=none smtp.client-ip=202.36.163.20 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=alliedtelesis.co.nz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alliedtelesis.co.nz Received: from svr-chch-seg1.atlnz.lc (mmarshal3.atlnz.lc [10.32.18.43]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by gate2.alliedtelesis.co.nz (Postfix) with ESMTPS id 184692C061F; Tue, 5 Mar 2024 16:58:58 +1300 (NZDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail181024; t=1709611138; bh=xNOHpglBjcYe1JZrqyyKifiDXG6JqFWYwr4cN2SpPQ0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PP4nYQ5bqvTqBXQh34le5pK/pYPJpMFP6v57pXioPu2NW58CvyS3233Oz/z3RA9sJ aBFY2jcZy4TlKFsBPbVd48Q/ji/yHqI6do6DROuKhS1U0bnzfV6C9PYNuLilLP8ODa Vq9bzx6COhJAYFsU06JWyjIW3ZRfZA9QPC81RxMRUvOFBx0QbN7HtytlnKKNPBlmFT 09vuUf+NwClPXwSKMt2ZpCjwmhACfCtCnumEk8K4qJ/0oMODIqa+xDSVem+33eSasg BONiQAaQTmnk6BM5pHOcqKl1kcf5AnJsP5UUvHCJpEkzjKmm3byWZHzW+Gxg9oHcrD nu45U0/J0/Omg== Received: from pat.atlnz.lc (Not Verified[10.32.16.33]) by svr-chch-seg1.atlnz.lc with Trustwave SEG (v8,2,6,11305) id ; Tue, 05 Mar 2024 16:58:57 +1300 Received: from chrisp-dl.ws.atlnz.lc (chrisp-dl.ws.atlnz.lc [10.33.22.30]) by pat.atlnz.lc (Postfix) with ESMTP id B141C13ED56; Tue, 5 Mar 2024 16:58:57 +1300 (NZDT) Received: by chrisp-dl.ws.atlnz.lc (Postfix, from userid 1030) id AB22A28091F; Tue, 5 Mar 2024 16:58:57 +1300 (NZDT) From: Chris Packham To: andy@kernel.org, geert@linux-m68k.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, andrew@lunn.ch, gregory.clement@bootlin.com, sebastian.hesselbarth@gmail.com, lee@kernel.org Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-leds@vger.kernel.org, Chris Packham Subject: [PATCH v4 2/3] dt-bindings: auxdisplay: Add bindings for generic 7-segment LED Date: Tue, 5 Mar 2024 16:58:51 +1300 Message-ID: <20240305035853.916430-3-chris.packham@alliedtelesis.co.nz> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240305035853.916430-1-chris.packham@alliedtelesis.co.nz> References: <20240305035853.916430-1-chris.packham@alliedtelesis.co.nz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SEG-SpamProfiler-Analysis: v=2.4 cv=BKkQr0QG c=1 sm=1 tr=0 ts=65e69881 a=KLBiSEs5mFS1a/PbTCJxuA==:117 a=K6JAEmCyrfEA:10 a=gEfo2CItAAAA:8 a=9jK-yGTeFsMUMglnDkMA:9 a=3ZKOabzyN94A:10 a=sptkURWiP4Gy88Gu7hUp:22 X-SEG-SpamProfiler-Score: 0 x-atlnz-ls: pat Add bindings for a generic 7-segment LED display using GPIOs. Signed-off-by: Chris Packham --- Notes: Changes in v4: - Add ASCII art diagram showing arrangement of segments Changes in v3: - Set maxItems: 7 - Expand description of segment-gpios property. - Use compatible =3D "gpio-7-segment" as suggested by Rob Changes in v2: - Use compatible =3D "generic-gpio-7seg" to keep checkpatch.pl happy .../bindings/auxdisplay/gpio-7-segment.yaml | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 Documentation/devicetree/bindings/auxdisplay/gpio-7-s= egment.yaml diff --git a/Documentation/devicetree/bindings/auxdisplay/gpio-7-segment.= yaml b/Documentation/devicetree/bindings/auxdisplay/gpio-7-segment.yaml new file mode 100644 index 000000000000..172548dfb142 --- /dev/null +++ b/Documentation/devicetree/bindings/auxdisplay/gpio-7-segment.yaml @@ -0,0 +1,54 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/auxdisplay/gpio-7-segment.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: GPIO based LED segment display + +maintainers: + - Chris Packham + +properties: + compatible: + const: gpio-7-segment + + segment-gpios: + description: + An array of GPIOs one per segment. The first GPIO corresponds to t= he A + segment the last GPIO corresponds to the G segment. Some LED block= s also + have a decimal point (currently ignored). + + -a- + | | + f b + | | + -g- + | | + e c + | | + -d- dp + + minItems: 7 + maxItems: 7 + +required: + - segment-gpios + +additionalProperties: false + +examples: + - | + + #include + + led-7seg { + compatible =3D "gpio-7-segment"; + segment-gpios =3D <&gpio 0 GPIO_ACTIVE_LOW + &gpio 1 GPIO_ACTIVE_LOW + &gpio 2 GPIO_ACTIVE_LOW + &gpio 3 GPIO_ACTIVE_LOW + &gpio 4 GPIO_ACTIVE_LOW + &gpio 5 GPIO_ACTIVE_LOW + &gpio 6 GPIO_ACTIVE_LOW>; + }; --=20 2.43.2