summaryrefslogtreecommitdiffstats
path: root/drivers/leds
diff options
context:
space:
mode:
authorAntonio Ospite <ao2@ao2.it>2016-01-28 16:49:29 +0100
committerJacek Anaszewski <j.anaszewski@samsung.com>2016-03-14 09:22:20 +0100
commitc9eec908a1ec7829497a0914514badec95cc8461 (patch)
treec430046d6b2d04a6ebbcdd20110ad004f32d0fa1 /drivers/leds
parentd84d80f38f0ff4eb4becf1a3569c8e7b2c463b61 (diff)
downloadlinux-c9eec908a1ec7829497a0914514badec95cc8461.tar.bz2
leds: lp3944: improve wording and formatting in a comment
Improve the wording for the comment about the led status, and while at it also use the standard formatting for multi-line comments. Signed-off-by: Antonio Ospite <ao2@ao2.it> Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Diffstat (limited to 'drivers/leds')
-rw-r--r--drivers/leds/leds-lp3944.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/leds/leds-lp3944.c b/drivers/leds/leds-lp3944.c
index 6c758aea1bbd..be60c181222a 100644
--- a/drivers/leds/leds-lp3944.c
+++ b/drivers/leds/leds-lp3944.c
@@ -199,8 +199,11 @@ static int lp3944_led_set(struct lp3944_led_data *led, u8 status)
if (status > LP3944_LED_STATUS_DIM1)
return -EINVAL;
- /* invert only 0 and 1, leave unchanged the other values,
- * remember we are abusing status to set blink patterns
+ /*
+ * Invert status only when it's < 2 (i.e. 0 or 1) which means it's
+ * controlling the on/off state directly.
+ * When, instead, status is >= 2 don't invert it because it would mean
+ * to mess with the hardware blinking mode.
*/
if (led->type == LP3944_LED_TYPE_LED_INVERTED && status < 2)
status = 1 - status;