bq27xxx: changed events for (charging) status?

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

 



Hi,

I'm playing with userland (udev and UPower), and I am encountering a few
problems - the charging state is updated relatively slowly, and udev
events do not seem to trigger when the charging state changes.

UPower depends on power_supply events from the specific devices to
update its values. It uses udev to do so, but it seems that events are
only triggered when the capacity of the battery changes (not when the
charging state changes). The problem here is that UPower then doesn't
detect a change in charging state until the battery capacity changes,
which can take a long time.

bq27xxx_battery_update seems to check only for capacity changes when it
fires an event:

    if (di->cache.capacity != cache.capacity)
        power_supply_changed(di->bat);

So it doesn't seem to trigger (udev/uevent) events at all when the state
changes.

What would be an appropriate way to fire events when the battery status
changes? Perhaps adding it to the cache makes sense, and then also
update the status in bq27xxx_battery_update? And then finally, also
trigger power_supply_changed when the battery status changes? (If so,
let me know, I'm happy to write that patch)

The other 'problem' I have observed is that it takes a few seconds for
the (charging) status to change to/from charging/discharging, but
perhaps this is not weird and to be expected. I believe this was faster
on the original Maemo 5 kernel, but it's not a really big deal.

Cheers,
Merlijn

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux