Use hbtimer for led pattern auto-deactivation #294
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It is possible to configure mce led patterns to automatically deactivate
after specified amount of seconds. However the logic uses normal user
space timers which makes the feature pretty much useless in devices
that use suspend type power management. Also a common timer is used
for controlling the timeout, which means the period gets restarted
if some higher priority pattern gets temporarily activated.
Use hbtimer for pattern deactivation so that the device will wake up from
suspend to deactivate the led.
Use separate timer for each pattern that is configured to use pattern
timeout. This makes it possible to handle overlapping pattern activations
with timeouts correctly - whether things actually work as expected depends
on the pattern activation side logic too.
Also the timers are not stopped if led feature is disabled. This makes
the auto deactivation work also if the feature is re-enabled later on.