From: Jacek Anaszewski <jacek.anaszewski@gmail.com>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>,
linux-leds@vger.kernel.org, linux-acpi@vger.kernel.org,
devicetree@vger.kernel.org, mika.westerberg@intel.com,
rafael@kernel.org
Subject: Re: [PATCH 1/2] ACPI: Document how to refer to LEDs from remote nodes
Date: Mon, 18 Sep 2017 20:14:10 +0200 [thread overview]
Message-ID: <59f91a5f-bad2-b4a1-ae41-58073ba395b0@gmail.com> (raw)
In-Reply-To: <20170918103419.qo3sw5vufqojj3vm@valkosipuli.retiisi.org.uk>
Hi Sakari,
On 09/18/2017 12:34 PM, Sakari Ailus wrote:
> Hi Jacek,
>
> Thanks for the feedback.
>
> On Sun, Sep 17, 2017 at 06:57:09PM +0200, Jacek Anaszewski wrote:
>> Hi Sakari,
>>
>> Thanks for the patch.
>>
>> On 09/15/2017 04:40 PM, Sakari Ailus wrote:
>>> Document referring to LEDs from remote device nodes, such as from camera
>>> sensors.
>>>
>>> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
>>> ---
>>> Documentation/acpi/dsd/leds.txt | 94 +++++++++++++++++++++++++++++++++++++++++
>>> 1 file changed, 94 insertions(+)
>>> create mode 100644 Documentation/acpi/dsd/leds.txt
>>>
>>> diff --git a/Documentation/acpi/dsd/leds.txt b/Documentation/acpi/dsd/leds.txt
>>> new file mode 100644
>>> index 000000000000..894c82274f53
>>> --- /dev/null
>>> +++ b/Documentation/acpi/dsd/leds.txt
>>> @@ -0,0 +1,94 @@
>>> +Describing and referring to LEDs in ACPI
>>> +
>>> +Individual LEDs are described by hierarchical data extension [6] nodes
>>> +under the device node, the LED driver chip. The "led" property in the
>>> +LED specific nodes tells the numerical ID of each individual LED. The
>>> +"led" property is used here in a similar fashion as the "reg" property
>>> +in DT. [3]
>>> +
>>> +Referring to LEDs in Device tree is documented in [4], in "flash-leds"
>>> +property documentation. In short, LEDs are directly referred to by
>>> +using phandles.
>>> +
>>> +While Device tree allows referring to any node in the tree[1], in ACPI
>>> +references are limited to device nodes only [2]. For this reason using
>>> +the same mechanism on ACPI is not possible.
>>> +
>>> +ACPI allows (as does DT) using integer arguments after the reference.
>>> +A combination of the LED driver device reference and an integer
>>> +argument, referring to the "led" property of the relevant LED, are
>>> +use to individual LEDs.
>>
>> s/are use/is used/ ? (in a sense "combination of ... and .. is used")
>>
>> s/to individual/to describe individual/
>>
>> (or another verb, I'm not sure what exactly you intended it to be)
>
> I'll use "is used to identify", for this is what it essentially is for.
With that:
Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
>> The value of the LED property is a contract
>>> +between the firmware and software, it uniquely identifies the LED
>>> +driver outputs.
>>> +
>>> +An ASL example of a camera sensor device and a LED driver device for two
>>> +LEDs. Objects not relevant for LEDs or the references to them have been
>>> +omitted.
>>> +
>>> + Device (LED)
>>> + {
>>> + Name (_DSD, Package () {
>>> + ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
>>> + Package () {
>>> + Package () { "led0", LED0 },
>>> + Package () { "led1", LED1 },
>>> + }
>>> + })
>>> + Name (LED0, Package () {
>>> + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
>>> + Package () {
>>> + Package () { "led", 0 },
>>> + Package () { "flash-max-microamp", 1000000 },
>>> + Package () { "flash-timeout-us", 200000 },
>>> + Package () { "led-max-microamp", 100000 },
>>> + Package () { "label", "led:salama" },
>>> + }
>>> + })
>>> + Name (LED1, Package () {
>>> + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
>>> + Package () {
>>> + Package () { "led", 1 },
>>> + Package () { "led-max-microamp", 10000 },
>>> + Package () { "label", "led:huomiovalo" },
>>> + }
>>> + })
>>> + }
>>> +
>>> + Device (SEN)
>>> + {
>>> + Name (_DSD, Package () {
>>> + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
>>> + Package () {
>>> + Package () {
>>> + "flash-leds",
>>> + Package () { ^LED, 0, ^LED, 1 },
>>> + }
>>> + }
>>> + })
>>> + }
>>> +
>>> +where
>>> +
>>> + LED LED driver device
>>> + LED0 First LED
>>> + LED1 Second LED
>>> + SEN Camera sensor device (or another device the LED is
>>> + related to)
>>> +
>>> +[1] Device tree. <URL:http://www.devicetree.org>, referenced 2016-10-03.
>>> +
>>> +[2] Advanced Configuration and Power Interface Specification.
>>> + <URL:http://www.uefi.org/sites/default/files/resources/ACPI_6_1.pdf>,
>>> + referenced 2016-10-04.
>>> +
>>> +[3] Documentation/devicetree/bindings/leds/common.txt
>>> +
>>> +[4] Documentation/devicetree/bindings/media/video-interfaces.txt
>>> +
>>> +[5] Device Properties UUID For _DSD.
>>> + <URL:http://www.uefi.org/sites/default/files/resources/_DSD-device-properties-UUID.pdf>,
>>> + referenced 2016-10-04.
>>> +
>>> +[6] Hierarchical Data Extension UUID For _DSD.
>>> + <URL:http://www.uefi.org/sites/default/files/resources/_DSD-hierarchical-data-extension-UUID-v1.pdf>,
>>> + referenced 2016-10-04.
>>>
>>
>> --
>> Best regards,
>> Jacek Anaszewski
>
--
Best regards,
Jacek Anaszewski
next prev parent reply other threads:[~2017-09-18 18:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-15 14:40 [PATCH 0/2] ACPI LED and LED flash support, ACPI support for AS3645A LED flash controller Sakari Ailus
2017-09-15 14:40 ` [PATCH 1/2] ACPI: Document how to refer to LEDs from remote nodes Sakari Ailus
2017-09-17 16:57 ` Jacek Anaszewski
2017-09-18 10:34 ` Sakari Ailus
2017-09-18 18:14 ` Jacek Anaszewski [this message]
2017-09-15 14:40 ` [PATCH 2/2] as3645a: Switch to fwnode property API Sakari Ailus
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=59f91a5f-bad2-b4a1-ae41-58073ba395b0@gmail.com \
--to=jacek.anaszewski@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=mika.westerberg@intel.com \
--cc=rafael@kernel.org \
--cc=sakari.ailus@iki.fi \
--cc=sakari.ailus@linux.intel.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;
as well as URLs for NNTP newsgroup(s).