webOS-ports / luneos-testing

Public testing images for LuneOS
3 stars 0 forks source link

Add leds support on mainline devices #25

Open Herrie82 opened 9 months ago

Herrie82 commented 9 months ago

Is your feature request related to a problem? Please describe. We have a nyx-modules for leds for hybris based devices, would be good to replicate for mainline since there is proper led support in kernels now.

We might want to bring back CoreNaviLeds in luna-sysmgr: https://github.com/webOS-ports/luna-sysmgr/commit/f9973a3672394c55d35311999f4d5d6546de4bab

Describe the solution you'd like Replicate above for mainline. led can be enabled by setting brightness value. "echo 100 > brightness"

root@pinephonepro:/sys/class/leds# ls -l lrwxrwxrwx 1 root root 0 Apr 28 2022 blue:indicator -> ../../devices/platform/leds/leds/blue:indicator lrwxrwxrwx 1 root root 0 Apr 28 2022 green:indicator -> ../../devices/platform/leds/leds/green:indicator lrwxrwxrwx 1 root root 0 Apr 28 2022 mmc2:: -> ../../devices/platform/fe330000.mmc/leds/mmc2:: lrwxrwxrwx 1 root root 0 Apr 28 2022 red:indicator -> ../../devices/platform/leds/leds/red:indicator lrwxrwxrwx 1 root root 0 Apr 28 2022 white:flash -> ../../devices/platform/led-controller/leds/white:flash

Additional context See also: https://source.puri.sm/Librem5/feedbackd/-/blob/main/src/fbd-ledctrl.c https://source.puri.sm/Librem5/feedbackd/-/blob/main/src/fbd-dev-led-multicolor.c https://source.puri.sm/Librem5/feedbackd/-/blob/main/src/fbd-dev-led.c https://source.puri.sm/Librem5/feedbackd/-/blob/main/src/fbd-dev-leds.c https://source.puri.sm/Librem5/feedbackd/-/blob/main/src/fbd-feedback-led.c

Tofee commented 9 months ago

I see there's already https://github.com/webOS-ports/nyx-modules/blob/webOS-ports/webOS-OSE/src/led_controller/led_controller.c , what's missing there?

Herrie82 commented 9 months ago

I think that only does lcd backlight?