[Gta04-owner] bq27x00 driver for Replicant

Dr. H. Nikolaus Schaller hns at goldelico.com
Thu Mar 27 19:07:49 CET 2014


Am 27.03.2014 um 18:14 schrieb Alexandre Roumiantsev:

> Hello
>> But I wonder why you are doing this? 
>> There appear to be two changes:
>> a) reducing the default poll interval by factor 6
>> And, the battery poll interval can be set from user space when modprobing the module.
>> Simply give the module a parameter "poll_interval=60" but leave the kernel driver as it is.
> I agree that it possible to do as module parameter.

That is the way it should be done. Otherwise it will boomerang back to us as soon as we
want to get something upstream.

>> b) you disable the caching mechanism (which checks for relevant bits) and always notify power_supply_changed()
>> I doubt this is acceptable because I don't see what this has to do with battery status in real time.
>> If there is no change reported from the battery there is no change to be reported to user space...
>> So if you are missing updates, there might be something wrong with the bits reported by the bq27000
>> and that should be fixed.
> I think so, but I repeat that battery technical detail is new for me and I would like that
> somebody, who knows technical well give explanation.

I assume that the battery driver has gone through a lot of reviews since it is part of the
official kernel.org tree. Therefore it must be quite correct and has not been changed recently.

We can also look into the data sheet to better understand how it works.

BTW: git blame drivers//power/bq27x00_battery.c

tells that Neil Brown has added this caching. I hope he is still reading this list
and can comment.

> I only can tell, that according my testing only both changes together give a result
> ( could see battery status in real time ).

I don't doubt that it solves the problem.

The question is if it is the right way to solve it or if it just interacts with some other bug
in a positive way.

But I think now since we know that disabling the battery driver caching solves the
problem it may help to understand why the user space is not getting regular updates
without the patch.


More information about the Gta04-owner mailing list