devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh+dt@kernel.org>
To: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Cc: "Rafał Miłecki" <zajec5@gmail.com>,
	"Richard Purdie" <rpurdie@rpsys.net>,
	"Linux LED Subsystem" <linux-leds@vger.kernel.org>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"Rafał Miłecki" <rafal@milecki.pl>
Subject: Re: [PATCH 1/4] dt-bindings: leds: document property for LED triggers
Date: Wed, 1 Mar 2017 16:55:19 -0600	[thread overview]
Message-ID: <CAL_JsqKJrarV__0-CSsT-zuQuDVzbmoKN915HC30HPmfmAKZ=g@mail.gmail.com> (raw)
In-Reply-To: <386c5b7b-0bc0-d286-6cbb-745a5adbc1e9@gmail.com>

On Wed, Mar 1, 2017 at 3:04 PM, Jacek Anaszewski <jacek.anaszewski@gmail.com> wrote:
> On 02/28/2017 11:12 PM, Rob Herring wrote:
>> On Tue, Feb 28, 2017 at 3:51 PM, Rafał Miłecki <zajec5@gmail.com> wrote:
>>> On 02/28/2017 10:38 PM, Jacek Anaszewski wrote:
>>>>
>>>> I think that it would be simpler if we could initially see
>>>> a complete sample dts implementation containing all required DT
>>>> nodes. The example could contain timer trigger as well as usb-port
>>>> trigger specific bindings.
>>>
>>>
>>> Please take a look at attached patch. I used it on Tenda AC9 with:
>>
>> I'm not sure about this extra level of indirection. I don't see the need.
>>
>>> usb_trigger: usb-trigger {
>>>         trigger-type = "usbport";
>>
>> Why do we need to know the type? The trigger device knows what type it
>> is. All we should need to know here is what device(s) controls an LED.
>> The rest the kernel can figure out.
>
> The thing is that in the proposed approach the trigger is not necessary
> a device. The trigger node is here only a container with initialization
> data.

That sounds like a questionable use of DT.

> We could have e,g, two such nodes with different set of ports
> (say usb1-trigger and usb2-trigger). Then if we had two LED nodes usb1
> and usb2, the former could have its triggers property initialized
> to &usb1-trigger and the latter to &usb2-trigger. Thanks to that both
> LEDs after executing "echo usbport > triggers" would listen to events
> from different set of usb ports.

This would still work if the trigger property points directly

> Also, e.g. for the timer trigger we could define two separate DT nodes
> with different delay intervals.

That sounds like user config to me.

>
>>>         ports = <&ohci_port1>, <&ehci_port1>;
>>> };
>>>
>>> usb {
>>>         label = "bcm53xx:blue:usb";
>>>         gpios = <&chipcommon 1 GPIO_ACTIVE_HIGH>;
>>>         triggers = <&usb_trigger>;
>>> };
>>
>
> --
> Best regards,
> Jacek Anaszewski

  reply	other threads:[~2017-03-01 22:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-28 12:04 [PATCH 1/4] dt-bindings: leds: document property for LED triggers Rafał Miłecki
2017-02-28 12:04 ` [PATCH 2/4] leds: triggers: add early support for trigger-type DT property Rafał Miłecki
2017-02-28 12:04 ` [PATCH 3/4] dt-bindings: leds: document binding for LED timer trigger Rafał Miłecki
     [not found] ` <20170228120452.10043-1-zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-02-28 12:04   ` [PATCH 4/4] leds: triggers: support timer trigger DT bindings Rafał Miłecki
2017-02-28 21:38   ` [PATCH 1/4] dt-bindings: leds: document property for LED triggers Jacek Anaszewski
2017-02-28 21:51     ` Rafał Miłecki
2017-02-28 22:12       ` Rob Herring
2017-03-01 21:04         ` Jacek Anaszewski
2017-03-01 22:55           ` Rob Herring [this message]
     [not found]           ` <386c5b7b-0bc0-d286-6cbb-745a5adbc1e9-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-03-06  6:06             ` Rafał Miłecki
2017-03-12 11:44               ` Rob Herring
     [not found]       ` <290ed068-2518-50ef-4d02-394bef8b7ee9-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-03-01 21:04         ` Jacek Anaszewski
2017-03-06  6:16           ` Rafał Miłecki
2017-03-06 19:59             ` Jacek Anaszewski

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='CAL_JsqKJrarV__0-CSsT-zuQuDVzbmoKN915HC30HPmfmAKZ=g@mail.gmail.com' \
    --to=robh+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jacek.anaszewski@gmail.com \
    --cc=linux-leds@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=rafal@milecki.pl \
    --cc=rpurdie@rpsys.net \
    --cc=zajec5@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;
as well as URLs for NNTP newsgroup(s).