bq20z75: Add support for external notification
authorRhyland Klein <rklein@nvidia.com>
Tue, 24 May 2011 19:05:59 +0000 (12:05 -0700)
committerAnton Vorontsov <cbouatmailru@gmail.com>
Fri, 8 Jul 2011 12:53:07 +0000 (16:53 +0400)
commit58ddafae2d7102d8f493840cb7aca0b4b2326b2a
tree33490b6266c2e9367bcf3549860aae7ee18ed857
parent906649de0eacde7a643b5a0750de6207441ad54f
bq20z75: Add support for external notification

Adding support for external power change notification. One problem found
is that there is a lag time before the sensor will return a new status.
To ensure that we only fire off the power_supply_changed event when the
status returned from the sensor is actually different, we delay sending
the the notification, and instead poll on it looking for a change. The
amount of time to poll is configurable via platform data.

Signed-off-by: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
drivers/power/bq20z75.c
include/linux/power/bq20z75.h