diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2008-11-16 14:16:47 -0500 |
---|---|---|
committer | Samuel Ortiz <samuel@sortiz.org> | 2009-01-04 06:17:38 -0500 |
commit | 14431aa0c5a443d13d24e6f865a8838f97dab973 (patch) | |
tree | b0494cf2787cf039f7541439ef9b1f6ee5c3b294 /include/linux/mfd/wm8350/core.h | |
parent | 3fba19ec1ae5b460c73a7f32efed8d3b3300b246 (diff) |
power_supply: Add support for WM8350 PMU
This patch adds support for the PMU provided by the WM8350 which
implements battery, line and USB supplies including a battery charger.
The hardware functions largely autonomously, with minimal software
control required to initiate fast charging.
Support for configuration of the USB supply is not yet implemented.
This means that the hardware will remain in the mode configured at
startup, by default limiting the current drawn from USB to 100mA.
This driver was originally written by Liam Girdwood with subsequent
updates for submission by Mark Brown.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
Diffstat (limited to 'include/linux/mfd/wm8350/core.h')
-rw-r--r-- | include/linux/mfd/wm8350/core.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/linux/mfd/wm8350/core.h b/include/linux/mfd/wm8350/core.h index cc190055b9c4..d2614dfc9397 100644 --- a/include/linux/mfd/wm8350/core.h +++ b/include/linux/mfd/wm8350/core.h | |||
@@ -57,6 +57,9 @@ | |||
57 | #define WM8350_OVER_CURRENT_INT_STATUS_MASK 0x25 | 57 | #define WM8350_OVER_CURRENT_INT_STATUS_MASK 0x25 |
58 | #define WM8350_GPIO_INT_STATUS_MASK 0x26 | 58 | #define WM8350_GPIO_INT_STATUS_MASK 0x26 |
59 | #define WM8350_COMPARATOR_INT_STATUS_MASK 0x27 | 59 | #define WM8350_COMPARATOR_INT_STATUS_MASK 0x27 |
60 | #define WM8350_MISC_OVERRIDES 0xE3 | ||
61 | #define WM8350_COMPARATOR_OVERRIDES 0xE7 | ||
62 | #define WM8350_STATE_MACHINE_STATUS 0xE9 | ||
60 | 63 | ||
61 | #define WM8350_MAX_REGISTER 0xFF | 64 | #define WM8350_MAX_REGISTER 0xFF |
62 | 65 | ||
@@ -523,6 +526,29 @@ | |||
523 | #define WM8350_DC2_STS 0x0002 | 526 | #define WM8350_DC2_STS 0x0002 |
524 | #define WM8350_DC1_STS 0x0001 | 527 | #define WM8350_DC1_STS 0x0001 |
525 | 528 | ||
529 | /* | ||
530 | * R227 (0xE3) - Misc Overrides | ||
531 | */ | ||
532 | #define WM8350_USB_LIMIT_OVRDE 0x0400 | ||
533 | |||
534 | /* | ||
535 | * R227 (0xE7) - Comparator Overrides | ||
536 | */ | ||
537 | #define WM8350_USB_FB_OVRDE 0x8000 | ||
538 | #define WM8350_WALL_FB_OVRDE 0x4000 | ||
539 | #define WM8350_BATT_FB_OVRDE 0x2000 | ||
540 | |||
541 | |||
542 | /* | ||
543 | * R233 (0xE9) - State Machinine Status | ||
544 | */ | ||
545 | #define WM8350_USB_SM_MASK 0x0700 | ||
546 | #define WM8350_USB_SM_SHIFT 8 | ||
547 | |||
548 | #define WM8350_USB_SM_100_SLV 1 | ||
549 | #define WM8350_USB_SM_500_SLV 5 | ||
550 | #define WM8350_USB_SM_STDBY_SLV 7 | ||
551 | |||
526 | /* WM8350 wake up conditions */ | 552 | /* WM8350 wake up conditions */ |
527 | #define WM8350_IRQ_WKUP_OFF_STATE 43 | 553 | #define WM8350_IRQ_WKUP_OFF_STATE 43 |
528 | #define WM8350_IRQ_WKUP_HIB_STATE 44 | 554 | #define WM8350_IRQ_WKUP_HIB_STATE 44 |