From: "Marek Behún" <kabel@kernel.org>
To: linux-leds@vger.kernel.org, Pavel Machek <pavel@ucw.cz>,
Lee Jones <lee@kernel.org>
Cc: "Marek Behún" <kabel@kernel.org>
Subject: [PATCH v2 1/3] leds: turris-omnia: change max brightness from 255 to 1
Date: Fri, 14 Jul 2023 10:52:51 +0200 [thread overview]
Message-ID: <20230714085253.13544-2-kabel@kernel.org> (raw)
In-Reply-To: <20230714085253.13544-1-kabel@kernel.org>
Using binary brightness makes more sense for this controller, because
internally in the MCU it works that way: the LED has a color, and a
state whether it is ON or OFF.
The resulting brightness computation with led_mc_calc_color_components()
will now always result in either (0, 0, 0) or the multi_intensity value.
Signed-off-by: Marek Behún <kabel@kernel.org>
---
drivers/leds/leds-turris-omnia.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/leds/leds-turris-omnia.c b/drivers/leds/leds-turris-omnia.c
index 64b2d7b6d3f3..c063b6b710f9 100644
--- a/drivers/leds/leds-turris-omnia.c
+++ b/drivers/leds/leds-turris-omnia.c
@@ -110,7 +110,7 @@ static int omnia_led_register(struct i2c_client *client, struct omnia_led *led,
init_data.fwnode = &np->fwnode;
cdev = &led->mc_cdev.led_cdev;
- cdev->max_brightness = 255;
+ cdev->max_brightness = 1;
cdev->brightness_set_blocking = omnia_led_brightness_set_blocking;
/* put the LED into software mode */
--
2.41.0
next prev parent reply other threads:[~2023-07-14 8:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-14 8:52 [PATCH v2 0/3] leds: turris-omnia: updates Marek Behún
2023-07-14 8:52 ` Marek Behún [this message]
2023-07-16 9:19 ` [PATCH v2 1/3] leds: turris-omnia: change max brightness from 255 to 1 Pavel Machek
2023-07-16 15:01 ` Marek Behún
2023-07-28 9:56 ` Lee Jones
2023-07-28 10:10 ` Pavel Machek
2023-08-01 9:07 ` Marek Behún
2023-07-14 8:52 ` [PATCH v2 2/3] leds: turris-omnia: initialize multi-intensity to full Marek Behún
2023-07-16 9:19 ` Pavel Machek
2023-07-14 8:52 ` [PATCH v2 3/3] leds: turris-omnia: support HW controlled mode via private trigger Marek Behún
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=20230714085253.13544-2-kabel@kernel.org \
--to=kabel@kernel.org \
--cc=lee@kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@ucw.cz \
/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