Re: [PATCH] leds: pca9532: don't stop blinking for non-zero brightness

From: Tobias Deiminger

Date: Tue Mar 31 2026 - 16:23:40 EST


Am Dienstag, 31. März 2026, 11:47:30 Mitteleuropäische Sommerzeit schrieb Lee Jones:
> On Sat, 21 Mar 2026, Tobias Deiminger wrote:
> [...]
> > --- a/drivers/leds/leds-pca9532.c
> > +++ b/drivers/leds/leds-pca9532.c
> > @@ -184,6 +184,8 @@ static int pca9532_set_brightness(struct led_classdev *led_cdev,
> >
> > if (value == LED_OFF)
> > led->state = PCA9532_OFF;
> > + else if (led->state == PCA9532_PWM1)
> > + return 0; /* non-zero brightness shall not stop HW blinking */
>
> Comments should start with a capital letter.
>
> Also, as the final 'else' statement uses braces, should we perhaps take the
> opportunity to add braces to all branches of this conditional block?

Thanks for taking a look, sounds reasonable. Will adjust the comment and K&R-ify the
hunk in v2.

- Tobias

> > else if (value == LED_FULL)
> > led->state = PCA9532_ON;
> > else {
> >
> > base-commit: b2c87f5e98cd88095dbc6802197526703d5e4e48
>
>

Attachment: signature.asc
Description: This is a digitally signed message part.