Linux Kernel
3.7.1
|
#include <smb347-charger.h>
Data Fields | |
struct power_supply_info | battery_info |
unsigned int | max_charge_current |
unsigned int | max_charge_voltage |
unsigned int | pre_charge_current |
unsigned int | termination_current |
unsigned int | pre_to_fast_voltage |
unsigned int | mains_current_limit |
unsigned int | usb_hc_current_limit |
unsigned int | chip_temp_threshold |
int | soft_cold_temp_limit |
int | soft_hot_temp_limit |
int | hard_cold_temp_limit |
int | hard_hot_temp_limit |
bool | suspend_on_hard_temp_limit |
unsigned int | soft_temp_limit_compensation |
unsigned int | charge_current_compensation |
bool | use_mains |
bool | use_usb |
bool | use_usb_otg |
int | irq_gpio |
enum smb347_chg_enable | enable_control |
struct smb347_charger_platform_data - platform data for SMB347 charger : Information about the battery : maximum current (in uA) the battery can be charged : maximum voltage (in uV) the battery can be charged : current (in uA) to use in pre-charging phase : current (in uA) used to determine when the charging cycle terminates : voltage (in uV) treshold used for transitioning to pre-charge to fast charge mode : maximum input current drawn from AC/DC input (in uA) : maximum input high current (in uA) drawn from USB input : die temperature where device starts limiting charge current [%100 - %130] (in degree C) : soft cold temperature limit [%0 - %15] (in degree C), granularity is 5 deg C. : soft hot temperature limit [%40 - %55] (in degree C), granularity is 5 deg C. : hard cold temperature limit [%-5 - %10] (in degree C), granularity is 5 deg C. : hard hot temperature limit [%50 - %65] (in degree C), granularity is 5 deg C. : suspend charging when hard limit is hit : compensation method when soft temperature limit is hit : current (in uA) for charging compensation current when temperature hits soft limits : AC/DC input can be used : USB input can be used : USB OTG output can be used (not implemented yet) : GPIO number used for interrupts (%-1 if not used) : how charging enable/disable is controlled (driver/pin controls)
, , and are means to enable/disable hardware support for these. This is useful when we want to have for example OTG charging controlled via OTG transceiver driver and not by the SMB347 hardware.
Hard and soft temperature limit values are given as described in the device data sheet and assuming NTC beta value is %3750. Even if this is not the case, these values should be used. They can be mapped to the corresponding NTC beta values with the help of table %2 in the data sheet. So for example if NTC beta is %3375 and we want to program hard hot limit to be %53 deg C, should be set to %50.
If zero value is given in any of the current and voltage values, the factory programmed default will be used. For soft/hard temperature values, pass in SMB347_TEMP_USE_DEFAULT instead.
Definition at line 93 of file smb347-charger.h.
struct power_supply_info battery_info |
Definition at line 94 of file smb347-charger.h.
unsigned int charge_current_compensation |
Definition at line 109 of file smb347-charger.h.
unsigned int chip_temp_threshold |
Definition at line 102 of file smb347-charger.h.
enum smb347_chg_enable enable_control |
Definition at line 114 of file smb347-charger.h.
int hard_cold_temp_limit |
Definition at line 105 of file smb347-charger.h.
int hard_hot_temp_limit |
Definition at line 106 of file smb347-charger.h.
int irq_gpio |
Definition at line 113 of file smb347-charger.h.
unsigned int mains_current_limit |
Definition at line 100 of file smb347-charger.h.
unsigned int max_charge_current |
Definition at line 95 of file smb347-charger.h.
unsigned int max_charge_voltage |
Definition at line 96 of file smb347-charger.h.
unsigned int pre_charge_current |
Definition at line 97 of file smb347-charger.h.
unsigned int pre_to_fast_voltage |
Definition at line 99 of file smb347-charger.h.
int soft_cold_temp_limit |
Definition at line 103 of file smb347-charger.h.
int soft_hot_temp_limit |
Definition at line 104 of file smb347-charger.h.
unsigned int soft_temp_limit_compensation |
Definition at line 108 of file smb347-charger.h.
bool suspend_on_hard_temp_limit |
Definition at line 107 of file smb347-charger.h.
unsigned int termination_current |
Definition at line 98 of file smb347-charger.h.
unsigned int usb_hc_current_limit |
Definition at line 101 of file smb347-charger.h.
bool use_mains |
Definition at line 110 of file smb347-charger.h.
bool use_usb |
Definition at line 111 of file smb347-charger.h.
bool use_usb_otg |
Definition at line 112 of file smb347-charger.h.