mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-05 19:31:57 -04:00
drivers: power: Guard SMB5_QG_SOH function
* Fixes battery detection for denver Change-Id: I16087f472b8f06002486141dec23e4a2ef3f9688
This commit is contained in:
parent
6be9fdc19a
commit
e7e3836bc3
3 changed files with 8 additions and 0 deletions
|
|
@ -4815,7 +4815,11 @@ static int qpnp_qg_probe(struct platform_device *pdev)
|
|||
chip->sys_soc = INT_MIN;
|
||||
chip->full_soc = QG_SOC_FULL;
|
||||
chip->chg_iterm_ma = INT_MIN;
|
||||
#ifdef CONFIG_DENVER_DTB
|
||||
chip->soh = -EINVAL;
|
||||
#else
|
||||
chip->soh = 100;
|
||||
#endif
|
||||
chip->esr_actual = -EINVAL;
|
||||
chip->esr_nominal = -EINVAL;
|
||||
chip->batt_age_level = -EINVAL;
|
||||
|
|
|
|||
|
|
@ -33,7 +33,9 @@ enum qg_chg_iio_channels {
|
|||
SMB5_QG_CYCLE_COUNT,
|
||||
SMB5_QG_CHARGE_FULL_DESIGN,
|
||||
SMB5_QG_TIME_TO_FULL_NOW,
|
||||
#ifndef CONFIG_DENVER_DTB
|
||||
SMB5_QG_SOH,
|
||||
#endif
|
||||
};
|
||||
|
||||
enum mmi_cp_iio_channels {
|
||||
|
|
|
|||
|
|
@ -915,7 +915,9 @@ static const char * const smblib_qg_ext_iio_chan[] = {
|
|||
[SMB5_QG_CYCLE_COUNT] = "cycle_count",
|
||||
[SMB5_QG_CHARGE_FULL_DESIGN] = "charge_full_design",
|
||||
[SMB5_QG_TIME_TO_FULL_NOW] = "time_to_full_now",
|
||||
#ifndef CONFIG_DENVER_DTB
|
||||
[SMB5_QG_SOH] = "soh",
|
||||
#endif
|
||||
};
|
||||
|
||||
static int smblib_read_iio_prop(struct smb_charger *chg,
|
||||
|
|
|
|||
Loading…
Reference in a new issue