platform/x86: uniwill-laptop: Implement .hw_offloaded trigger callback

Since commit 8e04e5382a ("leds: trigger: Add hw_offloaded() callback
and provide trigger_may_offload_to_hw attribute") the LED subsystem
allows triggers to report if they are being offloaded to the underlying
hardware. Implement the necessary callback so that the LED subsystem
knows that the lightbar trigger is always offloaded to hardware.

Fixes: d1c0c89969 ("platform/x86: uniwill-laptop: Implement rainbow animation as trigger")
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://patch.msgid.link/20261030194704.424388-1-W_Armin@gmx.de
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
This commit is contained in:
Armin Wolf 2026-10-30 20:46:44 +01:00 committed by Ilpo Järvinen
parent 6cea839b2d
commit 086aeca907
No known key found for this signature in database
GPG Key ID: 59AC4F6153E5CE31

View File

@ -1543,12 +1543,18 @@ static void uniwill_lightbar_trigger_deactivate(struct led_classdev *led_cdev)
dev_err(led_cdev->dev, "Failed to stop rainbow animation: %d\n", ret);
}
static bool uniwill_lightbar_trigger_hw_offloaded(struct led_classdev *led_cdev)
{
return true;
}
static struct led_hw_trigger_type uniwill_lightbar_trigger_type;
static struct led_trigger uniwill_lightbar_trigger = {
.name = "uniwill-rainbow",
.activate = uniwill_lightbar_trigger_activate,
.deactivate = uniwill_lightbar_trigger_deactivate,
.hw_offloaded = uniwill_lightbar_trigger_hw_offloaded,
.trigger_type = &uniwill_lightbar_trigger_type,
};