diff options
author | Balaji Rao <balajirrao@openmoko.org> | 2009-11-04 16:24:55 -0500 |
---|---|---|
committer | Anton Vorontsov <cbouatmailru@gmail.com> | 2009-11-15 19:28:31 -0500 |
commit | 31b4ff06e01a9a98a8e6ae6e8c42213648eec1d1 (patch) | |
tree | 1ba2e40e552da32d63e644d972ddc1cfc7be5343 /include/linux | |
parent | 7677f33f0a813e98612dce97d5342c1f5046878a (diff) |
pcf50633: introduces battery charging current control
Implement a new sysfs attribute to allow changing MBC charging limit on
the fly independently of usb current limit. It also gets set
automatically every time usb current limit is changed.
Limiting charging current also prevents violating USB specification in
the case when the whole device is shut down and usb current limit is
reset to the factory default by the pcf50633 state transition.
Signed-off-by: Balaji Rao <balajirrao@openmoko.org>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/mfd/pcf50633/core.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/mfd/pcf50633/core.h b/include/linux/mfd/pcf50633/core.h index 9aba7b779fbc..09af8fdfbb5d 100644 --- a/include/linux/mfd/pcf50633/core.h +++ b/include/linux/mfd/pcf50633/core.h | |||
@@ -31,6 +31,13 @@ struct pcf50633_platform_data { | |||
31 | 31 | ||
32 | int charging_restart_interval; | 32 | int charging_restart_interval; |
33 | 33 | ||
34 | /* | ||
35 | * Should be set accordingly to the reference resistor used, see | ||
36 | * I_{ch(ref)} charger reference current in the pcf50633 User | ||
37 | * Manual. | ||
38 | */ | ||
39 | int charger_reference_current_ma; | ||
40 | |||
34 | /* Callbacks */ | 41 | /* Callbacks */ |
35 | void (*probe_done)(struct pcf50633 *); | 42 | void (*probe_done)(struct pcf50633 *); |
36 | void (*mbc_event_callback)(struct pcf50633 *, int); | 43 | void (*mbc_event_callback)(struct pcf50633 *, int); |