Commit Graph
9 Commits
Author SHA1 Message Date
Sicelo A. Mhlongo a31c636f14 tests: Test legacy LED name detection
Signed-off-by: Sicelo A. Mhlongo <absicsz@gmail.com>
2025-07-12 12:57:36 +02:00
Guido Günther f9f248ef23 fbd-dev-led: Sort leds by priority
This makes sure we e.g. prefer multicolor leds over single color ones
and those that can be on insuspend (qcom) over those that can't.

We can extend this to allow to set the priority via udev/hwdb in the
future.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-05-06 14:54:52 +00:00
knoppix knoppix 0e88863a3d Allow constant lighting of notification LED through the setting of frequency in theme.json to zero. 2025-04-23 20:02:12 +00:00
Guido Günther e47ce8e09e led: Add flash LED type
Camera flashes are also exported via the LED subsystem. We use a
separate LED type so they're not picked by default.

We don't use them as fallbacks either.
2024-06-15 11:14:40 +02:00
Dylan Van Assche 2b53725fcb fbd-dev-led-qcom-multicolor: Support QCOM LPG LED multicolor
QCOM LPG LEDs can also operate in a multicolor fashion.
Re-use the probing sequence of multicolor LEDs and the hw_pattern
configuration of single color QCOM LPG LEDs.
2024-06-09 11:21:20 +02:00
Dylan Van Assche 10e6d3cba8 fbd-dev-led-qcom: Support QCOM LPG LED single color
QCOM LPG LEDs expose a hw_pattern sysfs entry which accepts a limited
set of patterns but allows to use dedicated hardware for blinking the
LED. This way, battery life can be improved and the LED still blinks,
even if the device is suspended.
2024-06-09 11:21:20 +02:00
Dylan Van Assche 22e4c33606 fbd-dev-led-multicolor: Support red, green, blue and white LED colors
Provide our own supports_color method to specify which colors are
actually implemented by the driver. RGB LEDs could provide different
colors as well such as orange, purple, etc. but those are not supported
yet.
2024-06-09 11:21:20 +02:00
Dylan Van Assche e43126b007 fbd-dev-led: Rework color API
Drop has_color API since supported colors are set during probing
and can be handled completely separately from the classes for
each type of hardware.

Rename set_color to set_supported_color because the usage
of this API is to check if the color is supported, but not
setting it. Setting the color is also separated from
start_periodic API to re-use multicolor across multiple LED types
with a set_color API. Multicolor LEDs are actually the same as
regular LEDs but they require a few additional sysfs entries to
actually set the color. Single color LEDs only have a single color
so the set_color method just returns TRUE for these LEDs.

Supported colors are advertised through the supports_color API now.
This way, each LED driver define which colors are supported
through supports_color API. RGB multicolor LEDs will report only fixed colors
like red, blue, green and white until the kernel can expose if a diffusor
is present to mix these colors.
2024-06-09 11:21:19 +02:00
Guido Günther d5b0f30205 tests: Add umockdev based tests for leds
This ensures we can probe the different led types correctly

The umockdev data was recoreded on an Librem 5 and Librem 14
2024-05-17 06:24:50 +00:00