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@xxxxxxxxxxxxxxx> > Reviewed-by: Andy Shevchenko <andy.shevchenko@xxxxxxxxx> > --- > 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:
signature.asc
Description: PGP signature