Re: [PATCH v3 9/9] auxdisplay: Add driver for MAX695x 7-segment LED controllers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 26, 2024 at 05:01:46PM +0100, Geert Uytterhoeven wrote:
> On Mon, Feb 19, 2024 at 6:03 PM Andy Shevchenko
> <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
> > Add initial driver for the MAX6958 and MAX6959 7-segment LED
> > controllers.

> LGTM, so
> Reviewed-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>

Thanks, but see below.

...

> > +       u8 buf[4];
> > +
> > +       /* Map segments according to datasheet */
> > +       buf[0] = bitrev8(map_to_seg7(&map->map.seg7, *s++)) >> 1;
> > +       buf[1] = bitrev8(map_to_seg7(&map->map.seg7, *s++)) >> 1;
> > +       buf[2] = bitrev8(map_to_seg7(&map->map.seg7, *s++)) >> 1;
> > +       buf[3] = bitrev8(map_to_seg7(&map->map.seg7, *s++)) >> 1;
> 
> for (unsigned int i = 0; i < linedisp->num_chars; i++) { ... }
> 
> > +
> > +       regmap_bulk_write(priv->regmap, REG_DIGIT(0), buf, ARRAY_SIZE(buf));
> 
> linedisp->num_chars

Maybe, but then we probably want to synchronize the 4 there and here as we
can't have VLA on stack.

> > +}

...

> > +       ret = linedisp_register(&priv->linedisp, dev, 4, &max6959_linedisp_ops);
> 
> + device_property_read_u32(dev, "display-width-chars", ...) handling.

Not sure it should be part of this series.

-- 
With Best Regards,
Andy Shevchenko






[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux