Skip to contentSkip to conversation

Blinking of the paired LEDs

DISCUSSION Alexander A. Filippov 1 participant 2 messages Oct 26, 2021 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

We have green-red paired LEDs on our hardware. In SysFS they present as a pair of standalone LED.
And we switch the different color in different cases using separate LED groups in the phosphor-led-manager that turns corresponding physical LEDs.

One of those LED groups turning on the such LED to the yellow blinking by setting the blink mode on the both physical LED. But sometimes these physical LEDs turn with a little time lag. This leads to the blinking of the four states: green (short) -> yellow (long)-> red (short) -> off(long).

I believe this occurs when there is a some traffic through D-Bus (e.g. during the host starting) and LED manager can't set the physical LEDs mode synchronously.

And I see nothing better than trying to combine the phosphor-ledcontroller instances into one process and probably to implement the method for setting the properties with one D-Bus call.

Does anybody have suggestions about any better solution?

#2 lore raw
In reply to a message not in the archive
Quoted 11 lines
Quoted 2 lines

Does anybody have suggestions about any better solution?

I'd suggest going a level higher by defining the LED to the kernel as single instance of the multi-color led class. While the class is described for full RGB controls, I believe a red green led controlled by 2 gpios in one bank is well within both the LED and GPIO kernel specifications (I don't know if you have chosen gpios in the same bank or even if you are using gpios to control it).

Quoted 2 lines

https://github.com/openbmc/linux/blob/dev-5.10/Documentation/leds/leds-class-multicolor.rst

Yes, I've seen this feature but couldn't get it to work with gpio-leds. I have concluded that gpio-leds does not support multi-led.

The kernel driver modification seems to me a little bit more complex, but probably you are right, it looks like a better solution.

Thanks for your advice.