From: Pavel Machek <pavel@ucw.cz>
To: Jean-Jacques Hiblot <jjhiblot@traphandler.com>
Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
andy.shevchenko@gmail.com, linux-leds@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RESEND PATCH v6 2/3] leds: Add driver for the TLC5925 LED controller
Date: Sat, 30 Jul 2022 23:27:09 +0200 [thread overview]
Message-ID: <20220730212709.GH23307@duo.ucw.cz> (raw)
In-Reply-To: <20220722081146.47262-3-jjhiblot@traphandler.com>
[-- Attachment #1: Type: text/plain, Size: 1621 bytes --]
Hi!
> The TLC5925 is a 16-channels constant-current LED sink driver.
> It is controlled via SPI but doesn't offer a register-based interface.
> Instead it contains a shift register and latches that convert the
> serial input into a parallel output.
>
> Datasheet: https://www.ti.com/lit/ds/symlink/tlc5925.pdf
> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@traphandler.com>
> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> ---
> drivers/leds/Kconfig | 6 ++
> drivers/leds/Makefile | 1 +
> drivers/leds/leds-tlc5925.c | 148 ++++++++++++++++++++++++++++++++++++
> 3 files changed, 155 insertions(+)
Lets make this go to drivers/leds/simple/ ?
> + gpios = devm_gpiod_get_array(dev, "output-enable-b", GPIOD_OUT_LOW);
> + if (IS_ERR(gpios))
> + return dev_err_probe(dev, PTR_ERR(gpios),
> + "Unable to get the 'output-enable-b' gpios\n");
> +
> + count = device_get_child_node_count(dev);
> + if (!count)
> + return dev_err_probe(dev, -ENODEV, "no led defined.\n");
"No LED..."
> + device_property_read_u32(dev, "ti,shift-register-length",
> + &max_num_leds);
> +
> + if (max_num_leds % 8)
> + return dev_err_probe(dev, -EINVAL,
> + "'ti,shift-register-length' must be a multiple of 8\n");
> + if (max_num_leds == 0)
> + return dev_err_probe(dev, -EINVAL,
> + "'ti,shift-register-length' must be greater than 0\n");
> +
I thought you had #define for leds number before?
Otherwise looks good, thank you.
Best regards,
Pavel
--
People of Russia, stop Putin before his war on Ukraine escalates.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
next prev parent reply other threads:[~2022-07-30 21:27 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-22 8:11 [RESEND PATCH v6 0/3] Add support for the TLC5925 Jean-Jacques Hiblot
2022-07-22 8:11 ` [RESEND PATCH v6 1/3] dt-bindings: leds: Add bindings for the TLC5925 controller Jean-Jacques Hiblot
2022-07-22 8:11 ` [RESEND PATCH v6 2/3] leds: Add driver for the TLC5925 LED controller Jean-Jacques Hiblot
2022-07-30 21:27 ` Pavel Machek [this message]
2022-07-31 19:28 ` Andy Shevchenko
2022-08-04 20:23 ` Jean-Jacques Hiblot
2022-08-04 20:40 ` Andy Shevchenko
2022-08-04 21:04 ` Pavel Machek
2022-08-24 8:39 ` Jean-Jacques Hiblot
2022-08-24 8:55 ` Andy Shevchenko
2022-08-24 9:58 ` Jean-Jacques Hiblot
2022-08-24 10:18 ` Andy Shevchenko
2022-08-26 9:11 ` Linus Walleij
2022-07-22 8:11 ` [RESEND PATCH v6 3/3] leds: tlc5925: Add support for non blocking operations Jean-Jacques Hiblot
2022-07-30 21:22 ` Pavel Machek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220730212709.GH23307@duo.ucw.cz \
--to=pavel@ucw.cz \
--cc=andy.shevchenko@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=jjhiblot@traphandler.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).