Commit Graph
11 Commits
Author SHA1 Message Date
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
Dylan Van Assche bcd37b0aa5 fbd-dev-led-*: Adjust to method convention
fbd_dev_led_ is the convention for methods, adjust them all.
2024-06-09 11:18:09 +02:00
Dylan Van Assche 94afe719a9 fbd-dev-led: Scan for RGB color as well
Multicolor LEDs have the color 'rgb', we should also scan it
as they are also a FbdDevLed.
2024-06-07 10:15:39 +02:00
Dylan Van Assche 7f69813e84 fbd-dev-led-multicolor: Fix typo in error message
multicololo -> multicolor LED
2024-06-07 10:15:30 +02:00
Dylan Van Assche 66b616677d fbd-dev-led-multicolor: Use separate log domain
Debugging driver probing is much easier when each driver has its own log domain.
2024-06-07 10:14:45 +02:00
Dylan Van Assche 82c07e28f2 udev: load the required kernel modules
Loading the required kernel modules such as ledtrig-pattern via
/etc/modules-load.d may introduce a race condition on some systems such
as non-systemd based distros. Load the kernel modules using the builtin
'kmod load' udev command instead.
2023-02-08 20:46:00 +01:00
Dylan Van Assche 510f1b6d6e fbd-dev-leds: rename var to max_brightness_percentage
Improve readability of the code.
2022-05-17 20:02:58 +02:00
Dylan Van Assche 572a027fa6 fbd-dev-leds: use define for max_brightness
All other attributes use a define, let's do the same for max_brightness.
2022-05-17 20:02:51 +02:00
Dylan Van Assche 3ac9494821 fbd-feedback-manager: Allow device-specific feedbackd themes
Reads the compatible list of the device and tries to find a device-specific theme file in all  directories. If no configuration is found, we fall back to a default theme file. The device-specific theme file can always be overriden by specifying the FEEDBACK_THEME environment variable
2021-01-01 18:49:38 +01:00
Dylan Van Assche 2e92c181a0 meson.build: compile GLib schemas on install
Run a script as a post install to make sure that all GLib schemas are compiled
2021-01-01 18:38:47 +01:00
Dylan Van Assche e4cdd0bcff data/meson.build: fix validating theme files
The foreach loop was not used to validate all the include theme files
2021-01-01 18:37:30 +01:00