Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1914131rbb; Tue, 27 Feb 2024 05:26:30 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXq1cHw1ck5C2LeQ2hs8rI7Mtxd/i1y3GVqnl3bFM2LWwwTrfsVTvECgvDrpH/MZqkYzjuuqIWF906Ce8FF6/AtXbAgkf6DnVNHvVwBug== X-Google-Smtp-Source: AGHT+IFXIinINxO5LXoEHurxTqq5a0pC1HH/DoclQ9LnXXwJtMw+BHikd/4gBKvQXBDWg40oMVXw X-Received: by 2002:a05:6a21:1394:b0:1a1:e94:3d83 with SMTP id oa20-20020a056a21139400b001a10e943d83mr1538514pzb.40.1709040390708; Tue, 27 Feb 2024 05:26:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709040390; cv=pass; d=google.com; s=arc-20160816; b=BPPtcK/6Bn1K0q5Hi9YfFtCVnLRrULNP93gisdPnypCggI3llhO20d4jUL6O8Je3LG IERW9ynxbK0kuOcXd/k8NsWZqcdXt82Q7lp4LGEG2NsHzmhtcgvoWEnyFsiuqETALylJ Ko5U3wTINztLVpvdzWWepCEc3Vfizae+a4TIvmelGjGkUOSHUpoA+QNeZXIWgUpn7i/P qvxhN7TvIB/1KqPueMYoyIhO7ot+PfJKvavCK3TxShYEcFwUDbsvrrCMk+bfDPdq+b2n fCldsYpEHX0B5naBzoh8feWCYT+rQaaoH1R4Svsx8/bJKiAt/Y1xECVjiWmIge0LVmSO 0GFg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=UikzpkujjXwCtreWrXfmmEcvmx/a1ETRiTxhijrjC1Y=; fh=7F2I99YGeLKUe4Q/nnSkNnM7EKxMMaI09S9/wYkkHqc=; b=ppBXTqwVIrlcJPWjQAO/MwXjletPfEmhh+lQ5VK/9j6Gf94z329XMgWbRazPxJww/T IU708H6eEJG6ex681yCW/9Q3Jvy9BAcO7WEhWiQ5WcW6ys8gik2KtgwaN/bL4w4vMaY4 L5E00iAUeVvxmDoRtDtGhbd3+zuDUTTXSrRniPY4qbFrIhgBQbrgEhE3M7f8FuYsD5RV Yf9RIyAuXaK4FwxNjqfdbF+/k6AQYg26SatdZbff2fXlLWYBaYAZZG4yYPTo7wpgeaST pKLuTE1kEuNSOmtlPGPdcqs6gNQqkWjRqnNX2n4sKZE/JFWce6B2QYWqCgFzG9rDaShe ZWkw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=WmB6Myd9; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-83276-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83276-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id q141-20020a632a93000000b005dc4e7d879csi5530238pgq.66.2024.02.27.05.26.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 05:26:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-83276-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=@gmail.com header.s=20230601 header.b=WmB6Myd9; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-83276-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83276-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (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 sv.mirrors.kernel.org (Postfix) with ESMTPS id E9DDF28E4D1 for ; Tue, 27 Feb 2024 13:01:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6F7D313AA44; Tue, 27 Feb 2024 13:01:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WmB6Myd9" Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5DE2C2F2D; Tue, 27 Feb 2024 13:01:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709038898; cv=none; b=EI8EV8h4L8Xh/nuOgyWq7El0sujSj2Vo3vf7dJuBx4xLOI1U0pI+2GJj/1Svj408BD5bwj+UwWZ/3WVLm16Fco6wCz8UCyGkeR9rjBSadmD6TedwDYiXIAQTYIwbwDZlHJjy/xQsck/pJ/8sdMUHAdn9ex8ZHkUXGPYySe2sOpc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709038898; c=relaxed/simple; bh=hVPtSdJtYddAG+EIclbX7xD+HPT6FRQSRfWO26yzzGA=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Content-Type; b=eTeQU7zY0XQj2YkzFxUR0qOOq1cHSHTSg4ArrQFgVzFGXNDg8gxsQlxbi2WjEk4V1kX5ih+qNPIjk6oRfE31ev+18zaDTKYHqtxiftuSA4268WVK0Qpj6LE387mQFJa2ZmjfOAHum+DXEJ8L6d13JJJo1XTAdo1U7xJwhf9s9uw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=WmB6Myd9; arc=none smtp.client-ip=209.85.218.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f42.google.com with SMTP id a640c23a62f3a-a3f893ad5f4so603076166b.2; Tue, 27 Feb 2024 05:01:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709038895; x=1709643695; darn=vger.kernel.org; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=UikzpkujjXwCtreWrXfmmEcvmx/a1ETRiTxhijrjC1Y=; b=WmB6Myd9gQ+wtlgDVse3Rtv19VyY9RF9oPksLHlmw44u9wke31zPi63wJYnwg2X6IM aPxac8Im3X7UnmZB71cqjvsH8g8JS6vPT1QPJ3LcZ4Cdk8ydxzL+/72QFY3fXKEqCBul IIj6n5jQLvXAn82+o69mCtW47QUMlKnxGVY+7PP4rkJlU9Ek6Rscxj0nIXkeXQ56bUzl I3crMTTKa5++qWuePOwEknlN2p+rk0Hk6C38L5Z6UjiPdCGsxUZ4Yd18a1KF+GRRpSkA MvHaLs43MvBpLnuxF0RnveJUwtmbdgOtfipsDRQXEOLyHtBiEfjzxeqsvXiHuyqna/AS ZaXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709038895; x=1709643695; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UikzpkujjXwCtreWrXfmmEcvmx/a1ETRiTxhijrjC1Y=; b=NKvzdGC+xHDxsxeVkz6bMP+ce1CskrPQOb8dDkZ3uBsFyJtK3AZd3r8vjFm+ivdQz0 d49Uwfde+euqR9OlryejXaJjdZuoh8Hm5cz8J1f4JQUyoqMowxhBMRLVzObqpSawlfc7 QRVK5iRzWgnB7xMXyNW/QRD/+zMPpGDmuEUUW/blEAh6pb83ArmPqn7Fdc7N0Vz8ZErL Kbx2cwcYhyuuMurPSHhm5b3OrcGX31BsQpMw8YWKXTrK9xeZnTkDUjyWsk6TjJZ5Kq81 MdydKoiVVr/IQcWIfvI4pokEMkThn27A/GZZlyz0WEMo93WAtxDej6xFuvmu8hwHGpyg FskQ== X-Forwarded-Encrypted: i=1; AJvYcCVoRU9F1Le0Dq2n/6RIGQUQECCZociqVyJpzP2+HO2IVyLpZy4WcBAuQvT2pKGcBUadoh2RsDTgKHtdyz9YSeqMDycWKRAaErt59H+CUdnrTKBghR3eEIwFWwjbYRM1ToWfXoJ40vUD+sO58iDGEAZNejKqAFMZe2cAcpi754lSrxzcJ10= X-Gm-Message-State: AOJu0YzJwMBEtajklC7qnwEN6gHQnnP7dV8e4lQb9GVXuFiOejyZPg/R sP8tZbvCSsaVMb0WbDHzISOFmAo6Db2Z3OSFuuvP27Qg5H0fMcSA37ryjl1QdqK83tfc3Fnu36G jIugmtzHKhOnSDo90d3Zq3CChpS0= X-Received: by 2002:a17:906:1b43:b0:a3f:1c10:5a63 with SMTP id p3-20020a1709061b4300b00a3f1c105a63mr6925228ejg.38.1709038894414; Tue, 27 Feb 2024 05:01:34 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240225213423.690561-1-chris.packham@alliedtelesis.co.nz> <20240226-scabby-fiber-87d5d6e45028@thorsis.com> <20240227-married-amulet-da532c0a70d3@thorsis.com> In-Reply-To: <20240227-married-amulet-da532c0a70d3@thorsis.com> From: Andy Shevchenko Date: Tue, 27 Feb 2024 15:00:58 +0200 Message-ID: Subject: Re: [PATCH 0/3] auxdisplay: 7 segment LED display 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" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-leds@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Feb 27, 2024 at 10:43=E2=80=AFAM Alexander Dahl w= rote: > Am Mon, Feb 26, 2024 at 08:10:07PM +0000 schrieb Chris Packham: > > On 27/02/24 05:04, Alexander Dahl wrote: > > > Am Mon, Feb 26, 2024 at 10:34:20AM +1300 schrieb Chris Packham: > > >> This series adds a driver for a 7 segment LED display. > > >> > > >> I'd like to get some feedback on how this could be extended to suppo= rt >1 > > >> character. The driver as presented is sufficient for my hardware whi= ch only has > > >> a single character display but I can see that for this to be generic= ally useful > > >> supporting more characters would be desireable. > > >> > > >> Earlier I posted an idea that the characters could be represended by > > >> sub-nodes[1] but there doesn't seem to be a way of having that and k= eeping the > > >> convenience of using devm_gpiod_get_array() (unless I've missed some= thing). > > >> > > >> [1] - https://scanmail.trustwave.com/?c=3D20988&d=3Dtrbc5eARVo-5gepR= nwbAKbQmiGk1bOSpqZDQx9bx7w&u=3Dhttps%3a%2f%2flore%2ekernel%2eorg%2flkml%2f2= a8d19ee-b18b-4b7c-869f-7d601cea30b6%40alliedtelesis%2eco%2enz%2f > > > Read that thread out of curiosity and I'm sorry if I'm late to the > > > party, but I wondered why this is limited to LEDs connected to GPIOs? > > > > > > Would it be possible to somehow stack this on top of some existing > > > LEDs? I mean you could wire a 7 segment device to almost any LED > > > driver IC with enough channels, couldn't you? > > > > Mainly because the GPIO version is the hardware I have. I do wonder how > > this might work with something like the pca9551 which really is just a > > fancy version of the pca9554 on my board. A naive implementation would > > be to configure all the pca9551 pins as GPIOs and use what I have as-is= . > > My idea was to do it on top of the LED abstraction, not on top of the > GPIO abstraction. Currently you are using the GPIO consumer interface > and group 7 gpios which are supplied by that pca9554 in your case, but > could also be coming from a SoC or a 74hc595 etc. > > Why not put it a level of abstraction higher, and let it consume LEDs > instead of GPIOs? Your usecase would still be possible then. > > As far as I could see the concept of a LED consumer can be done, the > leds-group-multicolor driver in > drivers/leds/rgb/leds-group-multicolor.c does that, introduced with > kernel v6.6 not so long ago. It sets the sysfs entries of the LEDs > part of the group to readonly so they are not usable on their own > anymore and one would not disturb the grouped multicolor LED. > > This would allow to use LEDs as a 7 segment group driven by any LED > driver including leds-gpio. 7-segment LEDs are not just a bunch of leds, they have explicit meaning and using LED infrastructure is an obscuration of what's going on (too many unrelated details are exposed, too hard to achieve what user needs). In the auxdisplay we have already the concept of "line display" with a 7-segment, or 14 (that are two main standards) with respective character mapping in case somebody wants to print more than hexadecimal digits on them. If I am mistaken, I would like to see the concept in the example here on how user space will take care of displaying (an arbitrary) data. Can you provide a draft of (user-side) documentation before we even start going this direction? > > Making a line display out of LED triggers might be another way of doing > > it but not something I really want to pursue. > > Fair enough. I just wanted to share my idea. Didn't want to pressure > you in any direction. :-) --=20 With Best Regards, Andy Shevchenko