[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110114161851.GA11087@oksana.dev.rtsoft.ru>
Date: Fri, 14 Jan 2011 19:18:51 +0300
From: Anton Vorontsov <cbouatmailru@...il.com>
To: Vasily Khoruzhick <anarsoul@...il.com>
Cc: linux-kernel@...r.kernel.org, Richard Purdie <rpurdie@...ys.net>,
"Arnaud Patard (Rtp)" <arnaud.patard@...-net.org>
Subject: Re: [RFC PATCH 2/2] power_supply: Add new LED trigger
charging-blink-solid-full
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@...il.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@...il.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists