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>
This commit is contained in:
parent
7677f33f0a
commit
31b4ff06e0
2 changed files with 80 additions and 5 deletions
|
@ -31,6 +31,13 @@ struct pcf50633_platform_data {
|
|||
|
||||
int charging_restart_interval;
|
||||
|
||||
/*
|
||||
* Should be set accordingly to the reference resistor used, see
|
||||
* I_{ch(ref)} charger reference current in the pcf50633 User
|
||||
* Manual.
|
||||
*/
|
||||
int charger_reference_current_ma;
|
||||
|
||||
/* Callbacks */
|
||||
void (*probe_done)(struct pcf50633 *);
|
||||
void (*mbc_event_callback)(struct pcf50633 *, int);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue