Re: RFC: LED hw triggering API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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.
> 

Hi Jacek,

I made a mistake interpreting the specification of the HW I was
thinking about (QCA8377 switch). The led triggering does not have to be
set for groups, it can be set to each led individually.

In fact each LED can be set one of these 4 settings:
  - on
  - off
  - follow pattern (according to pattern settings)
  - blink
If in follow pattern, then LEDs for ports 1,2,3 have this pattern
setting grouped, ports 0 and 4 have individual pattern setting.

Pattern settings are settings like:
  - on if linked to 1000m
  - on if linked to 100m
  - on if linked to 10m
  - blink on rx
  - blink on tx
  ...
More than one setting can be set at once, for example
  - on if linked to 1000m or 100m, blink on rx

So the LEDs coul have triggers:
  none hw:blink hw:pattern
If hw:pattern is chosen, another files can be created where the other
settings are configurable. What do you think?

> With hw_controlled file we would have this problem solved.
> 

But yes, there probably are controllers which only allow LED setting to
N > 1 LEDs at once. I think these are rather exotic, though.

Marek



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux