[lkml]   [2007]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 3/8] Universal power supply class (was: battery class)
Hello Henrique, Shem,

On Sat, May 05, 2007 at 12:54:13AM -0300, Henrique de Moraes Holschuh wrote:
> On Fri, 04 May 2007, Shem Multinymous wrote:
> > >+enum power_supply_type {
> > >+};
> >
> > How about dumb (non-USB) DC power? Any reason to distinguish it from AC?
> Hmm, if it should not be distinguished, it is better to rename AC to
> something that means continuous power. But I'd rather have it AC and DC, as
> something might have both supplies separate, and you might want to
> differentiate them for some (human interface) reason. After all, USB and DC
> are not really different anyway...
> Anyway, what IS the difference between UPS and battery, or UPS and AC/DC for
> that matter? When should UPS be used? If you have UPS there, should not
> MGG (motor-generator group) also be provided?
> Given that USB-power *is* usually also "dumb" (i.e. it doesn't do any
> control signaling over the USB bus for power-control purposes), IMHO it
> might be better to have just battery, AC and DC as types. And a primary and
> secondary notion too, as that is common. It would be generic.
> Or maybe I just didn't get the idea behind the "type" attribute :-)
> I'd appreciate if these were documented in the text file.

I think I got the start point of confusion. It's indeed bad to call such
power supply type as AC. Maybe I should it rename to ADAPTER? Or WALL?

type, is really `type' of power supply: imagine icon GUI application will
use for different types. Type is not alternating/direct current stuff,
it will be better to impelemnt `current_type' attribute for such matter.

As for Battery/UPS difference.. yes, they're quite similar.. but again,
imagine laptop with battery, and connected to UPS. ;-) How userspace
will differ internal battery from UPS? Yup, by type attribute. I hope
it makes sense... If not, we simply can remove UPS type.

And again, much thanks for your review and ideas!

Anton Vorontsov
backup email:
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-05-05 18:19    [W:0.117 / U:5.996 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site