Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
leds: ktd20xx: Extension of the KTD20xx family of LED drivers from Ki…
…netic Introducing the KTD2061/58/59/60 RGB LED drivers. The difference in these are the address numbers on the I2C bus that the device listens to. All KT20xx units can drive up to 12 LEDs. Due to the hardware limitation, we can only set 7 colors and the color black (LED off) for each LED independently and not the full RGB range. This is because the chip only has two color registers. To control the LEDs independently, the chip has to be configured in a special way. Color register 0 must be loaded with the current value 0mA, and color register 1 must be loaded with the value 'kinetic,led-current' from the device tree node. If the property is omitted, the register is loaded with the default value (0x28 = 5mA). To select a color for an LED, a combination must be written to the color selection register of that LED. This range for selecting the value is 3 bits wide (RGB). A '0' in any of the bits uses color register '0' and a '1' uses color register '1'. So we could choose the following combination for each LED: R G B 0 0 0 = Black (off) 0 0 1 = Blue 0 1 0 = green 0 1 1 = Cyan 1 0 0 = Red 1 0 1 = Magenta 1 1 0 = Yellow 1 1 1 = White Signed-off-by: Florian Eckert <fe@dev.tdt.de>
- Loading branch information