mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
leds: cros_ec: Implement hw_offloaded() trigger callback
"chromeos-auto" is a private hardware control trigger which always stays in hardware control. Implement hw_offloaded() callback with its return value to be always true to reflect this. Reviewed-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Ike Panhc <ikepanhc@gmail.com> Signed-off-by: Rong Zhang <i@rong.moe> Link: https://patch.msgid.link/20260921-leds-trigger-hw-changed-v7-6-fe3cdb6dec51@rong.moe Signed-off-by: Lee Jones <lee@kernel.org>
This commit is contained in:
parent
8e04e5382a
commit
b366a50d39
|
|
@ -85,12 +85,18 @@ static int cros_ec_led_trigger_activate(struct led_classdev *led_cdev)
|
|||
return cros_ec_led_send_cmd(priv->cros_ec, &arg);
|
||||
}
|
||||
|
||||
static bool cros_ec_led_trigger_hw_offloaded(struct led_classdev *led_cdev)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static struct led_hw_trigger_type cros_ec_led_trigger_type;
|
||||
|
||||
static struct led_trigger cros_ec_led_trigger = {
|
||||
.name = "chromeos-auto",
|
||||
.trigger_type = &cros_ec_led_trigger_type,
|
||||
.activate = cros_ec_led_trigger_activate,
|
||||
.hw_offloaded = cros_ec_led_trigger_hw_offloaded,
|
||||
};
|
||||
|
||||
static int cros_ec_led_brightness_set_blocking(struct led_classdev *led_cdev,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user