The application that I'm working with has changed its model from polling
the battery to waiting for uevents. The power_supply class is setup to
send uevents when you call power_supply_changed(). I need to get
information in bq27000_battery.c so I can call power_supply_changed()
and I'm not sure what the best was to do this is.
Essentially, I need to get notified somehow when there is a change in
the charger, current, or anything else that changes to pass it along to
the application (health, temp, capacity, etc). I think I can somehow use
the apm_queue_event to get charging state, but not certain. It appears
that there is a notification going out to it from pcf50633.c. By the
way, I'm also unclear why pcf50633_get_power_status() is not setup if
you are a gta02.
Looking at another implementation in drivers/power, i see it gets an
interrupt when there is a change in battery conditions. Is this pretty
much the pcfirq[2]? Does the PCF50633_INT3_ADCRDY interrupt occur on a
change in capacity? I was thinking I could add a notify callback in
pcf50633.c and when bq2700_battery.c initializes set it to a routine
that gets the notice. Sort of like apm_get_power_status gets registered
(or used to).
I seem to recall reading something like that in emails that have been
floating around here. Did someone do this already?
Any help would be greatly appreciated,
Sean