leds: lp3944: improve wording and formatting in a comment
authorAntonio Ospite <ao2@ao2.it>
Thu, 28 Jan 2016 15:49:29 +0000 (16:49 +0100)
committerJacek Anaszewski <j.anaszewski@samsung.com>
Mon, 14 Mar 2016 08:22:20 +0000 (09:22 +0100)
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>
drivers/leds/leds-lp3944.c

index 6c758aea1bbdaa1fb77edf71e9c611e4e131ee0e..be60c181222a562f564eb839d470e85ae932f9d9 100644 (file)
@@ -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;
This page took 0.026746 seconds and 5 git commands to generate.