Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp609578rdb; Thu, 22 Feb 2024 13:42:52 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVXcdzTTdk9kEQvQaiKfAmAeDvxbmuG7/n0ydSuprsO9f382oD/WUXUeLH7MrdMXGjQ9nmbcLjGI0E6brRt6Gysx5T6dw8xYPYWtvItNA== X-Google-Smtp-Source: AGHT+IE4Ez2p3GXFBe0BkXeEuDvRbicW2DLDCTDkEuA0iEBE9RFpQX0n4/F2yZvJ8lyA5sKIb0Hu X-Received: by 2002:a05:6a20:d81a:b0:19c:7560:e7d6 with SMTP id iv26-20020a056a20d81a00b0019c7560e7d6mr200158pzb.1.1708638171788; Thu, 22 Feb 2024 13:42:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708638171; cv=pass; d=google.com; s=arc-20160816; b=nsneqWGbly8rVfVfeB2P3sjUUwtwFkoOQlieYHHioncNE/wf9PtLoCoC7alayOVf8p qJiRUB8c2JJ9A3Zft+SzRyauqbjtN6Z73c+0QGajkoAz7T77V752I0vuQMcrXCNZQtaO lbRMM7rZpkEzWCKdpdjYyCk6u0pcfPo2KLhI96NRUvryOGXpbaB10f7W0FL17q5vcmDb CNAo2EUmSuMULJDi+AqB6fqFBmqGXidXzk/mUr+0sNhE0LQGIedOCETVGbqEYC+9Xxx+ PnhX5UtN4vlLEuMVEo9BUfprVBib0BEqPXjS0P3Yg4nhnukt9UZ1TSgvJqgMVdpM0e3n DGxQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:date:from; bh=6KZGyE7M14Nas+uF6noKL3UZGGe8VehKHer2IhVD0ws=; fh=hu9rGoKqd8AQrdZRcj3QCwINwQVtXrT0dIjGWmJh4/Q=; b=WCd1xLqiZ30zotfPXI28Tvq5qXlFqx4xN6X22c7GwHeGCyKdgqRppeMEfw//9CfsIM hrFQmCjLOIS1p7bJ5u/TkCuaTKyEsTfi5qeK0zMCMmKUlYnvFu8/TKZvhdbzmO9fsQdS 7WeKwrdJc93A32nhG8azgC1fv0KZVMbdTUlnXbww/zckHRXvOz5x4PPmiTfFHNJ0Ng+X TGVuOg3zGWpmBqeNkFynO5+TORft/SCUjGaY9Iz1zU0/8i2kdxjKuDGHNrpJUhahRBTg 0Mb4nZ8k9XgGxpxZ4zPQZp4CDDjduopnNE2QnApyrbZ5ErsTk3StZfzxxj9KoS+8i6z4 gJLg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-77407-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77407-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id t24-20020a639558000000b005dc504e597csi10828513pgn.513.2024.02.22.13.42.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 13:42:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77407-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-77407-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77407-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 B744FB226C9 for ; Thu, 22 Feb 2024 21:34:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B5AB573F39; Thu, 22 Feb 2024 21:34:47 +0000 (UTC) Received: from fgw22-7.mail.saunalahti.fi (fgw22-7.mail.saunalahti.fi [62.142.5.83]) (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 9E47373F2A for ; Thu, 22 Feb 2024 21:34:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.142.5.83 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708637687; cv=none; b=cr9zusmgIMgN+twbqWns0vS0ZG1Q+wAd282KJggGGKUk7MoREfataeHHEdZzTguvQQTT5NmGSlo+LLh0NaezEHnsaA3xVAJk+zcio2Ja0SIunk8VWutUTepvFGpqIwQv2Y++ktqFzQNlz1R9KGABy0/8TrGxpLaqm2BllOQRT14= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708637687; c=relaxed/simple; bh=tVO/2wuamC42MHKdIDybSKJStcN68xMdf6hl3eu6sWo=; h=From:Date:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=R4OzKHVp/RqU8UxwjkUfQt445nexVY8vIHgtr8tynUtQDycVz2jONs4aArD4T1M2NSgK3vt1eR9ulKRsN81rqEFLVCYqIGdxrlIgixYylj07MtjFWzRITf1h1Tor/9n34I8mkeHXpnwozmGUzZ6JhZxK2HOq0MrwOVGvQMBn7vg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com; spf=fail smtp.mailfrom=gmail.com; arc=none smtp.client-ip=62.142.5.83 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=gmail.com Received: from localhost (88-113-26-217.elisa-laajakaista.fi [88.113.26.217]) by fgw22.mail.saunalahti.fi (Halon) with ESMTP id 2cbcaad4-d1ca-11ee-a9de-005056bdf889; Thu, 22 Feb 2024 23:34:36 +0200 (EET) From: andy.shevchenko@gmail.com Date: Thu, 22 Feb 2024 23:34:35 +0200 To: Chris Packham Cc: Pavel Machek , "lee@kernel.org" , "linux-leds@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: Linux support for a 7 segment LED display Message-ID: References: <1f598a72-dd9f-4c6c-af7f-29751f84bd23@alliedtelesis.co.nz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1f598a72-dd9f-4c6c-af7f-29751f84bd23@alliedtelesis.co.nz> Sun, Feb 11, 2024 at 08:46:12PM +0000, Chris Packham kirjoitti: > Hi Blinkenlight enthusiasts, > > I'm looking for something that I figured must exists but maybe it's so > niche that no-one has bothered to upstream a driver for it. > > I have a requirement to support a 7-segment LED display[1] (one that can > display a single digit from 0-9). Hardware wise it's just a bunch of > individual GPIOs connected to each segment (plus an extra one for a > dot). I can't see anything obvious in drivers/leds but maybe I'm looking > in the wrong place. Or maybe it's the kind of thing on PC hardware that > is just driven by the BIOS without the operating system knowing about it. > > Is there an existing in-kernel driver for such a thing? No, and can't be. Here is just a mapping table and other drivers that use 7-segment LED displays to be connected to. What you need is something else, i.e. special case of leds-gpio (which should be somewhere else) that does something like this. To me it sounds like a mixture between line-display.h (from auxdisplay) and gpio-aggregator. How many digits do you want to connect? How are they going to be connected (static display, or dynamic when you need to refresh in certain periods of time)? Depending on the answer it might take one or another approach. > [1] - https://www.kingbrightusa.com/images/catalog/SPEC/SA36-11GWA.pdf -- With Best Regards, Andy Shevchenko