Despite the darp9 supporting an RGB backlit keyboard, the keyboard
option was removed and it ships with a white-only LED backlit keyboard
instead. The keypad `/` still has the cycle symbol printed on it, so
replace the color cycling function with the keyboard brightness
function used by other white-only LED keyboards (the 14" TKL ones).
Signed-off-by: Tim Crawford <tcrawford@system76.com>
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>
Make `white_dac` functions work based on the DAC power level like the
other I2C and PWM mechanisms, instead of preset values from an array.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Existing FDAT values remain unchanged in their functionality.
New functionality is added to fill unused FDAT values.
FDAT values correspond to the following functionality:
- 0: Set brightness
- 1: Get brightness
- 2: Get backlight type (new)
- 3: Set color
- 4: Get color (new)
- 5: <unused>
- 6: Set brightness (duplicate)
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Use RGBKB-DET# to determine the type of keyboard connected.
If a white keyboard is attached, always set the color to white, and
always return white for the color.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Limit PL4 based on AC state for all units, not just those with dGPUs.
This will allow setting standard values in coreboot.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Make all boards except oryp11 use the legacy PECI implementation. The
oryp11 removed the legacy pin (H_PECI) and must use PECI over eSPI.
All boards that use eSPI should switch to using PECI over eSPI once the
implementation is working correctly.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Unconditionally set the power limit based on the current AC state when
power_set_limit is called. The contional logic to run it only on ACIN#
state change is already done in power_event.
Signed-off-by: Tim Crawford <tcrawford@system76.com>