Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1073449rbb; Sun, 25 Feb 2024 18:50:06 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVur1365XHicGhpEBfpDaATQP2eKvLTF7NcT+IPugmlJ1x2nr0vR3144NRQwFdabbRxZS6h1qktd0I0LGLHD+KV6CDlmmwynjGh4o74TA== X-Google-Smtp-Source: AGHT+IHILZSNbmKEh1rm9y2n8YOZpzb5yHQT/tbGXaMNyN1GSp2axnly476vqTDw28O4L4E/eLam X-Received: by 2002:a17:90a:9906:b0:299:4269:b8c9 with SMTP id b6-20020a17090a990600b002994269b8c9mr3588057pjp.26.1708915806187; Sun, 25 Feb 2024 18:50:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708915806; cv=pass; d=google.com; s=arc-20160816; b=jvLd+DxFcqAN+WZvR40HUtKGSSjj3ewZSCpvqPtsNj2A3zyGLR8VGSp9eOOpQx3pSG 5GIKDy5yUOGTOqAM/vD9XlkIWLRAlCkTm3AnkNyZM1XhBr+fPCd3ZZUQi3YqNLufxz8N KGKwA4z11Aa2TdTnywDHonZzK2cdD0AWZGsO8hbw0VJTRJu4qFO3vQIgyHhxRgxE57nu C87+IzBlezhxe4yE0ALmV9VWqEbiULOZVrSbFu/nlY5PhiDLgZaA9q8uvEhLnIe3Zo8I oLzPAhFoBubSS9qMic5KpGqq9wdNT92OrOL2UGs7iOpRG32hNNHxmGZ5FvSpb3j8uXDV 6Zqg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=MhQaDMhNf1pMBewPwvsaNlydCejp+LUoROz0d2JINCQ=; fh=Caa51QUWjKBfXXhOAddtR9nYUUSVElS0ixjEkPUS0y4=; b=SjR36XNM6JkgB/DztLdhezf+gbdgjGvi65NTUE7/I7zNcJZUhNPAVfC/4iu9c/HHpJ Mm0sIQBZLIIbBPX4IuX3cSoMC8Y647pr/0IlQO6gJA8SuoKyBWlUbilU3+5Yh7FGr0Yu TslLM+c9fdRLlI7xl0owyWl01ZfbI8XJZZkBQA8nKP7Fo4OIO3Dbgt6xiTjUd9hXB/JA od6XaFXMhVA+NYHHFu50/BoOCikxMD2FUxtJsjsE0ICsP2C/j3tPteCFvRg9DtligrJb /sxwWY7IvAL8y6Fp8utoDS/5ceawlpMN6AMg8h07ycWmfPRifnHUSObVR73qz9+47gNI y82w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=Ld+7pNoO; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-80424-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80424-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id om15-20020a17090b3a8f00b0029a07707095si3036482pjb.51.2024.02.25.18.50.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 18:50:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-80424-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=Ld+7pNoO; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-80424-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80424-linux.lists.archive=gmail.com@vger.kernel.org" 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id DAF4A2818E3 for ; Mon, 26 Feb 2024 02:50:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 974F31172C; Mon, 26 Feb 2024 02:49:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="Ld+7pNoO" Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 AFC0B1798A; Mon, 26 Feb 2024 02:49:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708915797; cv=none; b=W+IQxJg45Z6agU+QnAN9sipVSSEaDRBHTeooqp3+x+ie7AeH8OVMcQ+v6kS4bC+ApA8xFtJL1Knba3iFf/8YOMBvIuMrpyVEDXea1ve0/woYegcHZiqoMWk7SEKDfYKzbZB+sBXEveCHSQ9CvNg2kBuJnkS4WMhOuuiM1b5hNHw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708915797; c=relaxed/simple; bh=DcMacE/T1H711vYK5u4ErqYTR46rEQvC6GPq8x7rzXQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=sbwFIY9tqH1T+j4CA5IMAdqKTGdByrLYGwWBjRpNNdLYou8ORVho7qt9aWZrrscyhvi/ma0UCyGbz8152lxnMPcIQpw2J81+dM+E0BReYj/GW/yWBExEhyFxUr8DLGYv1uWkgxh8Gl4k3fDmlGaWhaBGlCziO1qTygBitpLRqUk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=Ld+7pNoO; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Sender:Reply-To:Content-ID:Content-Description; bh=MhQaDMhNf1pMBewPwvsaNlydCejp+LUoROz0d2JINCQ=; b=Ld+7pNoOZnggeiHJnCxAAGqS8S nITJ2hDxhbJ0+rZtQpiwec2j3cMW13cc7zMApsEmpBxQkzOi3PbXeFGzpqujFvhZ+bmzdo29dKYu+ vAdQDEYgL0hB9okrXxK/W+wjETKtabIrt7nvmvitPjSMTFJGWKZPwW1LVlJIBo2kgtpxxHjR+DaNq kNSJ07KvX7//wxEKNGTF6roo6S0RxqI6JrxMwcYvQq8XYf/jMmmnGKLOooSNxA8UhsPu3/bIZGrNn yIU3a/N7QJbm9wxupceEDLel0DA6xGhESb4J90rhFq/XDHCspRIaZE4DBCHLNMUa/klSruoURJX5+ Atf8Ok5A==; Received: from [50.53.50.0] (helo=[192.168.254.15]) by bombadil.infradead.org with esmtpsa (Exim 4.97.1 #2 (Red Hat Linux)) id 1reR3v-0000000GCxT-0C2G; Mon, 26 Feb 2024 02:49:51 +0000 Message-ID: <7ef941f5-fd2f-4893-81e1-94f5aabf6ac3@infradead.org> Date: Sun, 25 Feb 2024 18:49:50 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/3] auxdisplay: Add 7 segment LED display driver Content-Language: en-US To: Chris Packham , ojeda@kernel.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, andy.shevchenko@gmail.com, geert@linux-m68k.org, pavel@ucw.cz, lee@kernel.org Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-leds@vger.kernel.org References: <20240225213423.690561-1-chris.packham@alliedtelesis.co.nz> <20240225213423.690561-2-chris.packham@alliedtelesis.co.nz> From: Randy Dunlap In-Reply-To: <20240225213423.690561-2-chris.packham@alliedtelesis.co.nz> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi-- On 2/25/24 13:34, Chris Packham wrote: > Add a driver for a 7 segment LED display. At the moment only one > character is supported but it should be possible to expand this to > support more characters and/or 14 segment displays in the future. > > Signed-off-by: Chris Packham > --- > drivers/auxdisplay/Kconfig | 7 ++ > drivers/auxdisplay/Makefile | 1 + > drivers/auxdisplay/seg-led.c | 152 +++++++++++++++++++++++++++++++++++ > 3 files changed, 160 insertions(+) > create mode 100644 drivers/auxdisplay/seg-led.c > > diff --git a/drivers/auxdisplay/Kconfig b/drivers/auxdisplay/Kconfig > index d944d5298eca..e826b5b15881 100644 > --- a/drivers/auxdisplay/Kconfig > +++ b/drivers/auxdisplay/Kconfig > @@ -197,6 +197,13 @@ config ARM_CHARLCD > line and the Linux version on the second line, but that's > still useful. > > +config SEG_LED > + bool "Generic 7 segment LED display" > + select LINEDISP > + help > + This driver supports a generic 7 segment LED display made up 7-segment > + of GPIO pins connected to the individual segments. > + > menuconfig PARPORT_PANEL > tristate "Parallel port LCD/Keypad Panel support" > depends on PARPORT > diff --git a/drivers/auxdisplay/Makefile b/drivers/auxdisplay/Makefile > index 6968ed4d3f0a..808fdf156bd5 100644 > --- a/drivers/auxdisplay/Makefile > +++ b/drivers/auxdisplay/Makefile > @@ -14,3 +14,4 @@ obj-$(CONFIG_HT16K33) += ht16k33.o > obj-$(CONFIG_PARPORT_PANEL) += panel.o > obj-$(CONFIG_LCD2S) += lcd2s.o > obj-$(CONFIG_LINEDISP) += line-display.o > +obj-$(CONFIG_SEG_LED) += seg-led.o > diff --git a/drivers/auxdisplay/seg-led.c b/drivers/auxdisplay/seg-led.c > new file mode 100644 > index 000000000000..c0b302a09cbb > --- /dev/null > +++ b/drivers/auxdisplay/seg-led.c > @@ -0,0 +1,152 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * Driver for a 7 segment LED display > + * > + * The GPIOs are wired to the 7 segments in a clock wise fashion starting from > + * the top. > + * > + * -a- > + * | | > + * f b > + * | | > + * -g- > + * | | > + * e c > + * | | > + * -d- > + * > + * The decimal point LED presnet on some devices is currently not present > + * supported. > + * > + * Copyright (C) Allied Telesis Labs > + */ -- #Randy