Re: 2.6: drivers/input/power.c is never built

From: Pavel Machek
Date: Fri Feb 18 2005 - 16:01:49 EST


Hi!

> > Well, I'm not sure if input layer is suitable for batteries... Modern
> > battery has quite a lot of parameters. It can tell you current
> > voltage, current capacity (either mAh or mWh), design capacity, last
> > capacity at full charge, current current, battery's estimate of run
> > time (which may be better than system's estimate), ... But some
> > batteries only know percentage of energy left, and some batteries only
> > know current voltage (you can estimate %left from that). I'm not sure
> > if input system can handle all that complexity...
>
> I wouldn't want to pass all the battery info (UPSes can be even more
> complex, able to switch on/off individual sockets, etc) through input,
> just the basic events:
>
> AC power on/off
> battery full/normal/low/critical/(fail)
>
> Then the other power-related events
>
> Lid open/closed
> Power button
> Sleep button
>
> I think that's all you need to trigger actions. You don't need the exact
> percentage of the battery, and you don't need the exact AC voltage at
> input.
>
> Nice graphics battery monitors in X can gather their information from
> the platform specific sources, since they'll need it all in the greatest
> detail.

Makes sense. Other possibility is to have simple "battery status
changed" event, but that would not be enough for simple UPSes... I
guess battery full/normal/low/critical makes sense, perhaps I'd say
that battery might repeat event if something "interesting" changed.

Pavel
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/