All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafał Miłecki" <rafal@milecki.pl>
To: "Jacek Anaszewski" <jacek.anaszewski@gmail.com>,
	"Rafał Miłecki" <zajec5@gmail.com>,
	"Richard Purdie" <rpurdie@rpsys.net>,
	linux-leds@vger.kernel.org
Cc: Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	devicetree@vger.kernel.org
Subject: Re: [PATCH 1/4] dt-bindings: leds: document property for LED triggers
Date: Mon, 6 Mar 2017 07:16:26 +0100	[thread overview]
Message-ID: <cd92c387-f484-4806-c5fd-9c55d0fc0aef@milecki.pl> (raw)
In-Reply-To: <28982a47-20b5-f90b-c1d8-b470e4019a08@gmail.com>

On 03/01/2017 10:04 PM, Jacek Anaszewski wrote:
> On 02/28/2017 10:51 PM, Rafał Miłecki 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:
>>
>> usb_trigger: usb-trigger {
>>     trigger-type = "usbport";
>>     ports = <&ohci_port1>, <&ehci_port1>;
>> };
>>
>> usb {
>>     label = "bcm53xx:blue:usb";
>>     gpios = <&chipcommon 1 GPIO_ACTIVE_HIGH>;
>>     triggers = <&usb_trigger>;
>> };
>
> OK, I got it, thanks.
>
>>
>>> I suppose that we should see DT nodes containing #list-cells
>>> properties that define the quantity of phandle arguments.
>>>
>>> It seems that this approach allows for defining a list of elements
>>> with variable number of arguments, i.e. what you were initially
>>> asking for.
>>
>> Are you sure we need #list-cells? Can't we simply use
>> of_count_phandle_with_args(np, "triggers", NULL);
>> ?
>
> I'm not sure, I just read the function documentation :-)
> I haven't verified nor have I used this API.

So we could use #list-cells to support something like:

usb {
	label = "bcm53xx:blue:usb";
	gpios = <&chipcommon 1 GPIO_ACTIVE_HIGH>;
	triggers = <&usb_trigger 1 2>, <&timer_trigger 3 4 5>;
};

but I don't see any need for this. Just specifying triggers like:
triggers = <&usb_trigger>, <&timer_trigger>, <&foo>;
should be always enough, especially with the new trigger nodes you suggested.

  reply	other threads:[~2017-03-06  9:52 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
     [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 [this message]
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=cd92c387-f484-4806-c5fd-9c55d0fc0aef@milecki.pl \
    --to=rafal@milecki.pl \
    --cc=devicetree@vger.kernel.org \
    --cc=jacek.anaszewski@gmail.com \
    --cc=linux-leds@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.