From: Marek Behun <marek.behun@nic.cz>
To: Rob Herring <robh+dt@kernel.org>
Cc: linux-leds@vger.kernel.org, Pavel Machek <pavel@ucw.cz>,
Jacek Anaszewski <jacek.anaszewski@gmail.com>,
devicetree@vger.kernel.org
Subject: Re: [PATCH v3 leds-next 2/2] dt-bindings: leds: Document Turris Omnia LED controller binding
Date: Fri, 29 Mar 2019 20:00:03 +0100 [thread overview]
Message-ID: <20190329200003.77443bc4@nic.cz> (raw)
In-Reply-To: <20190328193428.19273-3-marek.behun@nic.cz>
Hi Rob,
I have a question about how to design correctly the situation about
global brigthness on this controller in the device tree.
The thing is that these LEDs are, in hardware, controlled via PWM and
SPI, but this is done via microcontroller running a proprietary
firmware. So from the point of view of the CPU, should the LEDs be
described in the device tree as connected to the mircocontroller
direclty, or should pwm and spi nodes be created as well?
Next thing is that the values of the RGB channels for each LED is
controlled via SPI, but the global brightness controlled byt the single
PWM also controls the LED brightnesses globally.
How should this be specified?
Thank you.
> +Example:
> +
> + led-controller@2b {
> + compatible = "cznic,turris-omnia-leds";
> + reg = <0x2b>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + led@0 {
> + reg = <0x0>;
> + label = "userB";
> + linux,default-trigger = "heartbeat";
> + };
> +
> + led@1 {
> + reg = <0x1>;
> + label = "userA";
> + };
> +
> + led@2 {
> + reg = <0x2>;
> + label = "pci3";
> + };
> +
> + led@3 {
> + reg = <0x3>;
> + label = "pci2";
> + };
> +
> + led@4 {
> + reg = <0x4>;
> + label = "pci1";
> + };
> +
> + led@5 {
> + reg = <0x5>;
> + label = "wan";
> + };
> +
> + led@6 {
> + reg = <0x6>;
> + label = "lan4";
> + };
> +
> + led@7 {
> + reg = <0x7>;
> + label = "lan3";
> + };
> +
> + led@8 {
> + reg = <0x8>;
> + label = "lan2";
> + };
> +
> + led@9 {
> + reg = <0x9>;
> + label = "lan1";
> + };
> +
> + led@a {
> + reg = <0xa>;
> + label = "lan0";
> + };
> +
> + led@b {
> + reg = <0xb>;
> + label = "power";
> + };
> + };
next prev parent reply other threads:[~2019-03-29 19:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190328193428.19273-1-marek.behun@nic.cz>
2019-03-28 19:34 ` [PATCH v3 leds-next 2/2] dt-bindings: leds: Document Turris Omnia LED controller binding Marek Behún
2019-03-29 19:00 ` Marek Behun [this message]
2019-03-29 20:40 ` Pavel Machek
2019-04-19 18:10 ` Pavel Machek
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=20190329200003.77443bc4@nic.cz \
--to=marek.behun@nic.cz \
--cc=devicetree@vger.kernel.org \
--cc=jacek.anaszewski@gmail.com \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=robh+dt@kernel.org \
/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).