clearfog: setup LEDs for SFP and LINE/EXPRESS indication
At first, refactor this so that we only have one single package for
userspace LED control. We're still using two system units because the
"status everything is OK" should only be given at the very end of the
boot. The regular LED setup for, e.g., link state monitoring on the
other hand should be performed ASAP.
There's no support for DTS-based trigger setup, which means that we have
to go via userspace. There's sadly no clear way of obtaining the GPIO#
from userspace (`lsgpio` and `gpiofind` return something else) so we
have to rely on debugfs :(.
Change-Id: I835f7e9232a30a54da6454ab4e342ae5b2384b47
diff --git a/package/czechlight-clearfog-leds/Config.in b/package/czechlight-clearfog-leds/Config.in
new file mode 100644
index 0000000..5072348
--- /dev/null
+++ b/package/czechlight-clearfog-leds/Config.in
@@ -0,0 +1,14 @@
+config BR2_PACKAGE_CZECHLIGHT_CLEARFOG_LEDS
+ bool "LED functions for Clearfog-based CzechLight devices"
+ depends on BR2_INIT_SYSTEMD
+ help
+ Userspace configuration of LEDs for indicating various states.
+
+if BR2_PACKAGE_CZECHLIGHT_CLEARFOG_LEDS
+
+config CZECHLIGHT_CLEARFOG_LEDS_BOOT
+ bool "Indicate a successful boot via LEDs"
+ depends on CZECHLIGHT_RAUC_ROOTFS
+ default Y
+
+endif # BR2_PACKAGE_CZECHLIGHT_CLEARFOG_LEDS