diff options
author | Rhyland Klein <rklein@nvidia.com> | 2011-05-24 15:05:59 -0400 |
---|---|---|
committer | Anton Vorontsov <cbouatmailru@gmail.com> | 2011-07-08 08:53:07 -0400 |
commit | 58ddafae2d7102d8f493840cb7aca0b4b2326b2a (patch) | |
tree | 33490b6266c2e9367bcf3549860aae7ee18ed857 /include/linux/power | |
parent | 906649de0eacde7a643b5a0750de6207441ad54f (diff) |
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 @@ | |||
29 | * @battery_detect: GPIO which is used to detect battery presence | 29 | * @battery_detect: GPIO which is used to detect battery presence |
30 | * @battery_detect_present: gpio state when battery is present (0 / 1) | 30 | * @battery_detect_present: gpio state when battery is present (0 / 1) |
31 | * @i2c_retry_count: # of times to retry on i2c IO failure | 31 | * @i2c_retry_count: # of times to retry on i2c IO failure |
32 | * @poll_retry_count: # of times to retry looking for new status after | ||
33 | * external change notification | ||
32 | */ | 34 | */ |
33 | struct bq20z75_platform_data { | 35 | struct bq20z75_platform_data { |
34 | int battery_detect; | 36 | int battery_detect; |
35 | int battery_detect_present; | 37 | int battery_detect_present; |
36 | int i2c_retry_count; | 38 | int i2c_retry_count; |
39 | int poll_retry_count; | ||
37 | }; | 40 | }; |
38 | 41 | ||
39 | #endif | 42 | #endif |