mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] platform/x86: uniwill-laptop: Implement .hw_offloaded trigger callback
@ 2026-10-30 19:46 Armin Wolf
  2026-11-02 11:48 ` Ilpo Järvinen
  0 siblings, 1 reply; 3+ messages in thread
From: Armin Wolf @ 2026-10-30 19:46 UTC (permalink / raw)
  To: hansg, ilpo.jarvinen; +Cc: platform-driver-x86, linux-kernel

Since commit 8e04e5382aa9 ("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: d1c0c8996977 ("platform/x86: uniwill-laptop: Implement rainbow animation as trigger")
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
---
 drivers/platform/x86/uniwill/uniwill-acpi.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/platform/x86/uniwill/uniwill-acpi.c b/drivers/platform/x86/uniwill/uniwill-acpi.c
index f62d59f29676..ee444577e691 100644
--- a/drivers/platform/x86/uniwill/uniwill-acpi.c
+++ b/drivers/platform/x86/uniwill/uniwill-acpi.c
@@ -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,
 };
 
-- 
2.56.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] platform/x86: uniwill-laptop: Implement .hw_offloaded trigger callback
  2026-10-30 19:46 [PATCH] platform/x86: uniwill-laptop: Implement .hw_offloaded trigger callback Armin Wolf
@ 2026-11-02 11:48 ` Ilpo Järvinen
  2026-11-03 14:33   ` Armin Wolf
  0 siblings, 1 reply; 3+ messages in thread
From: Ilpo Järvinen @ 2026-11-02 11:48 UTC (permalink / raw)
  To: hansg, Armin Wolf; +Cc: platform-driver-x86, linux-kernel

On Fri, 30 Oct 2026 20:46:44 +0100, Armin Wolf wrote:

> Since commit 8e04e5382aa9 ("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.
> 
> 
> [...]


Thank you for your contribution, it has been applied to my local
review-ilpo-fixes branch. Note it will show up in the public
platform-drivers-x86/review-ilpo-fixes branch only once I've pushed my
local branch there, which might take a while.

The list of commits applied:
[1/1] platform/x86: uniwill-laptop: Implement .hw_offloaded trigger callback
      commit: 086aeca907789bd2604f16f07bfc073b19015015

--
 i.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] platform/x86: uniwill-laptop: Implement .hw_offloaded trigger callback
  2026-11-02 11:48 ` Ilpo Järvinen
@ 2026-11-03 14:33   ` Armin Wolf
  0 siblings, 0 replies; 3+ messages in thread
From: Armin Wolf @ 2026-11-03 14:33 UTC (permalink / raw)
  To: Ilpo Järvinen, hansg; +Cc: platform-driver-x86, linux-kernel

Am 02.11.26 um 12:48 schrieb Ilpo Järvinen:
> On Fri, 30 Oct 2026 20:46:44 +0100, Armin Wolf wrote:
> 
>> Since commit 8e04e5382aa9 ("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.
>>
>>
>> [...]
> 
> 
> Thank you for your contribution, it has been applied to my local
> review-ilpo-fixes branch. Note it will show up in the public
> platform-drivers-x86/review-ilpo-fixes branch only once I've pushed my
> local branch there, which might take a while.
> 
> The list of commits applied:
> [1/1] platform/x86: uniwill-laptop: Implement .hw_offloaded trigger callback
>        commit: 086aeca907789bd2604f16f07bfc073b19015015
> 
> --
>   i.
> 

Thank you :)

Armin Wolf

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-03 14:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-30 19:46 [PATCH] platform/x86: uniwill-laptop: Implement .hw_offloaded trigger callback Armin Wolf
2026-11-02 11:48 ` Ilpo Järvinen
2026-11-03 14:33   ` Armin Wolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®