mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Armin Wolf <W_Armin@gmx.de>
To: hansg@kernel.org, ilpo.jarvinen@linux.intel.com
Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] platform/x86: uniwill-laptop: Implement .hw_offloaded trigger callback
Date: Fri, 30 Oct 2026 20:46:44 +0100	[thread overview]
Message-ID: <20261030194704.424388-1-W_Armin@gmx.de> (raw)

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


             reply	other threads:[~2026-10-30 19:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-30 19:46 Armin Wolf [this message]
2026-11-02 11:48 ` Ilpo Järvinen
2026-11-03 14:33   ` Armin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261030194704.424388-1-W_Armin@gmx.de \
    --to=w_armin@gmx.de \
    --cc=hansg@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®