[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [PATCH] apm-emu displays time till battery is fully charged

> > > Why not use /proc/pmu/ for this? Do the real apm has this facility? Maybe
> > > it is not implemented, because it couldn't be there.
> >
> > Most userland code is written for /proc/apm (hence the emulation hack). If
> > you can get the gnome-battery etc. authors convinced to try /proc/pmu/
> > before /proc/apm we would indeed not need apm-emu. /proc/pmu/ would even
> > know about multiple batteries, voltage, current, to name a few.
> >
> that's right, but pmu there's only on ppc... so read /proc/apm is more
> portable solution, by now, IMHO

:-) That's why it still gets used widely, even though it's only a hack on

A real portable solution would be something that exposes the full
feature set of each architecture's power handling framework via one
generic API. Stuff that powerpc has but might be missing on ix86 is
scheduled boot time, or automatic boot on powerup. Not sure this needs to
be handled in-kernel though. Otherwise, yet another user space process
could be talking to the kernel and translate for the rest of user space.

> thanx Soeren, for the patch, i don't know anyway to whom you should send
> it to make it defaulted on kernel, sorry.... maybe to ben herrenschmidt
> or repost to the list, as apparently he did't view this patch... (didn't
> answered)

I concur - the patch is nice and works with no problem here (AlBook 17").
IIRC Ben said the patch needs more testing before integration. How much
more testing, Ben?


Reply to: