mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
platform/x86: uniwill-laptop: Implement .hw_offloaded trigger callback
Since commit8e04e5382a("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:
parent
6cea839b2d
commit
086aeca907
|
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user