From: Jacek Anaszewski <jacek.anaszewski@gmail.com>
To: Andi Shyti <andi.shyti@samsung.com>,
Richard Purdie <rpurdie@rpsys.net>, Pavel Machek <pavel@ucw.cz>
Cc: linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org,
Andi Shyti <andi@etezian.org>
Subject: Re: [PATCH] leds: add LED_ON brightness as boolean value
Date: Wed, 4 Jan 2017 20:59:00 +0100 [thread overview]
Message-ID: <b3ac3619-3b80-a9ab-fa0c-b56685291fd6@gmail.com> (raw)
In-Reply-To: <20170104134107.24902-1-andi.shyti@samsung.com>
Hi Andi,
Thanks for the patch.
On 01/04/2017 02:41 PM, Andi Shyti wrote:
> Some devices do not handle the led brightness or simply don't
> care about it. Conceptually said devices want to just switch on
> or off the led. It is useless in this case to have a 255 range
> of brightness, while just having an LED_ON and LED_OFF improves
> the boolean meaning of the led status.
>
> Signed-off-by: Andi Shyti <andi.shyti@samsung.com>
> ---
> include/linux/leds.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/include/linux/leds.h b/include/linux/leds.h
> index 569cb531094c..0258f9c49034 100644
> --- a/include/linux/leds.h
> +++ b/include/linux/leds.h
> @@ -27,6 +27,7 @@ struct device;
>
> enum led_brightness {
> LED_OFF = 0,
> + LED_ON,
Now lack of explicit value assignment to LED_ON looks weird
since it is surrounded by other initializer values.
I'd prefer to have "LED_ON = 1," in this line.
> LED_HALF = 127,
> LED_FULL = 255,
> };
>
--
Best regards,
Jacek Anaszewski
next prev parent reply other threads:[~2017-01-04 19:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170104134122epcas1p48ee63a75c2e159b06d792ec8bc7d4e6d@epcas1p4.samsung.com>
2017-01-04 13:41 ` [PATCH] leds: add LED_ON brightness as boolean value Andi Shyti
2017-01-04 19:59 ` Jacek Anaszewski [this message]
2017-01-04 22:42 ` Pavel Machek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b3ac3619-3b80-a9ab-fa0c-b56685291fd6@gmail.com \
--to=jacek.anaszewski@gmail.com \
--cc=andi.shyti@samsung.com \
--cc=andi@etezian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=rpurdie@rpsys.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).