All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Marek Behún" <kabel@kernel.org>
To: Pavel Machek <pavel@ucw.cz>, linux-leds@vger.kernel.org
Cc: pali@kernel.org, "Josef Schlehofer" <josef.schlehofer@nic.cz>,
	"Marek Behún" <kabel@kernel.org>
Subject: [PATCH 2/3] leds: turris-omnia: initialize multi-intensity to full
Date: Mon,  4 Jul 2022 12:59:54 +0200	[thread overview]
Message-ID: <20220704105955.15474-3-kabel@kernel.org> (raw)
In-Reply-To: <20220704105955.15474-1-kabel@kernel.org>

The default color of each LED before driver probe (255, 255, 255).
Initialize multi_intensity to this value, so that it corresponds to the
reality.

Signed-off-by: Marek Behún <kabel@kernel.org>
---
 drivers/leds/leds-turris-omnia.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/leds/leds-turris-omnia.c b/drivers/leds/leds-turris-omnia.c
index c2dfb22d3065..fae155bd119c 100644
--- a/drivers/leds/leds-turris-omnia.c
+++ b/drivers/leds/leds-turris-omnia.c
@@ -131,10 +131,13 @@ static int omnia_led_register(struct i2c_client *client, struct omnia_led *led,
 	}
 
 	led->subled_info[0].color_index = LED_COLOR_ID_RED;
+	led->subled_info[0].intensity = 255;
 	led->subled_info[0].channel = 0;
 	led->subled_info[1].color_index = LED_COLOR_ID_GREEN;
+	led->subled_info[1].intensity = 255;
 	led->subled_info[1].channel = 1;
 	led->subled_info[2].color_index = LED_COLOR_ID_BLUE;
+	led->subled_info[2].intensity = 255;
 	led->subled_info[2].channel = 2;
 
 	led->mc_cdev.subled_info = led->subled_info;
-- 
2.35.1


  parent reply	other threads:[~2022-07-04 11:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-04 10:59 [PATCH 0/3] leds: turris-omnia: updates Marek Behún
2022-07-04 10:59 ` [PATCH 1/3] leds: turris-omnia: support HW controlled mode via private trigger Marek Behún
2022-07-04 10:59 ` Marek Behún [this message]
2022-07-04 10:59 ` [PATCH 3/3] leds: turris-omnia: change max brightness from 255 to 1 Marek Behún
2022-11-02  0:23 ` [PATCH 0/3] leds: turris-omnia: updates Pali Rohár
2023-03-04  7:25   ` Josef Schlehofer

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=20220704105955.15474-3-kabel@kernel.org \
    --to=kabel@kernel.org \
    --cc=josef.schlehofer@nic.cz \
    --cc=linux-leds@vger.kernel.org \
    --cc=pali@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.