From: Hans de Goede <hdegoede@redhat.com>
To: "Krzysztof Kozlowski" <krzysztof.kozlowski@linaro.org>,
"Gergo Koteles" <soyer@irl.hu>,
"Ike Panhc" <ike.pan@canonical.com>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Pavel Machek" <pavel@ucw.cz>, "Lee Jones" <lee@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
"Conor Dooley" <conor+dt@kernel.org>
Cc: platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH 1/3] dt-bindings: leds: add LED_FUNCTION_FNLOCK
Date: Wed, 3 Apr 2024 10:39:33 +0200 [thread overview]
Message-ID: <4956933c-49c4-49ab-a91a-7e0efcc211d5@redhat.com> (raw)
In-Reply-To: <368e9817-0000-4f69-9f09-568827466121@linaro.org>
Hi,
On 4/3/24 10:36 AM, Krzysztof Kozlowski wrote:
> On 03/04/2024 10:31, Hans de Goede wrote:
>> Hi Krzysztof,
>>
>> On 4/2/24 3:55 PM, Krzysztof Kozlowski wrote:
>>> On 02/04/2024 15:21, Gergo Koteles wrote:
>>>> Newer laptops have FnLock LED.
>>>>
>>>> Add a define for this very common function.
>>>>
>>>> Signed-off-by: Gergo Koteles <soyer@irl.hu>
>>>> ---
>>>> include/dt-bindings/leds/common.h | 1 +
>>>
>>> Do we really need to define all these possible LED functions? Please
>>> link to DTS user for this.
>>
>> It is useful to have well established names for common
>> LED functions instead of having each driver come up
>> with its own name with slightly different spelling
>> for various fixed function LEDs.
>>
>> This is even documented in:
>>
>> Documentation/leds/leds-class.rst :
>>
>> """
>> LED Device Naming
>> =================
>>
>> Is currently of the form:
>>
>> "devicename:color:function"
>>
>> ...
>>
>>
>> - function:
>> one of LED_FUNCTION_* definitions from the header
>> include/dt-bindings/leds/common.h.
>> """
>>
>> Note this even specifies these definitions should go into
>> include/dt-bindings/leds/common.h .
>>
>> In this case there is no dts user (yet) only an in kernel
>> driver which wants to use a LED_FUNCTION_* define to
>> establish how to identify FN-lock LEDs going forward.
>
> Ack, reasonable.
>
>>
>> Since a lot of LED_FUNCTION_* defines happen to be used
>> in dts files these happen to live under include/dt-bindings/
>> but the dts files are not the only consumer of these defines (1).
>
> Yes, but if there was no DTS consumer at all, then it is not a binding,
> so it should not go to include/dt-bindings.
>
>>
>> IMHO having a hard this must be used in a dts file rule
>> is not helpful for these kinda files with defines shared
>> between dts and non dts cases.
>>
>> If we were to follow this logic then any addition to
>>
>> include/uapi/linux/input-event-codes.h
>>
>> must have a dts user before being approved too ? Since
>> that file is included from include/dt-bindings/input/input.h ?
>
> Wait, that's UAPI :) and we just share the constants. That's kind of
> special case, but I get what you mean.
>
>>
>> TL;DR: not only is this patch fine, this is actually
>> the correct place to add such a define according to
>> the docs in Documentation/leds/leds-class.rst :
>>
>> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
>
> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Thanks. Is it ok for me to merge this through the pdx86
tree (once I've reviewed the other 2 patches) ?
Regards,
Hans
next prev parent reply other threads:[~2024-04-03 8:39 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-02 13:20 [PATCH 0/3] add FnLock LED class device to ideapad laptops Gergo Koteles
2024-04-02 13:21 ` [PATCH 1/3] dt-bindings: leds: add LED_FUNCTION_FNLOCK Gergo Koteles
2024-04-02 13:55 ` Krzysztof Kozlowski
2024-04-02 14:36 ` Gergo Koteles
2024-04-02 18:08 ` Krzysztof Kozlowski
2024-04-02 18:50 ` Gergo Koteles
2024-04-03 8:33 ` Hans de Goede
2024-04-03 8:31 ` Hans de Goede
2024-04-03 8:36 ` Krzysztof Kozlowski
2024-04-03 8:39 ` Hans de Goede [this message]
2024-04-03 8:46 ` Krzysztof Kozlowski
2024-04-03 8:51 ` Hans de Goede
2024-04-11 7:13 ` Lee Jones
2024-04-02 13:21 ` [PATCH 2/3] platform/x86: ideapad-laptop: add fn_lock_get/set functions Gergo Koteles
2024-04-08 15:49 ` Hans de Goede
2024-04-08 15:49 ` Hans de Goede
2024-04-02 13:21 ` [PATCH 3/3] platform/x86: ideapad-laptop: add FnLock LED class device Gergo Koteles
2024-04-08 15:50 ` Hans de Goede
2024-04-15 13:35 ` [PATCH 0/3] add FnLock LED class device to ideapad laptops Hans de Goede
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=4956933c-49c4-49ab-a91a-7e0efcc211d5@redhat.com \
--to=hdegoede@redhat.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=ike.pan@canonical.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=platform-driver-x86@vger.kernel.org \
--cc=robh@kernel.org \
--cc=soyer@irl.hu \
/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®