diff options
author | Rhyland Klein <rklein@nvidia.com> | 2011-05-24 23:05:59 +0400 |
---|---|---|
committer | Anton Vorontsov <cbouatmailru@gmail.com> | 2011-07-08 16:53:07 +0400 |
commit | 58ddafae2d7102d8f493840cb7aca0b4b2326b2a (patch) | |
tree | 33490b6266c2e9367bcf3549860aae7ee18ed857 /include/linux/power | |
parent | 906649de0eacde7a643b5a0750de6207441ad54f (diff) | |
download | linux-58ddafae2d7102d8f493840cb7aca0b4b2326b2a.tar.xz |
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>
Diffstat (limited to 'include/linux/power')
-rw-r--r-- | include/linux/power/bq20z75.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/power/bq20z75.h b/include/linux/power/bq20z75.h index b0843b68af92..1398eb004e83 100644 --- a/include/linux/power/bq20z75.h +++ b/include/linux/power/bq20z75.h @@ -29,11 +29,14 @@ * @battery_detect: GPIO which is used to detect battery presence * @battery_detect_present: gpio state when battery is present (0 / 1) * @i2c_retry_count: # of times to retry on i2c IO failure + * @poll_retry_count: # of times to retry looking for new status after + * external change notification */ struct bq20z75_platform_data { int battery_detect; int battery_detect_present; int i2c_retry_count; + int poll_retry_count; }; #endif |