Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1590257rdb; Tue, 20 Feb 2024 00:19:05 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXFPDr38scVApInn+GpPXlyG8hN/p7mRpFjFAe4ZpVvBoeXXxCEzYW0KJdY4WL6arrxAMDnlUMFUwSzEfo6phyqqPxSAYtsbHJRvg0t4A== X-Google-Smtp-Source: AGHT+IHPoGKAt22B6vILXHjPdLZjlOStn8fZfmLfItt6V/jDoQ2stGsBpCWR/xcYqSUPHmCtYUQA X-Received: by 2002:a17:906:a389:b0:a3e:f257:d744 with SMTP id k9-20020a170906a38900b00a3ef257d744mr842835ejz.28.1708417144955; Tue, 20 Feb 2024 00:19:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708417144; cv=pass; d=google.com; s=arc-20160816; b=WWljsOb3LClWaThujwKRYgGStrGkvNDie8pe0ddMLTynJ8kU4K5+9bo395Kl+iHGmC noALZja35q2DpYFZrqISSvF/KpPerZ/fT+qdnVMJmGy3MvC5LMy/3wqES34d+/IB0xck 9TcWT7hZzMvTzLvZzB/IZ6gEyVr18hiDITUQSm/OWbg1Nh8Fg+bGd4LPaERGyVveQVh0 mR+bGbx2an+d9zWAsOqkIaA20K5KvoXEHSo8660ZKOn68JKI8DGmVeMmD6TKGooGmO3f vWv/vBDdBlBw+3XHnCmvV1/0vi/li9Ht3F4YWfUfbKv0XWtc5kCjA4MxHUSkxjeEQ+cm ef8w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Bd6sIrGAAjdRm5ADSxY1xfOrAQhih/cRsDRQBZoVXuA=; fh=alvO7ULsp4B9ryP7CrHIY82rqR9YRS7khhrfFuClmbM=; b=Ky+HIOqvRDHEPR5NuWl8O+o8pXR84LEXtERLrLvUHstNmphPNVe8pkLL1meezb2Ww1 7dssKcMJF49XfkNZsHfOCDFeT1G+zUHb3N58Nt43pDSnfLzY/yVQOF7odIGcmWZpXFXf 2/BFgah5cGyzjUxREbemX3lZV1aRS6lxv2/XPJMIWPBD+aXQvT+5rxTxRF3+HJw+Z4Km 0GpjtPm1cLsDD7rRAG9lwtR3/xrBQuRDY3UhH2oRZ+hwYh41eAM4gNdBO8OzFTdblo6P 32Rb5rpFl15waj5y7d8sD0M159sNz+sD7aRk0DWJoDHLmkHmuubC3Ee4XasXF0CXJ8AX UGcA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VETVhiUG; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-72527-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72527-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id qk36-20020a1709077fa400b00a3e7028c6dcsi2137791ejc.837.2024.02.20.00.19.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 00:19:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-72527-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=@kernel.org header.s=k20201202 header.b=VETVhiUG; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-72527-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72527-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 am.mirrors.kernel.org (Postfix) with ESMTPS id B241A1F217AC for ; Tue, 20 Feb 2024 08:19:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 321B25C908; Tue, 20 Feb 2024 08:18:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="VETVhiUG" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 59CEA5C61E; Tue, 20 Feb 2024 08:18:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708417127; cv=none; b=Fzs+LPCUaWowqzeZ05vQHWKuvV+WLSQOChCfpWBxP6ngkX8YPWtzR4ZeFtQouFqY6GEeskPxdVIsdiyUddIjhNOZALGOlYsgUN/hbxr98sRsRop3RCFyCt/H/9FB1DYRM//Jy5CicbwTckrGS0reN7KMlb5qR5HpGjZCGgOrpdE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708417127; c=relaxed/simple; bh=UNLQOif7fmJJax3E38KDrW05Mmzsmh0eEm1H+yPRIs8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=BwiSsw1Kk42QAjnP1MYhf4BI4gzDZldrbPFgHZoTb1+8zoZQgEY/EUr8ffMynxv5CwQohhefaPVrPdw1hi7WaCREtPU84Fsg3R7H6OmBjjGGKKAMf76DHufNKDRDfiZnx+eCgURqBci8Mwk+Bah+r3tmcxNjEE1EIoV+1OU8SZE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=VETVhiUG; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C8EC3C43394; Tue, 20 Feb 2024 08:18:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708417126; bh=UNLQOif7fmJJax3E38KDrW05Mmzsmh0eEm1H+yPRIs8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VETVhiUGk0LAIW8FX4/ARlQCdMTKPauZb6sd6xroDdUJiMZ5owDNy6DvLy0DlYnRC XtWovxU3+Ad1/CaShkFWqIdIJjXEUH18YTvsXhFm8P9eVcb5Kze4odIY8GsqWTDAt8 p0PsBSrBxaO1ZiQFJZtM3pf0AzOsc1g1TGrFUX5O227tlDFuJvc6Aup9SeTUeP36Nf W1N4+xW3gv9Kos5MDs2e0Q+nsbr8uo5Oi614+OgcWYV1vN3zET2mhQWFCy2ei0/ao3 +evBV35HQ98qvFdWCV0Ubcn4pvxOzmcTMGqwGoOaNJgckKw77Brjov4ZTaHjiHi5oe AQvRd9Y1pQ6/Q== Date: Tue, 20 Feb 2024 08:18:42 +0000 From: Lee Jones To: Chris Packham Cc: Pavel Machek , "linux-leds@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: Linux support for a 7 segment LED display Message-ID: <20240220081842.GF10170@google.com> References: <1f598a72-dd9f-4c6c-af7f-29751f84bd23@alliedtelesis.co.nz> <20240219151332.GC10170@google.com> 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Mon, 19 Feb 2024, Chris Packham wrote: > Hi Lee, > > On 20/02/24 04:13, Lee Jones wrote: > > On Sun, 11 Feb 2024, Chris Packham wrote: > > > >> 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? > > Why would LEDs connected to a bunch of GPIOs in a specific fashion > > require a hardware driver? Doesn't drivers/leds/leds-gpio.c already > > provide all the support you need? > Yes I could expose the individual segments as gpio-ledsbut it would be > nicer if they worked in a more co-ordinated fashion so I didn't have to > care about the individual segments and could just say "display 7" or > "display 0". Still not sure this sort of thing should be kernel-side. Sounds more like the role of a library or middle-layer. -- Lee Jones [李琼斯]