diff options
| author | Lee Jones <lee.jones@linaro.org> | 2012-05-31 10:16:36 -0400 |
|---|---|---|
| committer | Lee Jones <lee.jones@linaro.org> | 2013-03-06 23:35:36 -0500 |
| commit | 93ff722e88530b9719cbf53be4f3197722461394 (patch) | |
| tree | 7803b080fdf52c91b50aa2719ee82f55a6165bc1 /include/linux/mfd/abx500 | |
| parent | 330b7ebfa59d70ea5b814a04a28b8c7d8e462a81 (diff) | |
ab8500-fg: Add power cut feature for ab8505 and ab8540
Add support for a power cut feature which allows user to
configure when ab8505 and ab8540 based platforms should shut
down system due to low battery.
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'include/linux/mfd/abx500')
| -rw-r--r-- | include/linux/mfd/abx500/ab8500-bm.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/mfd/abx500/ab8500-bm.h b/include/linux/mfd/abx500/ab8500-bm.h index 8d35bfe164c8..0efbe0efee7f 100644 --- a/include/linux/mfd/abx500/ab8500-bm.h +++ b/include/linux/mfd/abx500/ab8500-bm.h | |||
| @@ -235,6 +235,14 @@ | |||
| 235 | /* Battery type */ | 235 | /* Battery type */ |
| 236 | #define BATTERY_UNKNOWN 00 | 236 | #define BATTERY_UNKNOWN 00 |
| 237 | 237 | ||
| 238 | /* Registers for pcut feature in ab8505 and ab9540 */ | ||
| 239 | #define AB8505_RTC_PCUT_CTL_STATUS_REG 0x12 | ||
| 240 | #define AB8505_RTC_PCUT_TIME_REG 0x13 | ||
| 241 | #define AB8505_RTC_PCUT_MAX_TIME_REG 0x14 | ||
| 242 | #define AB8505_RTC_PCUT_FLAG_TIME_REG 0x15 | ||
| 243 | #define AB8505_RTC_PCUT_RESTART_REG 0x16 | ||
| 244 | #define AB8505_RTC_PCUT_DEBOUNCE_REG 0x17 | ||
| 245 | |||
| 238 | /** | 246 | /** |
| 239 | * struct res_to_temp - defines one point in a temp to res curve. To | 247 | * struct res_to_temp - defines one point in a temp to res curve. To |
| 240 | * be used in battery packs that combines the identification resistor with a | 248 | * be used in battery packs that combines the identification resistor with a |
| @@ -283,6 +291,11 @@ struct ab8500_fg; | |||
| 283 | * points. | 291 | * points. |
| 284 | * @maint_thres This is the threshold where we stop reporting | 292 | * @maint_thres This is the threshold where we stop reporting |
| 285 | * battery full while in maintenance, in per cent | 293 | * battery full while in maintenance, in per cent |
| 294 | * @pcut_enable: Enable power cut feature in ab8505 | ||
| 295 | * @pcut_max_time: Max time threshold | ||
| 296 | * @pcut_flag_time: Flagtime threshold | ||
| 297 | * @pcut_max_restart: Max number of restarts | ||
| 298 | * @pcut_debunce_time: Sets battery debounce time | ||
| 286 | */ | 299 | */ |
| 287 | struct ab8500_fg_parameters { | 300 | struct ab8500_fg_parameters { |
| 288 | int recovery_sleep_timer; | 301 | int recovery_sleep_timer; |
| @@ -299,6 +312,11 @@ struct ab8500_fg_parameters { | |||
| 299 | int battok_raising_th_sel1; | 312 | int battok_raising_th_sel1; |
| 300 | int user_cap_limit; | 313 | int user_cap_limit; |
| 301 | int maint_thres; | 314 | int maint_thres; |
| 315 | bool pcut_enable; | ||
| 316 | u8 pcut_max_time; | ||
| 317 | u8 pcut_flag_time; | ||
| 318 | u8 pcut_max_restart; | ||
| 319 | u8 pcut_debunce_time; | ||
| 302 | }; | 320 | }; |
| 303 | 321 | ||
| 304 | /** | 322 | /** |
