Closed Flamefire closed 2 years ago
Ok scratch that. Using the timer trigger works, but is not good for an RGB LED: They need to be in sync.
The correct use is:
1 > rgb/sync_state
[brightness],0 > [color]/lut_pwm
onMs > [color]/pause_lo_multi
offMs > [color]/pause_hi_multi
0 > [color]/step_duration
1 > rgb/start_blink
brightness needs to be scaled to [color]/max_brightness
(possibly max_mix_brightness
or max_single_brightness
but those are set by somc,max_current
in the dtsi file and are equal, 511 here)
Generic question: What is the source of the defconfig files? I.e. the comment states to not modify them directly as they are auto-generated.
Here: I want to add
CONFIG_LEDS_TRIGGER_TIMER = y
to at least the lilac configs to enable custom control over the LEDs without the SONY blobs. See also https://github.com/sonyxperiadev/kernel/commit/3d0a2a4b2bf7d00de909c2a8fa79bdfd0ed13a80Any reason to not add it directly to arch/arm64/configs/lineage-msm8998-yoshino-lilac_defconfig? If so, what is the best place to add it?
It also might make sense to add the
qcom,use-blink;
to the RGB LEDs at https://github.com/whatawurst/android_kernel_sony_msm8998/blob/690d8622ba9b283aee71eec90baff4140ebe0578/arch/arm/boot/dts/qcom/msm8998-yoshino-lilac_common.dtsi#L408 as the liblights might want to use it: https://github.com/whatawurst/android_device_sony_yoshino-common/blob/8caad0bfff6fda594d672e6206d1d28dfac28262/hardware/qcom-caf/display/liblight/lights.c#L72