of_batterydata: add fast-charge and CC-to-CV threshold configuration

Add following battery specific properties in battery profile:
- qcom,fastchg-current-ma
- qcom,fg-cc-cv-threshold-mv

CRs-Fixed: 847161
Change-Id: I1c9e18a485392ff23b6f87a2163ab418ea5452f3
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
This commit is contained in:
Ashay Jaiswal 2015-04-27 17:36:14 +05:30
parent e9c93c99d3
commit 9e340a3ccf
3 changed files with 17 additions and 2 deletions

View File

@ -52,6 +52,13 @@ Profile data node optional properties:
- qcom,chg-rs-to-rslow: A constant for rslow compensation in the fuel gauge.
This will be provided by the profiling tool for
additional fuel gauge accuracy during charging.
- qcom,fastchg-current-ma: Specifies the maximum fastcharge current.
- qcom,fg-cc-cv-threshold-mv: Voltage threshold in mV for transition from constant
charge (CC) to constant voltage (CV). This value should
be 10 mV less than the float voltage.
This property should only be specified if
"qcom,autoadjust-vfloat" property is specified in the
charger driver to ensure a proper operation.
Profile data node required subnodes:
- qcom,fcc-temp-lut : An 1-dimensional lookup table node that encodes

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@ -276,6 +276,10 @@ static int of_batterydata_load_battery_data(struct device_node *node,
"max-voltage-uv", node, rc, true);
OF_PROP_READ(batt_data->cutoff_uv, "v-cutoff-uv", node, rc, true);
OF_PROP_READ(batt_data->iterm_ua, "chg-term-ua", node, rc, true);
OF_PROP_READ(batt_data->fastchg_current_ma,
"fastchg-current-ma", node, rc, true);
OF_PROP_READ(batt_data->fg_cc_cv_threshold_mv,
"fg-cc-cv-threshold-mv", node, rc, true);
batt_data->batt_id_kohm = best_id_kohm;

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@ -119,6 +119,8 @@ enum battery_type {
* @iterm_ua: termination current of the battery when charging
* to 100%
* @batt_id_kohm: the best matched battery id resistor value
* @fastchg_current_ma: maximum fast charge current
* @fg_cc_cv_threshold_mv: CC to CV threashold voltage
*/
struct bms_battery_data {
@ -137,6 +139,8 @@ struct bms_battery_data {
int cutoff_uv;
int iterm_ua;
int batt_id_kohm;
int fastchg_current_ma;
int fg_cc_cv_threshold_mv;
const char *battery_type;
};