Re: [PATCH 3/5] power_supply: add a TRICKLE_CHARGING status, andadd it to the olpc driver

From: Mark Brown
Date: Tue Jun 23 2009 - 06:37:38 EST

On Mon, Jun 22, 2009 at 11:46:07PM -0400, Andres Salomon wrote:

> The hardware has an extra bit that specifies that the battery is trickle
> charging, so when determining if the battery is present/charging the TRICKLE
> bit needs to be checked as well. Because battery diagnostics might want to
> know whether trickle charging is happening or not, and also because trickle
> charging falls somewhere between charging and not charging (read: Richard got
> mad at me when I tried to set CHARGING when in trickle charge. He gets so
> angry sometimes), we add a new TRICKLE status to sysfs.

To avoid confusing usere applications might it be better to add another
piece of information with detail on the charger status rather than a new
state? The fact that the new state name shares a prefix with the
regular charging state does help here but you might still confuse things
and it makes the name of the new state in sysfs a bit awkward.

I'd also be tempted to do this the other way around and add a fast
charge status; certainly in embedded cases trickle charging is more of a
default state since it requires less incoming power (important if you're
using USB) and there's less risk of damage to the battery.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at