lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220730212709.GH23307@duo.ucw.cz>
Date:   Sat, 30 Jul 2022 23:27:09 +0200
From:   Pavel Machek <pavel@....cz>
To:     Jean-Jacques Hiblot <jjhiblot@...phandler.com>
Cc:     robh+dt@...nel.org, krzysztof.kozlowski+dt@...aro.org,
        andy.shevchenko@...il.com, linux-leds@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RESEND PATCH v6 2/3] leds: Add driver for the TLC5925 LED
 controller

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@...phandler.com>
> Reviewed-by: Andy Shevchenko <andy.shevchenko@...il.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.

Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ