summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorSimon Guinot <simon.guinot@sequanux.org>2015-07-02 19:56:42 +0200
committerJacek Anaszewski <j.anaszewski@samsung.com>2015-08-28 14:06:09 +0200
commit4b90432dc1edca6cfc0bb338794beed46af3a472 (patch)
treeb031a38832fc44f33203179f848299a455cb565d /arch
parentf7fafd083ccc340502448903aaddc76f10785c8c (diff)
leds: leds-ns2: handle can_sleep GPIOs
On the board n090401 (Seagate NAS 4-Bay), some of the LEDs are handled by the leds-ns2 driver. This LEDs are connected to an I2C GPIO expander (PCA95554PW) which means that GPIO access may sleep. This patch makes leds-ns2 compatible with such GPIOs by using the *_cansleep() variant of the GPIO functions. As a drawback this functions can't be used safely in a timer context (with the timer LED trigger for example). To fix this issue, a workqueue mechanism (copied from the leds-gpio driver) is used. Note that this patch also updates slightly the ns2_led_sata_store function. The LED state is now retrieved from cached values instead of reading the GPIOs previously. This prevents ns2_led_sata_store from working with a stale LED state (which may happen when a delayed work is pending). Signed-off-by: Simon Guinot <simon.guinot@sequanux.org> Signed-off-by: Vincent Donnefort <vdonnefort@gmail.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions