Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp185269lqc; Thu, 7 Mar 2024 14:16:48 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWFrHpOElNhnyTwX3QMsFRji0/8PJakqWFQGSv5uDqsBMgIgfrILAuuuSNqyHKsrpZ7bBP/OYk/sg0wBXOIrdHvppq5UytjgrQijn9Uuw== X-Google-Smtp-Source: AGHT+IGT+gFNjw7mMvTVm4eFbqWUrcxMOIDbGKRUkvvIIT1fcNX10kMGF+Nw/G2JHrNZLklmywW+ X-Received: by 2002:a5d:668f:0:b0:33d:2885:ce58 with SMTP id l15-20020a5d668f000000b0033d2885ce58mr13227350wru.5.1709849808223; Thu, 07 Mar 2024 14:16:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709849808; cv=pass; d=google.com; s=arc-20160816; b=hr/Z5BfC7TgCwdirMtP/4VrPo4VG7XAeHSSJ0ATexKS5Hy3ZPAvrS//4cjz+a16aMe SOjrUGofbGKLpvUITY4c9FYw6KWl4LflWT6InUq65lHkhgfsFs8f9zWJ0LgTho4GbWkz 9cGcwKaXH4fQK8m0OI73DZ8TuVniAHwrkk/UWQlygsANkNyv8FOgEcJKDHx9n8M4ywvv TiPr2oMQebq6enuiN+7hFG8di+h/Di57XPR8dPfgKJzeoCh6RUlNVddbgH31Hp52XHXC lekv2bFTBOf34W76aPkdG/dAeQd1GPKMzyIrFCn/nxyz3CDVS1fAHzpl/Twzd/Rm756v szfQ== 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=xxBD7nIRpCKC/svvZNqUfTVZv80HTqUWAxM9FrAVvSQ=; fh=wO+zCbqyUVzOFM0YLHWDcoT3srU3GlkcXqyV/4lus8o=; b=G/dNb8KhdlKJXxj1fmHlIsTofC2m/B7i8iW/TddTi31nE7p/KH6yJLtpp2f4tMJprJ R9lbpLnBNucyayosOm0nKx8xYopJzbQiVky4iPu8YwRu1YGnq/0JwbFNkqjvyEQS2QVT goLiUghIvut8YO56mFUzS+aIsVKrvNt9FhObNrOk4oUF64Of0XvBqMM95eoFwI0tu+U4 o3zT80q+JIemF5Qhj9cirdIry80e94Xb4+UjmoxeScJDob9b2uIrlgUVwQXwckpYjOaz W63h2GEWtYq/jRBMDApvtdj5L6gyezjtKsdJ6EQnccHOAEojv80BsPoXRPAU7xXMcpxt VTHA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=CNEDOW3V; 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-96135-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96135-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 am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id cb2-20020a0564020b6200b005671142b51asi5110850edb.654.2024.03.07.14.16.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 14:16:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-96135-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=CNEDOW3V; 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-96135-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96135-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 72F421F23454 for ; Thu, 7 Mar 2024 19:51:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2D5CD1386B0; Thu, 7 Mar 2024 19:51: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="CNEDOW3V" 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 A9D38137C25 for ; Thu, 7 Mar 2024 19:50:58 +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=1709841063; cv=none; b=KPbVHMpG3F4P/XlUPAvW7aE1clTfBYq8b6vLUZahQQmzmfT+VaAN2fjr/0azDS22PDtaWcrH8bCb2DN6GJYldo4UHDZv1GTPxJ2E0gniEFIbDFRji8kzNXMlYuaUMZw3wRcK8lS+Kpfx8kopAmoP7ewBxp6S5Ef7+n0/MswUSuI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709841063; c=relaxed/simple; bh=mXN5wgd3o4fIew4BW8dq44SYd4HTn/EPSiwKP+WUK8M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=c42wjdFuwqU7MiWxnsSA0Lp6vAzpzroYO+R2/YrQDhmn1zRDnvypcohsDq0exQYdBQHCPmo+GQX7fXoQDVS+FPcoptbX5BEtieR2Q4pN2N2FJdxY7h/S6hb8+7dnGTcx8ra84UoQZhtSuOluvHch6KazLP7herVArS/g77C77GY= 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=CNEDOW3V; 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 3A9EB2C04A9; Fri, 8 Mar 2024 08:50:56 +1300 (NZDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail181024; t=1709841056; bh=xxBD7nIRpCKC/svvZNqUfTVZv80HTqUWAxM9FrAVvSQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CNEDOW3V8SXBIDlNITxoSq/hyzsBzTYpbmGAd/yPN66zdrAav5c5ranALa004zsC0 Zuk3ywkA5vI5xj6mo/X77UvMcxF3HC0SsIzxmZRYuW7Hs8e9SzBjJ9Zz4ozJ3T9nlI seARkJlvJMwcWWA+pUwA75D1I7Fn3lVNlTIEetKM0xVMU9ovwk39bgEDdYbeAL7IaT 7NY8dlG4srXSZ+HWI0epAttTOG1URHfnuoeP77BExQVjFNJDwAadYMV/uw5faeCsmS 3lbBupkPKRSUmXpVZ3m9qzCCu+bcNZ3KRQPvYD8he5lCdAKyAefXDl+rIRCmUXlBJJ wUjYE+DYQQfZA== 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 ; Fri, 08 Mar 2024 08:50:55 +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 C709613EE85; Fri, 8 Mar 2024 08:50:55 +1300 (NZDT) Received: by chrisp-dl.ws.atlnz.lc (Postfix, from userid 1030) id BF7542808BA; Fri, 8 Mar 2024 08:50:55 +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: linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Chris Packham Subject: [PATCH v6 2/3] dt-bindings: auxdisplay: Add bindings for generic 7-segment LED Date: Fri, 8 Mar 2024 08:50:52 +1300 Message-ID: <20240307195053.1320538-3-chris.packham@alliedtelesis.co.nz> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240307195053.1320538-1-chris.packham@alliedtelesis.co.nz> References: <20240307195053.1320538-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=65ea1aa0 a=KLBiSEs5mFS1a/PbTCJxuA==:117 a=K6JAEmCyrfEA:10 a=tBb2bbeoAAAA:8 a=VwQbUJbxAAAA:8 a=gEfo2CItAAAA:8 a=UL8_YvhhsuCliVb0JXoA:9 a=3ZKOabzyN94A:10 a=Oj-tNtZlA1e06AYgeCfH:22 a=AjGcO6oz07-iQ99wixmX:22 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 Reviewed-by: Geert Uytterhoeven Reviewed-by: Rob Herring --- Notes: Changes in v6: - Collect R-by from Geert and Rob Changes in v5: - Preserve formatting, maxItems set to 8, group GPIO specifiers as suggested by Geert 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 | 55 +++++++++++++++++++ 1 file changed, 55 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..328954893c64 --- /dev/null +++ b/Documentation/devicetree/bindings/auxdisplay/gpio-7-segment.yaml @@ -0,0 +1,55 @@ +# 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 seventh GPIO corresponds to the G segment. Some LED b= locks + also have a decimal point which can be specified as an optional ei= ghth + segment. + + -a- + | | + f b + | | + -g- + | | + e c + | | + -d- dp + + minItems: 7 + maxItems: 8 + +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