All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anton Vorontsov <cbouatmailru@gmail.com>
To: Vasily Khoruzhick <anarsoul@gmail.com>
Cc: linux-kernel@vger.kernel.org, Richard Purdie <rpurdie@rpsys.net>,
	"Arnaud Patard (Rtp)" <arnaud.patard@rtp-net.org>
Subject: Re: [RFC PATCH 2/2] power_supply: Add new LED trigger charging-blink-solid-full
Date: Fri, 14 Jan 2011 19:18:51 +0300	[thread overview]
Message-ID: <20110114161851.GA11087@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <1294417697-4692-3-git-send-email-anarsoul@gmail.com>

On Fri, Jan 07, 2011 at 06:28:17PM +0200, Vasily Khoruzhick wrote:
> Add new trigger to power_supply LEDs. It will blink when
> battery is charging, and stay solid when battery is charged.
> It's usefull to indicate battery state when there's only one
> LED available.
> 
> Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>

Strange, I got neither 0/2 nor 1/2.

Anyway, I'm fine with this particular patch, but to take 1/2 via
battery-2.6.git I need Richard's Acked-by tag.

A note wrt the new LEDs API...

> ---
>  drivers/power/power_supply_leds.c |   18 ++++++++++++++++++
>  include/linux/power_supply.h      |    2 ++
>  2 files changed, 20 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/power/power_supply_leds.c b/drivers/power/power_supply_leds.c
> index 031a554..b640bbf 100644
> --- a/drivers/power/power_supply_leds.c
> +++ b/drivers/power/power_supply_leds.c
> @@ -21,6 +21,7 @@
>  static void power_supply_update_bat_leds(struct power_supply *psy)
>  {
>  	union power_supply_propval status;
> +	unsigned long delay_on = 0, delay_off = 0;
[...]
> +		led_trigger_blink(psy->charging_blink_full_solid_trig,
> +			&delay_on, &delay_off);

I think it's better to allow passing NULL to led_trigger_blink()
and thus avoid delay_{on,off} dummy variables.

Thanks,

-- 
Anton Vorontsov
Email: cbouatmailru@gmail.com

  reply	other threads:[~2011-01-14 16:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-07 16:28 [RFC PATCH 0/2] LEDs: power_supply: Add ability to blink via simple trigger Vasily Khoruzhick
2011-01-07 16:28 ` [RFC PATCH 1/2] LEDs: " Vasily Khoruzhick
2011-01-07 16:28 ` [RFC PATCH 2/2] power_supply: Add new LED trigger charging-blink-solid-full Vasily Khoruzhick
2011-01-14 16:18   ` Anton Vorontsov [this message]
2011-01-14 16:37     ` Vasily Khoruzhick
2011-01-31 13:33   ` Anton Vorontsov

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=20110114161851.GA11087@oksana.dev.rtsoft.ru \
    --to=cbouatmailru@gmail.com \
    --cc=anarsoul@gmail.com \
    --cc=arnaud.patard@rtp-net.org \
    --cc=linux-kernel@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 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.