Hi Marek, On 4/1/19 3:20 PM, Marek Behún wrote:
Hi guys, there is another "issue": many switches expose control of LEDs, but the control sometimes comes in groups. For example you have 3 LEDs for each port on a 5 port switch, but 2 of the LEDs cannot be enabled at the same time (the ethernet cage connectes them on different polarity on the same signal pair).
LED class driver exposing those LED should return -EBUSY when the other LED is enabled
Or you can set port1-port4 LED 2 to blink on link activity, but this you can only enable by this group of 4 leds. How to solve this in the hw triggering api?
It depends on its final shape. Trigger approach would not be to much of help here. Driver could register four triggers but there is no way for it to detect who registered on the trigger events. If it had that information, than, when all four LEDs got registered it could detect it and enable hardware blinking for this group. With hw_controlled file we would have this problem solved. -- Best regards, Jacek Anaszewski