[Gta04-owner] bq27x00 driver for Replicant
Alexandre Roumiantsev
ran at mail.wplus.net
Tue Apr 1 07:33:35 CEST 2014
Hello
I have try this change:
> And found that there is a slightly (or significantly) different rule when to report power_supply_changed()
>
> We have:
>
>
> flags_changed = di->cache.flags ^ cache.flags;
> di->cache = cache;
> if (is_bq27500)
> flags_changed &= BQ27500_FLAGS_IMPORTANT;
> else
> flags_changed &= BQ27000_FLAGS_IMPORTANT;
> if (flags_changed)
> power_supply_changed(&di->bat);
>
> Linus/master has:
>
> if (memcmp(&di->cache, &cache, sizeof(cache)) != 0) {
> di->cache = cache;
> power_supply_changed(&di->bat);
> }
>
> So our driver reports only changes in *important* flags. And nothing else. And *important*
> is mainly the charging status as seen by the bq27x00 chip.
For me it looks work well even with poll_interval = 360;
For test You can try the build:
https://drive.google.com/file/d/0B-rRgKAzYyoBYUo0MnN4OEN4dUU/edit?usp=sharing
So small step ahead have done. Thank to all.
Best regards, Alexandre.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.goldelico.com/pipermail/gta04-owner/attachments/20140401/b964e88c/attachment.bin>
More information about the Gta04-owner
mailing list