devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Milo Kim <milo.kim@ti.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Bryan Wu <cooloney@gmail.com>, Richard Purdie <rpurdie@rpsys.net>,
	linux-leds@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH] leds: lp55xx: enable setting default trigger
Date: Mon, 16 Sep 2013 08:42:26 +0900	[thread overview]
Message-ID: <523645E2.9040108@ti.com> (raw)
In-Reply-To: <1379242217-32398-1-git-send-email-linus.walleij@linaro.org>

On 09/15/2013 07:50 PM, Linus Walleij wrote:
> This enables setting a default trigger on an LP55xx channel,
> either from platform data or device tree. This mechanism is
> identical to the mechanism for GPIO LEDs and references the
> common LEDs device tree bindings.
>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Acked-by: Milo Kim <milo.kim@ti.com>

> ---
>   Documentation/devicetree/bindings/leds/leds-lp55xx.txt | 10 +++++++---
>   drivers/leds/leds-lp55xx-common.c                      |  3 +++
>   include/linux/platform_data/leds-lp55xx.h              |  1 +
>   3 files changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/leds/leds-lp55xx.txt b/Documentation/devicetree/bindings/leds/leds-lp55xx.txt
> index a61727f..d221e75 100644
> --- a/Documentation/devicetree/bindings/leds/leds-lp55xx.txt
> +++ b/Documentation/devicetree/bindings/leds/leds-lp55xx.txt
> @@ -17,12 +17,15 @@ Optional properties:
>            2: D1~6 with VOUT, D7~9 with VDD
>            3: D1~9 are connected to VOUT
>
> -Alternatively, each child can have specific channel name
> -- chan-name: Name of each channel name
> +Alternatively, each child can have a specific channel name and trigger:
> +- chan-name (optional): name of channel
> +- linux,default-trigger (optional): see
> +  Documentation/devicetree/bindings/leds/common.txt
>
>   example 1) LP5521
>   3 LED channels, external clock used. Channel names are 'lp5521_pri:channel0',
> -'lp5521_pri:channel1' and 'lp5521_pri:channel2'
> +'lp5521_pri:channel1' and 'lp5521_pri:channel2', with a heartbeat trigger
> +on channel 0.
>
>   lp5521@32 {
>   	compatible = "national,lp5521";
> @@ -33,6 +36,7 @@ lp5521@32 {
>   	chan0 {
>   		led-cur = /bits/ 8 <0x2f>;
>   		max-cur = /bits/ 8 <0x5f>;
> +		linux,default-trigger = "heartbeat";
>   	};

And this DT example works well with 'ledtrig-heartbeat' module.

Tested-by: Milo Kim <milo.kim@ti.com>

Thanks.

Best regards,
Milo

  reply	other threads:[~2013-09-15 23:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-15 10:50 [PATCH] leds: lp55xx: enable setting default trigger Linus Walleij
2013-09-15 23:42 ` Milo Kim [this message]
2013-09-16 16:47   ` Bryan Wu

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=523645E2.9040108@ti.com \
    --to=milo.kim@ti.com \
    --cc=cooloney@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=rpurdie@rpsys.net \
    /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).