[PATCH] Use the pcf50633 APM emulation code (applies to -andy branch)

Holger Freyther zecke at openmoko.org
Sat Jul 26 06:43:13 CEST 2008

On Saturday 26 July 2008 06:30:48 Holger Freyther wrote:
> On Saturday 26 July 2008 03:54:05 Mike (mwester) wrote:
> > enable-pcf50633-apm-emulation.patch
> >
> > Use the pcf50633 APM emulation code.  This needs to be enabled to go
> > along with the recent change to disable CONFIG_APM_POWER in the gta02
> > defconfig (prior to disabling that defconfig entry, the generic APM_POWER
> > driver was being used; without this change, no APM power driver is being
> > used and /proc/apm returns no useful information at all.
> Hey,
> I have missed the discussion on disabling CONFIG_APM_POWER for gta02 can
> someone point me to this?

I had a quick look and both defconfig-2.6.24 and defconfig-gta02 of the stable 
branch have CONFIG_APM_POWER enabled and this makes total sense. 
CONFIG_APM_POWER will use the bq27000 battery driver to get its accurate 
data. Using the ADC of the pcf50633 with a coulomb counter battery makes 
little sense (see the mailinglist archive on this huge thread).

So my questions are:
	- You have a GTA02 (probably you have a prototype?)
	- You have a battery with coulomb  counter (It has a CC sign in between the 
(+) and (-) sign? I suspect you don't.
	- Where was CONFIG_APM_POWER disabled?

So what would be cool but we discarded back then is. Detect if you have a CC 
or old style battery at runtime and change the APM emulation pointer whenever 
the user is switching the battery. And this should be more easy now than it 
was before...

good morning

cat /proc/apm 
1.13 1.2 0x02 0x01 0x00 0x00 92% 15897 min

More information about the openmoko-kernel mailing list