Hi Sven, For the patch: tested-by Sven Schuchmann <schuchmann@xxxxxxxxxxxxxxxxx> Changing the intensity or brightness is possible in on and off state. Sven > -----Ursprüngliche Nachricht----- > Von: Sven Schwermer <sven@xxxxxxxxxxxxxxxx> > Gesendet: Mittwoch, 18. Mai 2022 10:22 > An: linux-leds@xxxxxxxxxxxxxxx > Cc: Sven Schwermer <sven.schwermer@xxxxxxxxxxxxxxxxxxxxxxxxxxx>; > jacek.anaszewski@xxxxxxxxx; Sven Schuchmann <schuchmann@xxxxxxxxxxxxxxxxx>; pavel@xxxxxx > Betreff: [PATCH] led: multicolor: Don't set brightness when blinking > > From: Sven Schwermer <sven.schwermer@xxxxxxxxxxxxxxxxxxxxxxxxxxx> > > 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@xxxxxxxxx> > Signed-off-by: Sven Schwermer <sven.schwermer@xxxxxxxxxxxxxxxxxxxxxxxxxxx> > --- > 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 > -- > 2.36.1