Linux LED subsystem development
 help / color / mirror / Atom feed
From: Jacek Anaszewski <jacek.anaszewski@gmail.com>
To: linux-leds@vger.kernel.org, Lee Jones <lee.jones@kernel.org>
Cc: Sven Schwermer <sven.schwermer@disruptive-technologies.com>,
	schuchmann@schleissheimer.de, pavel@ucw.cz
Subject: Re: [PATCH RESEND v2] led: multicolor: Fix intensity setting while SW blinking
Date: Wed, 22 Mar 2023 18:25:28 +0100	[thread overview]
Message-ID: <e22ec795-8e14-7bd2-0c52-b2f53524e821@gmail.com> (raw)
In-Reply-To: <20220627133110.271455-1-sven@svenschwermer.de>

Hi Lee,

I've recently recalled this patch that was ready to apply.
Would you mind to take a look?

On 6/27/22 15:31, Sven Schwermer wrote:
> From: Sven Schwermer <sven.schwermer@disruptive-technologies.com>
> 
> When writing to the multi_intensity file, don't unconditionally call
> led_set_brightness. By only doing this if blinking is inactive we
> prevent blinking from stopping if the blinking is in its off phase while
> the file is written.
> 
> Instead, if blinking is active, the changed intensity values are applied
> upon the next blink. This is consistent with changing the brightness on
> monochrome LEDs with active blinking.
> 
> Suggested-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
> Tested-by: Sven Schuchmann <schuchmann@schleissheimer.de>
> Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
> Signed-off-by: Sven Schwermer <sven.schwermer@disruptive-technologies.com>
> ---
> 
> Notes:
>      V1->V2: Change title, add tags
> 
>   drivers/leds/led-class-multicolor.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/leds/led-class-multicolor.c b/drivers/leds/led-class-multicolor.c
> index e317408583df..5b1479b5d32c 100644
> --- a/drivers/leds/led-class-multicolor.c
> +++ b/drivers/leds/led-class-multicolor.c
> @@ -59,7 +59,8 @@ static ssize_t multi_intensity_store(struct device *dev,
>   	for (i = 0; i < mcled_cdev->num_colors; i++)
>   		mcled_cdev->subled_info[i].intensity = intensity_value[i];
>   
> -	led_set_brightness(led_cdev, led_cdev->brightness);
> +	if (!test_bit(LED_BLINK_SW, &led_cdev->work_flags))
> +		led_set_brightness(led_cdev, led_cdev->brightness);
>   	ret = size;
>   err_out:
>   	mutex_unlock(&led_cdev->led_access);
> 
> base-commit: 210e04ff768142b96452030c4c2627512b30ad95

-- 
Best regards,
Jacek Anaszewski

  parent reply	other threads:[~2023-03-22 17:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-27 13:31 [PATCH RESEND v2] led: multicolor: Fix intensity setting while SW blinking Sven Schwermer
2023-01-04  8:46 ` AW: " Sven Schuchmann
2023-03-22 17:25 ` Jacek Anaszewski [this message]
2023-03-23 11:38 ` Pavel Machek
2025-04-02 20:53 ` Tobias Deiminger
2025-04-04 15:46   ` Lee Jones
2025-04-04 18:40     ` [PATCH v3] " Sven Schwermer
2025-04-10  9:53       ` (subset) " Lee Jones
  -- strict thread matches above, loose matches on Subject: below --
2022-06-01  6:37 [PATCH RESEND v2] " Sven Schwermer

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=e22ec795-8e14-7bd2-0c52-b2f53524e821@gmail.com \
    --to=jacek.anaszewski@gmail.com \
    --cc=lee.jones@kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=schuchmann@schleissheimer.de \
    --cc=sven.schwermer@disruptive-technologies.com \
    /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