mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jacek Anaszewski <jacek.anaszewski@gmail.com>
To: Armin Wolf <W_Armin@gmx.de>, lee@kernel.org, pavel@kernel.org
Cc: corbet@lwn.net, skhan@linuxfoundation.org,
	linux-leds@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, wse@tuxedocomputers.com,
	pobrn@protonmail.com
Subject: Re: [RFC PATCH 1/1] leds: Introduce the multi_max_intensity sysfs attribute
Date: Mon, 23 Mar 2026 19:12:09 +0100	[thread overview]
Message-ID: <9a6cc642-aa66-4358-9ad7-9e4cc381a07a@gmail.com> (raw)
In-Reply-To: <ea41ff3c-4ee1-4fe4-a348-0c7f28fbd20b@gmx.de>

On 3/23/26 11:22 AM, Armin Wolf wrote:
[...]
>>> led-class-multicolor.h
>>> index db9f34c6736e..67ac0ac0fd54 100644
>>> --- a/include/linux/led-class-multicolor.h
>>> +++ b/include/linux/led-class-multicolor.h
>>> @@ -9,10 +9,33 @@
>>>   #include <linux/leds.h>
>>>   #include <dt-bindings/leds/common.h>
>>>   +#define LED_USE_MAX_BRIGHTNESS 0
>>> +
>>> +/**
>>> + * struct mc_subled - Color component description.
>>> + * @color_index: Color ID.
>>> + * @brightness: Scaled intensity.
>>> + * @intensity: Current intensity.
>>> + * @max_intensity: Maximum supported intensity value.
>>> + * @channel: Channel index.
>>> + *
>>> + * Describes a color component of a multicolor LED. Many multicolor 
>>> LEDs
>>> + * do no support gobal brightness control in hardware, so they use
>>> + * the brightness field in connection with 
>>> led_mc_calc_color_components()
>>> + * to perform the intensity scaling in software.
>>> + * Such drivers should set max_intensity to LED_USE_MAX_BRIGHTNESS
>>
>> I'd just mention here that the field needs to be left initialized to 0,
>> to let the LED subsystem to adjust it to max_brightness. Note that in
>> case of max_brightness we allow for the same - if it is 0, then
>> led-class.c adjusts it to legacy LED_FULL (255).
>>
> OK, do you think that having LED_USE_MAX_BRIGHTNESS makes sense?

Not really, let's drop it.

-- 
Best regards,
Jacek Anaszewski


  reply	other threads:[~2026-03-23 18:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-14 23:01 [RFC PATCH 0/1] " Armin Wolf
2026-03-14 23:01 ` [RFC PATCH 1/1] " Armin Wolf
2026-03-22 15:53   ` Jacek Anaszewski
2026-03-23 10:22     ` Armin Wolf
2026-03-23 18:12       ` Jacek Anaszewski [this message]
2026-03-16 16:18 ` [RFC PATCH 0/1] " Werner Sembach

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=9a6cc642-aa66-4358-9ad7-9e4cc381a07a@gmail.com \
    --to=jacek.anaszewski@gmail.com \
    --cc=W_Armin@gmx.de \
    --cc=corbet@lwn.net \
    --cc=lee@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@kernel.org \
    --cc=pobrn@protonmail.com \
    --cc=skhan@linuxfoundation.org \
    --cc=wse@tuxedocomputers.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

all inboxes | Powered by JetHome®