1 /* SPDX-License-Identifier: GPL-2.0-only */
6 * Chrome EC Keyboard Backlight interface
10 Name (_HID, "GOOG0002")
13 /* Ask EC if we even have a backlight
14 * Return 0xf (present, enabled, show in UI, functioning) or 0
16 * With older EC codebases that don't support the Device
17 * Features bitfield, this reports the keyboard backlight as
18 * enabled since reads to undefined addresses in EC address
19 * space return 0xff and so KBLE will be 1.
21 Method (_STA, 0, NotSerialized)
23 /* If query is unsupported, but this code is compiled
24 * in, assume the backlight exists physically.
26 If (\_SB.PCI0.LPCB.EC0.DFUD == 1) {
29 /* If EC reports that backlight exists, trust it */
30 If (\_SB.PCI0.LPCB.EC0.KBLE == 1) {
33 /* Otherwise: no device -> disable */
37 /* Read current backlight value */
38 Method (KBQC, 0, NotSerialized)
40 Return (\_SB.PCI0.LPCB.EC0.KBLV)
43 /* Write new backlight value */
44 Method (KBCM, 1, NotSerialized)
46 \_SB.PCI0.LPCB.EC0.KBLV = Arg0