[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdWpepH0P8g9dPfq1rsZRJsvOnoZ7VnjqTL9nkSGtKFpYQ@mail.gmail.com>
Date: Mon, 26 Feb 2024 17:01:46 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, Andy Shevchenko <andy@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>, Conor Dooley <conor+dt@...nel.org>,
Robin van der Gracht <robin@...tonic.nl>, Paul Burton <paulburton@...nel.org>
Subject: Re: [PATCH v3 9/9] auxdisplay: Add driver for MAX695x 7-segment LED controllers
Hi Andy,
On Mon, Feb 19, 2024 at 6:03 PM Andy Shevchenko
<andriy.shevchenko@...ux.intel.com> wrote:
> Add initial driver for the MAX6958 and MAX6959 7-segment LED
> controllers.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Thanks for your patch!
LGTM, so
Reviewed-by: Geert Uytterhoeven <geert@...ux-m68k.org>
> --- /dev/null
> +++ b/drivers/auxdisplay/max6959.c
> +static void max6959_disp_update(struct work_struct *work)
> +{
> + struct max6959_priv *priv = container_of(work, struct max6959_priv, work.work);
> + struct linedisp *linedisp = &priv->linedisp;
> + struct linedisp_map *map = linedisp->map;
> + char *s = linedisp->buf;
> + 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
> +}
> +static int max6959_i2c_probe(struct i2c_client *client)
> +{
> + struct device *dev = &client->dev;
> + struct max6959_priv *priv;
> + int ret;
> +
> + priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
> + if (!priv)
> + return -ENOMEM;
> +
> + priv->regmap = devm_regmap_init_i2c(client, &max6959_regmap_config);
> + if (IS_ERR(priv->regmap))
> + return PTR_ERR(priv->regmap);
> +
> + ret = max6959_power_on(priv);
> + if (ret)
> + return ret;
> +
> + ret = linedisp_register(&priv->linedisp, dev, 4, &max6959_linedisp_ops);
+ device_property_read_u32(dev, "display-width-chars", ...) handling.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68korg
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