[PATCH v2 00/15] auxdisplay: linedisp: Clean up and add new driver

Andy Shevchenko posted 15 patches 1 year, 10 months ago
There is a newer version of this series
.../bindings/auxdisplay/maxim,max6959.yaml    |  35 +++
drivers/auxdisplay/Kconfig                    |  40 ++--
drivers/auxdisplay/Makefile                   |  13 +-
drivers/auxdisplay/ht16k33.c                  | 145 +++++--------
drivers/auxdisplay/img-ascii-lcd.c            |  24 ++-
drivers/auxdisplay/line-display.c             | 162 ++++++++++++--
drivers/auxdisplay/line-display.h             |  57 ++++-
drivers/auxdisplay/max6959.c                  | 200 ++++++++++++++++++
8 files changed, 530 insertions(+), 146 deletions(-)
create mode 100644 Documentation/devicetree/bindings/auxdisplay/maxim,max6959.yaml
create mode 100644 drivers/auxdisplay/max6959.c
[PATCH v2 00/15] auxdisplay: linedisp: Clean up and add new driver
Posted by Andy Shevchenko 1 year, 10 months ago
Add a new initial driver for Maxim MAX6958/6959 chips.
While developing that driver I realised that there is a lot
of duplication between ht16k33 and a new one. Hence set of
cleanups and refactorings.

Note, the new driver has minimum support of the hardware and
I have plans to cover more features in the future.

In v2:
- updated DT bindings to follow specifications and requirements (Krzysztof)
- unified return code variable (err everywhere)
- left patches 10 and 13 untouched, we may amend later on (Robin)

Andy Shevchenko (15):
  auxdisplay: img-ascii-lcd: Make container_of() no-op for struct
    linedisp
  auxdisplay: linedisp: Free allocated resources in ->release()
  auxdisplay: linedisp: Use unique number for id
  auxdisplay: linedisp: Unshadow error codes in ->store()
  auxdisplay: linedisp: Add missing header(s)
  auxdisplay: linedisp: Move exported symbols to a namespace
  auxdisplay: linedisp: Group line display drivers together
  auxdisplay: linedisp: Provide struct linedisp_ops for future extension
  auxdisplay: linedisp: Add support for overriding character mapping
  auxdisplay: linedisp: Provide a small buffer in the struct linedisp
  auxdisplay: ht16k33: Move ht16k33_linedisp_ops down
  auxdisplay: ht16k33: Switch to use line display character mapping
  auxdisplay: ht16k33: Use buffer from struct linedisp
  dt-bindings: auxdisplay: Add Maxim MAX6958/6959
  auxdisplay: Add driver for MAX695x 7-segment LED controllers

 .../bindings/auxdisplay/maxim,max6959.yaml    |  35 +++
 drivers/auxdisplay/Kconfig                    |  40 ++--
 drivers/auxdisplay/Makefile                   |  13 +-
 drivers/auxdisplay/ht16k33.c                  | 145 +++++--------
 drivers/auxdisplay/img-ascii-lcd.c            |  24 ++-
 drivers/auxdisplay/line-display.c             | 162 ++++++++++++--
 drivers/auxdisplay/line-display.h             |  57 ++++-
 drivers/auxdisplay/max6959.c                  | 200 ++++++++++++++++++
 8 files changed, 530 insertions(+), 146 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/auxdisplay/maxim,max6959.yaml
 create mode 100644 drivers/auxdisplay/max6959.c

-- 
2.43.0.rc1.1.gbec44491f096
Re: [PATCH v2 00/15] auxdisplay: linedisp: Clean up and add new driver
Posted by Andy Shevchenko 1 year, 10 months ago
On Mon, Feb 12, 2024 at 07:01:33PM +0200, Andy Shevchenko wrote:
> Add a new initial driver for Maxim MAX6958/6959 chips.
> While developing that driver I realised that there is a lot
> of duplication between ht16k33 and a new one. Hence set of
> cleanups and refactorings.
> 
> Note, the new driver has minimum support of the hardware and
> I have plans to cover more features in the future.
> 
> In v2:
> - updated DT bindings to follow specifications and requirements (Krzysztof)
> - unified return code variable (err everywhere)
> - left patches 10 and 13 untouched, we may amend later on (Robin)

Geert, I would like to apply at least the first 13 patches.
Do you have any comments or even possibility to perform a regression test?

-- 
With Best Regards,
Andy Shevchenko
Re: [PATCH v2 00/15] auxdisplay: linedisp: Clean up and add new driver
Posted by Geert Uytterhoeven 1 year, 10 months ago
Hi Andy,

On Wed, Feb 14, 2024 at 6:57 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> On Mon, Feb 12, 2024 at 07:01:33PM +0200, Andy Shevchenko wrote:
> > Add a new initial driver for Maxim MAX6958/6959 chips.
> > While developing that driver I realised that there is a lot
> > of duplication between ht16k33 and a new one. Hence set of
> > cleanups and refactorings.
> >
> > Note, the new driver has minimum support of the hardware and
> > I have plans to cover more features in the future.
> >
> > In v2:
> > - updated DT bindings to follow specifications and requirements (Krzysztof)
> > - unified return code variable (err everywhere)
> > - left patches 10 and 13 untouched, we may amend later on (Robin)
>
> Geert, I would like to apply at least the first 13 patches.
> Do you have any comments or even possibility to perform a regression test?

I'll try to give it a try on my Adafruit Quad 14-segment display tomorrow...

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-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
Re: [PATCH v2 00/15] auxdisplay: linedisp: Clean up and add new driver
Posted by Geert Uytterhoeven 1 year, 10 months ago
Hi Andy,

On Wed, Feb 14, 2024 at 7:45 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Wed, Feb 14, 2024 at 6:57 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> > On Mon, Feb 12, 2024 at 07:01:33PM +0200, Andy Shevchenko wrote:
> > > Add a new initial driver for Maxim MAX6958/6959 chips.
> > > While developing that driver I realised that there is a lot
> > > of duplication between ht16k33 and a new one. Hence set of
> > > cleanups and refactorings.
> > >
> > > Note, the new driver has minimum support of the hardware and
> > > I have plans to cover more features in the future.
> > >
> > > In v2:
> > > - updated DT bindings to follow specifications and requirements (Krzysztof)
> > > - unified return code variable (err everywhere)
> > > - left patches 10 and 13 untouched, we may amend later on (Robin)
> >
> > Geert, I would like to apply at least the first 13 patches.
> > Do you have any comments or even possibility to perform a regression test?
>
> I'll try to give it a try on my Adafruit Quad 14-segment display tomorrow...

With the missing return-statement added, the ht16k33 driver builds
and works fine: the kernel version is happily scrolling by.
I didn't test userspace line display control, as there is an issue
with the uSD interface on my OrangeCrab, preventing it from booting
into userspace.

Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-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
Re: [PATCH v2 00/15] auxdisplay: linedisp: Clean up and add new driver
Posted by Andy Shevchenko 1 year, 10 months ago
On Thu, Feb 15, 2024 at 12:05:37PM +0100, Geert Uytterhoeven wrote:
> On Wed, Feb 14, 2024 at 7:45 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > On Wed, Feb 14, 2024 at 6:57 PM Andy Shevchenko
> > <andriy.shevchenko@linux.intel.com> wrote:
> > > On Mon, Feb 12, 2024 at 07:01:33PM +0200, Andy Shevchenko wrote:
> > > > Add a new initial driver for Maxim MAX6958/6959 chips.
> > > > While developing that driver I realised that there is a lot
> > > > of duplication between ht16k33 and a new one. Hence set of
> > > > cleanups and refactorings.
> > > >
> > > > Note, the new driver has minimum support of the hardware and
> > > > I have plans to cover more features in the future.
> > > >
> > > > In v2:
> > > > - updated DT bindings to follow specifications and requirements (Krzysztof)
> > > > - unified return code variable (err everywhere)
> > > > - left patches 10 and 13 untouched, we may amend later on (Robin)
> > >
> > > Geert, I would like to apply at least the first 13 patches.
> > > Do you have any comments or even possibility to perform a regression test?
> >
> > I'll try to give it a try on my Adafruit Quad 14-segment display tomorrow...
> 
> With the missing return-statement added, the ht16k33 driver builds
> and works fine: the kernel version is happily scrolling by.
> I didn't test userspace line display control, as there is an issue
> with the uSD interface on my OrangeCrab, preventing it from booting
> into userspace.
> 
> Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>

Thank you!

So far I have applied patches 1-6,8-9 with the respective suggestions
implemented.

-- 
With Best Regards,
Andy Shevchenko


Re: [PATCH v2 00/15] auxdisplay: linedisp: Clean up and add new driver
Posted by Andy Shevchenko 1 year, 10 months ago
On Wed, Feb 14, 2024 at 07:45:01PM +0100, Geert Uytterhoeven wrote:
> On Wed, Feb 14, 2024 at 6:57 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> > On Mon, Feb 12, 2024 at 07:01:33PM +0200, Andy Shevchenko wrote:

...

> > Geert, I would like to apply at least the first 13 patches.
> > Do you have any comments or even possibility to perform a regression test?
> 
> I'll try to give it a try on my Adafruit Quad 14-segment display tomorrow...

Thank you!

-- 
With Best Regards,
Andy Shevchenko