From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Aleksandrs Vinarskis <alex@vinarskis.com>
Cc: Hans de Goede <hansg@kernel.org>, Lee Jones <lee@kernel.org>,
Pavel Machek <pavel@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
Jingoo Han <jingoohan1@gmail.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Jean-Jacques Hiblot <jjhiblot@traphandler.com>,
Jacopo Mondi <jacopo@jmondi.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Daniel Thompson <danielt@kernel.org>,
linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
threeway@gmail.com, Andy Shevchenko <andy.shevchenko@gmail.com>,
Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [PATCH v5 3/4] leds: led-class: Add devicetree support to led_get()
Date: Wed, 10 Sep 2025 15:00:53 +0200 [thread overview]
Message-ID: <634ae260-3a7b-475d-b40f-47401a70a53b@oss.qualcomm.com> (raw)
In-Reply-To: <jsLJqyPfjA2iFNHMvAxgz-zO1WecVgleSahWgW_B5BshbYat4X1UqUuKpexfxlRxnD3oWlAnHqeLGpne8JebFV-ICVxvr5g-5nI8P2Q6dY8=@vinarskis.com>
On 9/10/25 2:54 PM, Aleksandrs Vinarskis wrote:
>
>
>
>
>
> On Wednesday, September 10th, 2025 at 14:22, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
>
>>
>>
>> On 9/10/25 2:01 PM, Aleksandrs Vinarskis wrote:
>>
>>> From: Hans de Goede hansg@kernel.org
>>>
>>> Add 'name' argument to of_led_get() such that it can lookup LEDs in
>>> devicetree by either name or index.
>>>
>>> And use this modified function to add devicetree support to the generic
>>> (non devicetree specific) [devm_]led_get() function.
>>>
>>> This uses the standard devicetree pattern of adding a -names string array
>>> to map names to the indexes for an array of resources.
>>>
>>> Reviewed-by: Andy Shevchenko andy.shevchenko@gmail.com
>>> Reviewed-by: Lee Jones lee@kernel.org
>>> Reviewed-by: Linus Walleij linus.walleij@linaro.org
>>> Signed-off-by: Hans de Goede hansg@kernel.org
>>> Signed-off-by: Aleksandrs Vinarskis alex@vinarskis.com
>>> ---
>>
>>
>> I was thinking, perhaps we should introduce some sort of an exclusive
>> access mechanism, so that the e.g. user (or malware) can't listen to
>> uevents and immediately shut down the LED over sysfs
>
> It is already done by the original series from Hans (linked in cover),
> which was merged few years back. It is also the reason why this
> approach is used instead of typically used trigger-source - that
> would've indeed allowed anyone with access to sysfs to disable the
> indicator.
>
> As per Hans [1], v4l2-core would disable sysfs of privacy indicator:
>
> sd->privacy_led = led_get(sd->dev, "privacy-led")
> led_sysfs_disable(sd->privacy_led);
>
>
> Of course, this security only holds if one has secure boot enforced,
> kernel, modules, _and_ device-tree blobs are signed.
Great, thank you for this context
Konrad
next prev parent reply other threads:[~2025-09-10 13:01 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-10 12:01 [PATCH v5 0/4] leds: privacy-led support for devicetree Aleksandrs Vinarskis
2025-09-10 12:01 ` [PATCH v5 1/4] dt-bindings: leds: add generic LED consumer documentation Aleksandrs Vinarskis
2025-09-15 0:01 ` Rob Herring (Arm)
2025-09-10 12:01 ` [PATCH v5 2/4] dt-bindings: leds: commonize leds property Aleksandrs Vinarskis
2025-09-15 0:01 ` Rob Herring (Arm)
2025-09-10 12:01 ` [PATCH v5 3/4] leds: led-class: Add devicetree support to led_get() Aleksandrs Vinarskis
2025-09-10 12:22 ` Konrad Dybcio
2025-09-10 12:54 ` Aleksandrs Vinarskis
2025-09-10 13:00 ` Konrad Dybcio [this message]
2025-09-11 8:15 ` Lee Jones
2025-09-11 9:01 ` Hans de Goede
2025-09-16 15:43 ` Bjorn Andersson
2025-09-16 16:07 ` Lee Jones
2025-09-23 8:36 ` Aleksandrs Vinarskis
2025-09-10 12:01 ` [PATCH v5 4/4] arm64: dts: qcom: sc8280xp-x13s: enable camera privacy indicator Aleksandrs Vinarskis
2025-09-10 12:21 ` Konrad Dybcio
2025-09-10 17:04 ` Steev Klimaszewski
2025-09-10 17:47 ` Steev Klimaszewski
2025-09-16 14:52 ` (subset) [PATCH v5 0/4] leds: privacy-led support for devicetree Lee Jones
2025-10-30 16:25 ` Bjorn Andersson
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=634ae260-3a7b-475d-b40f-47401a70a53b@oss.qualcomm.com \
--to=konrad.dybcio@oss.qualcomm.com \
--cc=alex@vinarskis.com \
--cc=andersson@kernel.org \
--cc=andy.shevchenko@gmail.com \
--cc=bryan.odonoghue@linaro.org \
--cc=conor+dt@kernel.org \
--cc=danielt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=hansg@kernel.org \
--cc=jacopo@jmondi.org \
--cc=jingoohan1@gmail.com \
--cc=jjhiblot@traphandler.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lee@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=pavel@kernel.org \
--cc=robh@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=threeway@gmail.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