Linux Documentation
 help / color / mirror / Atom feed
From: Lee Jones <lee@kernel.org>
To: joseph@telaak.dev
Cc: "Pavel Machek" <pavel@kernel.org>,
	"Griffin Kroah-Hartman" <griffin@kroah.com>,
	"Kees Cook" <kees@kernel.org>,
	"Gustavo A. R. Silva" <gustavoars@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"André Apitzsch" <git@apitzsch.eu>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Shuah Khan" <skhan@linuxfoundation.org>,
	"Randy Dunlap" <rdunlap@infradead.org>,
	linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-hardening@vger.kernel.org, devicetree@vger.kernel.org,
	linux-doc@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH v2 05/11] leds: rgb: ktd202x: Keep the unlit colors of a blinking LED off
Date: Thu, 19 Nov 2026 10:37:55 +0000	[thread overview]
Message-ID: <20261119103755.GP98456@joneslee-macbookpro.roam.internal> (raw)
In-Reply-To: <20261109-ktd202x-et6326-v2-5-56e97c226658@telaak.dev>

On Mon, 09 Nov 2026, Joseph Telaak via B4 Relay wrote:

> From: Joseph Telaak <joseph@telaak.dev>
> 
> blink_set() switches every channel of a multicolor LED to the flash
> timer, or to always on when delay_off is 0, including the colors whose
> brightness is 0. Their current register still holds the last brightness
> they had, or the 10 mA default, so for example a red blink set with a
> multi_intensity of "255 0 0" also blinks green and blue.
> 
> Leave the channels of the colors with no brightness off, as
> brightness_set() does. A single color LED now passes its brightness too.
> 
> Fixes: 0ebdb7210943 ("leds: Add ktd202x driver")
> Cc: stable@vger.kernel.org
> Signed-off-by: Joseph Telaak <joseph@telaak.dev>
> ---
>  drivers/leds/rgb/leds-ktd202x.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/leds/rgb/leds-ktd202x.c b/drivers/leds/rgb/leds-ktd202x.c
> index feea33b7e885..042de16c28bc 100644
> --- a/drivers/leds/rgb/leds-ktd202x.c
> +++ b/drivers/leds/rgb/leds-ktd202x.c
> @@ -284,6 +284,10 @@ static int ktd202x_blink_set(struct ktd202x_led *led, unsigned long *delay_on,
>  		int channel = subleds[i].channel;
>  
>  		ctrl_mask |= KTD202X_CHANNEL_CTRL_MASK(channel);

I won't say this again, but it should carry across to everywhere else.

'\n'

> +		/* A color with no brightness stays off */
> +		if (!subleds[i].brightness)
> +			continue;
> +
>  		ctrl_on |= KTD202X_CHANNEL_CTRL_ON(channel);
>  		ctrl_pwm1 |= KTD202X_CHANNEL_CTRL_PWM1(channel);
>  	}
> @@ -359,6 +363,7 @@ static int ktd202x_blink_single_set(struct led_classdev *cdev,
>  	if (!*delay_on)
>  		return ktd202x_brightness_single_set(cdev, LED_OFF);
>  
> +	info.brightness = cdev->brightness;
>  	info.channel = led->index;
>  
>  	return ktd202x_blink_set(led, delay_on, delay_off, &info, 1);
> 
> -- 
> Git-155)
> 
> 
> 

-- 
Lee Jones

  reply	other threads:[~2026-11-19 10:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-09 19:03 [PATCH v2 00/11] leds: ktd202x: Add Etek ET6326, hardware breathing and fixes Joseph Telaak via B4 Relay
2026-11-09 19:03 ` [PATCH v2 01/11] leds: rgb: ktd202x: Fix the flash period of short blinks on 32 bit Joseph Telaak via B4 Relay
2026-11-09 19:03 ` [PATCH v2 02/11] leds: rgb: ktd202x: Fix an out-of-bounds read with unused channels Joseph Telaak via B4 Relay
2026-11-19 10:22   ` Lee Jones
2026-11-09 19:03 ` [PATCH v2 03/11] leds: rgb: ktd202x: Never program an on time of zero Joseph Telaak via B4 Relay
2026-11-09 19:03 ` [PATCH v2 04/11] leds: rgb: ktd202x: Fix a division by zero with long blinks Joseph Telaak via B4 Relay
2026-11-09 19:03 ` [PATCH v2 05/11] leds: rgb: ktd202x: Keep the unlit colors of a blinking LED off Joseph Telaak via B4 Relay
2026-11-19 10:37   ` Lee Jones [this message]
2026-11-09 19:03 ` [PATCH v2 06/11] dt-bindings: leds: kinetic,ktd202x: Add Etek ET6326 Joseph Telaak via B4 Relay
2026-11-09 19:03 ` [PATCH v2 07/11] leds: rgb: ktd202x: Add Etek ET6326 support Joseph Telaak via B4 Relay
2026-11-09 19:03 ` [PATCH v2 08/11] leds: rgb: ktd202x: Add hardware pattern support Joseph Telaak via B4 Relay
2026-11-19 10:20   ` Lee Jones
2026-11-09 19:03 ` [PATCH v2 09/11] leds: rgb: ktd202x: Limit the LED current to led-max-microamp Joseph Telaak via B4 Relay
2026-11-09 19:03 ` [PATCH v2 10/11] leds: rgb: ktd202x: Fail the probe when the chip does not answer Joseph Telaak via B4 Relay
2026-11-09 19:03 ` [PATCH v2 11/11] leds: rgb: ktd202x: Don't let a blinking LED retime another one Joseph Telaak via B4 Relay

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=20261119103755.GP98456@joneslee-macbookpro.roam.internal \
    --to=lee@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=corbet@lwn.net \
    --cc=devicetree@vger.kernel.org \
    --cc=git@apitzsch.eu \
    --cc=griffin@kroah.com \
    --cc=gustavoars@kernel.org \
    --cc=joseph@telaak.dev \
    --cc=kees@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=robh@kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=stable@vger.kernel.org \
    /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