kbled: Add a "step" function for BKL hotkey

Replace the get+set logic with a step function to change the backlight
level for `K_KBD_BKL`.

Keyboards using a DAC have a different set of levels due to the
brightness difference between the keyboards.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
This commit is contained in:
Tim Crawford
2023-05-19 16:20:20 -06:00
committed by Jeremy Soller
parent 4c9d3197b8
commit 9ac513128a
3 changed files with 25 additions and 2 deletions

View File

@ -175,7 +175,7 @@ static void hardware_hotkey(uint16_t key) {
fan_max = !fan_max;
break;
case K_KBD_BKL:
kbled_set(kbled_get() + 1);
kbled_hotkey_step();
break;
case K_KBD_COLOR:
if (acpi_ecos != EC_OS_FULL)