Linux Documentation
 help / color / mirror / Atom feed
From: "Thomas Weißschuh" <linux@weissschuh.net>
To: Rong Zhang <i@rong.moe>
Cc: "Lee Jones" <lee@kernel.org>, "Pavel Machek" <pavel@kernel.org>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Shuah Khan" <skhan@linuxfoundation.org>,
	"Benson Leung" <bleung@chromium.org>,
	"Guenter Roeck" <groeck@chromium.org>,
	"Marek Behún" <kabel@kernel.org>,
	"Mark Pearson" <mpearson-lenovo@squebb.ca>,
	"Derek J. Clark" <derekjohn.clark@gmail.com>,
	"Hans de Goede" <hansg@kernel.org>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Ike Panhc" <ikepanhc@gmail.com>,
	"Andrew Lunn" <andrew+netdev@lunn.ch>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Vishnu Sankar" <vishnuocv@gmail.com>,
	"Vishnu Sankar" <vsankar@lenovo.com>,
	linux-leds@vger.kernel.org, netdev@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	chrome-platform@lists.linux.dev,
	platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH RFC v2 2/9] leds: cros_ec: Implement offloaded() callback for trigger
Date: Mon, 13 Jul 2026 22:28:04 +0200	[thread overview]
Message-ID: <f028ec00-3a7e-4a12-bfed-dabef2f44be0@t-8ch.de> (raw)
In-Reply-To: <20260618-leds-trigger-hw-changed-v2-2-c28c44053cf3@rong.moe>

On 2026-06-18 00:47:56+0800, Rong Zhang wrote:
> "chromeos-auto" is a private hardware control trigger which always stays
> in hardware control. Implement offloaded() callback with its return
> value to be always true to reflect this.
> 
> Signed-off-by: Rong Zhang <i@rong.moe>

Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>

> ---
>  drivers/leds/leds-cros_ec.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/leds/leds-cros_ec.c b/drivers/leds/leds-cros_ec.c
> index bea3cc3fbfd2..f48e3cf6ccf6 100644
> --- a/drivers/leds/leds-cros_ec.c
> +++ b/drivers/leds/leds-cros_ec.c
> @@ -86,12 +86,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_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,
> +	.offloaded = cros_ec_led_trigger_offloaded,
>  };
>  
>  static int cros_ec_led_brightness_set_blocking(struct led_classdev *led_cdev,
> 
> -- 
> 2.53.0
> 

  reply	other threads:[~2026-07-13 20:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-17 16:47 [PATCH RFC v2 0/9] leds: Add support for hardware-initiated hardware control trigger transition Rong Zhang
2026-06-17 16:47 ` [PATCH RFC v2 1/9] leds: Add callback offloaded() to query the state of hardware control trigger Rong Zhang
2026-07-13 20:27   ` Thomas Weißschuh
2026-06-17 16:47 ` [PATCH RFC v2 2/9] leds: cros_ec: Implement offloaded() callback for trigger Rong Zhang
2026-07-13 20:28   ` Thomas Weißschuh [this message]
2026-06-17 16:47 ` [PATCH RFC v2 3/9] leds: turris-omnia: " Rong Zhang
2026-06-17 16:47 ` [PATCH RFC v2 4/9] leds: trigger: netdev: Implement offloaded() callback Rong Zhang
2026-06-17 16:47 ` [PATCH RFC v2 5/9] leds: Add trigger_may_offload attribute Rong Zhang
2026-07-13 20:36   ` Thomas Weißschuh
2026-07-14 17:23     ` Rong Zhang
2026-06-17 16:48 ` [PATCH RFC v2 6/9] leds: trigger: Add led_trigger_notify_hw_control_changed() interface Rong Zhang
2026-06-17 16:48 ` [PATCH RFC v2 7/9] platform/x86: ideapad-laptop: Decouple hardware & classdev brightness for keyboard backlight Rong Zhang
2026-06-17 16:48 ` [PATCH RFC v2 8/9] platform/x86: ideapad-laptop: Serialize keyboard backlight notifications Rong Zhang
2026-06-17 16:48 ` [PATCH RFC v2 9/9] platform/x86: ideapad-laptop: Fully support auto keyboard backlight Rong Zhang
2026-07-02 13:41 ` [PATCH RFC v2 0/9] leds: Add support for hardware-initiated hardware control trigger transition Lee Jones

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=f028ec00-3a7e-4a12-bfed-dabef2f44be0@t-8ch.de \
    --to=linux@weissschuh.net \
    --cc=andrew+netdev@lunn.ch \
    --cc=bleung@chromium.org \
    --cc=chrome-platform@lists.linux.dev \
    --cc=corbet@lwn.net \
    --cc=derekjohn.clark@gmail.com \
    --cc=groeck@chromium.org \
    --cc=hansg@kernel.org \
    --cc=i@rong.moe \
    --cc=ikepanhc@gmail.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=kabel@kernel.org \
    --cc=kuba@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=mpearson-lenovo@squebb.ca \
    --cc=netdev@vger.kernel.org \
    --cc=pavel@kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=vishnuocv@gmail.com \
    --cc=vsankar@lenovo.com \
    /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