mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andi Shyti <andi.shyti@samsung.com>
To: Richard Purdie <rpurdie@rpsys.net>,
	Jacek Anaszewski <jacek.anaszewski@gmail.com>,
	Pavel Machek <pavel@ucw.cz>
Cc: Jaechul Lee <jcsing.lee@samsung.com>,
	linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org,
	Andi Shyti <andi.shyti@samsung.com>,
	Andi Shyti <andi@etezian.org>
Subject: [PATCH v2] leds: add LED_ON brightness as boolean value
Date: Thu, 05 Jan 2017 11:34:12 +0900	[thread overview]
Message-ID: <20170105023412.26472-1-andi.shyti@samsung.com> (raw)
In-Reply-To: <CGME20170105023420epcas1p28624575ab6619e1930ebc05795725d90@epcas1p2.samsung.com>

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>
Acked-by: Pavel Machek <pavel@ucw.cz>
---
Hi,

Thanks Pavel and Jacek for your review.

Differences from V1
- used explicit assignement of LED_ON in the enum
- added Pavel's ack

Andi

 include/linux/leds.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/leds.h b/include/linux/leds.h
index 569cb531094c..bb50d0151e75 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		= 1,
 	LED_HALF	= 127,
 	LED_FULL	= 255,
 };
-- 
2.11.0

       reply	other threads:[~2017-01-05  2:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20170105023420epcas1p28624575ab6619e1930ebc05795725d90@epcas1p2.samsung.com>
2017-01-05  2:34 ` Andi Shyti [this message]
2017-01-05 22:17   ` Jacek Anaszewski

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=20170105023412.26472-1-andi.shyti@samsung.com \
    --to=andi.shyti@samsung.com \
    --cc=andi@etezian.org \
    --cc=jacek.anaszewski@gmail.com \
    --cc=jcsing.lee@samsung.com \
    --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

all inboxes | Powered by JetHome®