Hi! > This adds proper kernel support for the 8 RGB LEDs on the front panel > of CZ.NIC's Turris 1.x router. > > The LEDs are controlled by a CPLD device which manages the whole router. > This CPLD controls the LEDs with PWMs and exposes to CPU these functions > via memory mapped registers: > - enabling/disabling each RGB LED > - for every LED (*) separately setting brightness for the R, G, and B > color channel (and also reading this values) > - setting/getting current global intensity level (there are 8 levels > and the level can also be changed by pressing a button on the back > side of the router) > - setting/getting the intensity of each global intensity level > - enabling/disabling HW trigger for each LED > - changing WIFI LED to STATUS LED and back (in the sense of HW trigger) > > (*) The colors of the LAN LEDs, LAN1-LAN5, are controlled together. These > LEDs cannot have different colors. > > For each LED three sysfs entries are created, with names "turris:C:N", > where C is from {r, g, b} and N is from {wan, lan, wifi, power}. C should be {red, green, blue}. > Although there are 8 LEDs, because of (*) we only work with them as with > 4 LEDs - LAN1-LAN5 are visible as one LAN LED. Interesting hardware, indeed. > Each LED has a hw_trigger attribute, which can be set according to this > table: > LED dis HW trigger en HW trigger > wan none wan > lan none lan > wifi none wifi/status > power none power hw_trigger attribute should go to core, it is useful for other hardware, too. > The parent device also exposes attributes with names > intensity_level_N for N from {0, ..., 7} to control the values of the > intensity levels, and an attribute current_intensity_level, to get/set > current intensity level. I'd ignore that for now... Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Attachment:
signature.asc
Description: Digital signature