[PATCH 2/2] leds/powernv: Add driver for PowerNV platform

Stewart Smith stewart at linux.vnet.ibm.com
Fri Mar 20 08:35:32 AEDT 2015


Vasant Hegde <hegdevasant at linux.vnet.ibm.com> writes:

> From: Anshuman Khandual <khandual at linux.vnet.ibm.com>
>
> This patch implements LED driver for PowerNV platform using the existing
> generic LED class framework. It registers classdev structures for all
> individual LEDs detected on the system through LED specific device tree
> nodes. Device tree nodes specify what all kind of LEDs present on the
> same location code. It registers LED classdev structure for each of them.
>
> The platform level implementation of LED get and set state has been
> achieved through OPAL calls. These calls are made available for the
> driver by exporting from architecture specific codes.
>
> As per the LED class framework, the 'brightness_set' function should not
> sleep. Hence these functions have been implemented through global work
> queue tasks which might sleep on OPAL async call completion.
>
> All the system LEDs can be found in the same regular path /sys/class/leds/.
> There are two different kind of LEDs present for the same location code,
> one being the identify indicator and other one being the fault indicator.
> We don't use LED colors. Hence our LEDs have names in this format.
>
>         <location_code>:<IDENTIFY|FAULT>
>
> Any positive brightness value would turn on the LED and a zero value
> would turn off the LED. The driver will return LED_FULL (255) for any
> turned on LED and LED_OFF for any turned off LED.
>
> Signed-off-by: Anshuman Khandual <khandual at linux.vnet.ibm.com>
> Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>

Acked-by: Stewart Smith <stewart at linux.vnet.ibm.com>
Tested-by: Stewart Smith <stewart at linux.vnet.ibm.com>


(well, it boots, interacts with firmware. I didn't go and look at the
LEDs themselves).



More information about the Linuxppc-dev mailing list