[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090612223141.GF17688@elf.ucw.cz>
Date: Sat, 13 Jun 2009 00:31:42 +0200
From: Pavel Machek <pavel@....cz>
To: Brian Swetland <swetland@...gle.com>
Cc: Ian Molton <ian@...menth.co.uk>,
Russell King - ARM Linux <linux@....linux.org.uk>,
kernel list <linux-kernel@...r.kernel.org>,
linux-arm-kernel <linux-arm-kernel@...ts.arm.linux.org.uk>,
san@...roid.com, rlove@...gle.com, Greg KH <greg@...ah.com>
Subject: Re: HTC Dream aka. t-mobile g1 support
On Fri 2009-06-12 15:27:01, Brian Swetland wrote:
> On Fri, Jun 12, 2009 at 3:02 PM, Ian Molton<ian@...menth.co.uk> wrote:
> > Brian Swetland wrote:
> >
> >> Yup. It's an HTC specific thing -- some of their devices don't have a
> >> battery gauge IC and estimate current drain based on hints provided to
> >> the baseband from the apps processor. I'm not particularly thrilled
> >> with the interface, but without it the battery level estimation is
> >> flakier.
> >
> > Is there a reason that this couldnt be done in userspace?
>
> It'd be a lot more overhead -- in some cases it's updated with
> relatively fine granularity (wifi driver changing state, backlight
> changing, etc), and on the kernel side it's just updating a shared
> memory location with the current estimate. Userspace doesn't
> necessarily have the visibility into driver state to update it
> accurately, and punching that information down to userspace and then
> having userspace feed it back up to the kernel seems like more
> overhead and code to maintain to me.
Actually I agree with Brian here, this is better done at kernel level.
OTOH, at least initially, it does not need to be done at all. It will
make battery readings less reliable but hey... the battery meter does
not work reliably anyway and estimating capacity left from voltage
acceptably on other platforms...
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
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