Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4559136pxf; Tue, 23 Mar 2021 13:43:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyA+0Oo351ixUkWpidc+wtvEnt+IvyGKDg2bxzFZ/onOAXmXre6ckrmjb2dOPiYUniP0N7H X-Received: by 2002:a05:6402:1855:: with SMTP id v21mr6426360edy.310.1616532226285; Tue, 23 Mar 2021 13:43:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616532226; cv=none; d=google.com; s=arc-20160816; b=ixoa4UWn2OyGmtkzEQarmQXETuOYocl4x2YGUTwVJ02JmkFYDSYkD8HXkseikZ6ajp eO4/pDA98AZT1SKcIRfBrVNXbg36YkB1iZDv0s/HodsagbbsCQIxYFnDtqzZ8fAXwbYe mXGTuKKqP9tOYDpSrhy3Yj+shdX6NFvSI56Ng8y5/gPJpluVapUBkgEA44jQrGa0biF/ tJ06YqseG8B5JXCkDwOIbWdG3qOj6f594jMOfGcHVEQiq6WCCRhW8aEkfDqgAiXj2z6r CXDkYDYeyPP+D0QneFCq6mCr/kM8FKcFPA4gMjqhyvzMkMO0eGurwrkD+XxHYkORNsry xT6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=e5WuD+ooAO5eq33jrxFAEWaMaRSvGZH8UCqb0/F+Ir4=; b=vh/uOvmpuKrotfAH+F4YGr5/lbTjnwnUIYF+JaVbq0poIBtHdGMrEljQaNvb03Cz2k +z4HVTHTsXnkPgvEzdbOMIDS3EDQxmqRhh2ZP9XjEzW4CrPWgbhEvMMSrjq4OIHqGc0t x5LWd3BgQbR9dcxta8p64yQFq59f98F6z/WJVdmGGuv1JhPUfx3s5gtS+pXC3Wxmiw2T CpgroFjXFmHPtRuy8N/7TTWLlNGBbFh8jefNbMcF3f1f5DgFOOYeL75ShuPmQyopW+16 YowRpyl35AQPmFRXo2JByT1mRz5/qtZL4eOdWJYpF26B21s7+FLXNtCMjAGlZq62s7YQ 5zfQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b8si91399edz.99.2021.03.23.13.43.22; Tue, 23 Mar 2021 13:43:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233746AbhCWUld (ORCPT + 99 others); Tue, 23 Mar 2021 16:41:33 -0400 Received: from jabberwock.ucw.cz ([46.255.230.98]:53058 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233518AbhCWUkm (ORCPT ); Tue, 23 Mar 2021 16:40:42 -0400 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 082FF1C0B81; Tue, 23 Mar 2021 21:40:39 +0100 (CET) Date: Tue, 23 Mar 2021 21:40:38 +0100 From: Pavel Machek To: Geert Uytterhoeven Cc: Robin van der Gracht , Rob Herring , Miguel Ojeda , Paul Burton , Greg Kroah-Hartman , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "open list:BROADCOM NVRAM DRIVER" , Linux Kernel Mailing List , linux-leds , Dan Murphy Subject: Re: [PATCH 17/17] auxdisplay: ht16k33: Add segment display LED support Message-ID: <20210323204038.GA10002@duo.ucw.cz> References: <20210322144848.1065067-1-geert@linux-m68k.org> <20210322144848.1065067-18-geert@linux-m68k.org> <543ec200931af3192541fef51bc8e96a@protonic.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OgqxwSJOaUobr8KG" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --OgqxwSJOaUobr8KG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > CC linux-leds (which I intended, but forgot to add) >=20 > cover letter at > https://lore.kernel.org/linux-devicetree/20210322144848.1065067-1-geert@l= inux-m68k.org/ Still does not tell me... riscv on fpga with 4 character display. What is this? :-). > On Tue, Mar 23, 2021 at 11:08 AM Robin van der Gracht = wrote: > > > > On 2021-03-22 15:48, Geert Uytterhoeven wrote: > > > Instantiate a single LED for a segment display. This allows the user > > > to > > > control display brightness and blinking through the LED class API and > > > triggers, and exposes the display color. > > > > > > Signed-off-by: Geert Uytterhoeven > > > --- > > > For setting display brightness, this could use the existing backlight > > > support for frame buffer devices instantiated for dot-matrix displays. > > > However, using the leds subsystem instead has the advantage that the > > > driver can make use of the HT16K33's hardware blinking support, and c= an > > > expose the display color. We have multicolor support now... > > > - err =3D ht16k33_brightness_set(priv, MAX_BRIGHTNESS); > > > + of_property_read_u32(node, "color", &color); > > > + seg->led.name =3D devm_kasprintf(dev, GFP_KERNEL, > > > + DRIVER_NAME ":%s:" LED_FUNCTION_BACKLIGHT, > > > + color < LED_COLOR_ID_MAX ? led_colors[color] : = ""); And would prefer not to see driver_name as part of LED name. > > > + err =3D ht16k33_brightness_set(priv, seg->led.brightness); > > > if (err) > > > return err; > > > > The LED class can pretty much do what the backlight class can and more. > > > > Maybe we can stop registering a backlight device in the fbdev case and > > register a led device for both. This makes the code cleaner and drops > > a dependency but will break backwards compatibility. > > > > I'd prefer a single solution that covers both use cases, but I'm not > > sure about the 'breaking backwards compatibility' consequence... For new drivers, breaking compatibility should not be a problem. Best regards, Pavel --=20 http://www.livejournal.com/~pavelmachek --OgqxwSJOaUobr8KG Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCYFpSRgAKCRAw5/Bqldv6 8gx1AJ9DrhY+6jZ2APCdwgx/TBVkD/BG/QCfZ9Mg2jmE6B1ZET6bJceiU04bD7g= =7qmH -----END PGP SIGNATURE----- --OgqxwSJOaUobr8KG--