Re: [PATCH v1 leds-next 1/3] leds: Add support for Turris 1.x LEDs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux