[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdVF30BCA-7vCiwmKO6KVFhtNLbL+VEW59oxcAfwJ+jXyg@mail.gmail.com>
Date: Wed, 24 Mar 2021 09:31:13 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Pavel Machek <pavel@....cz>
Cc: Robin van der Gracht <robin@...tonic.nl>,
Rob Herring <robh+dt@...nel.org>,
Miguel Ojeda <ojeda@...nel.org>,
Paul Burton <paulburton@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@...r.kernel.org>,
"open list:BROADCOM NVRAM DRIVER" <linux-mips@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-leds <linux-leds@...r.kernel.org>,
Dan Murphy <dmurphy@...com>
Subject: Re: [PATCH 17/17] auxdisplay: ht16k33: Add segment display LED support
Hi Pavel,
On Tue, Mar 23, 2021 at 9:40 PM Pavel Machek <pavel@....cz> wrote:
> > CC linux-leds (which I intended, but forgot to add)
> >
> > cover letter at
> > https://lore.kernel.org/linux-devicetree/20210322144848.1065067-1-geert@linux-m68k.org/
>
> Still does not tell me... riscv on fpga with 4 character display. What
> is this? :-).
https://gregdavill.github.io/OrangeCrab/r0.2/
https://github.com/litex-hub/linux-on-litex-vexriscv
https://www.adafruit.com/product/3130
> > On Tue, Mar 23, 2021 at 11:08 AM Robin van der Gracht <robin@...tonic.nl> 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 <geert@...ux-m68k.org>
> > > > ---
> > > > 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 can
> > > > expose the display color.
>
> We have multicolor support now...
The color is fixed by the LED color, so there is no need for multicolor
(yet, one day someone might connect RGB 7-segment LED displays
(https://www.rgbdigit.com/rgbdigit/ ;-)
> > > > - err = ht16k33_brightness_set(priv, MAX_BRIGHTNESS);
> > > > + of_property_read_u32(node, "color", &color);
> > > > + seg->led.name = 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.
OK. So what should I use instead? Or just leave the part before the
first colon empty?
> > > > + err = 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.
The dot-matrix support is part of the existing driver, thus subject to
backwards compatibility.
Perhaps we can register the LED device for both, and build the backlight
device on top of the LED device, like "led-backlight" does. Would that
work? Or can't the LED no longer be controlled from sysfs (e.g.
triggers) if it is in use by a backlight driver?
Thanks!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists