Re: [PATCH 2/2] platform/chrome: cros_kbd_led_backlight: Remove obsolete commands (EC_CMD_PWM_*_KEYBOARD_BACKLIGHT)

From: Brian Norris
Date: Mon Mar 25 2024 - 21:23:10 EST


On Mon, Mar 25, 2024 at 5:30 PM Stephen Horvath
<s.horvath@xxxxxxxxxxxxxx> wrote:
> my laptop seems to support both so I'll agree
> the older commands are probably the safer option.

Huh, it's surprising to me that it supports both, if one was marked
obsolete. But I haven't tracked the development in the EC firmware
that closely recently.

If the old command works, it's probably safe to keep using it. But
it's possible we'll eventually see some device with firmware that
doesn't support the old one, and we'll have to update the kernel
drivers for both. Note that there's an existing driver for the newer
generic PWM command protocol:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/pwm/pwm-cros-ec.c?h=v6.8

So far, it's only been used on Device Tree systems as far as I can
tell, and one would probably have to wire it up differently for an
ACPI system. I just mention it as an FYI.

Brian