提交 c9eec908 编写于 作者: A Antonio Ospite 提交者: Jacek Anaszewski

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: NAntonio Ospite <ao2@ao2.it>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
上级 d84d80f3
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册