summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@quicinc.com>2017-05-26 21:11:11 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2017-05-26 21:11:10 -0700
commit55be72faa535ac89fb348522ac8c51059d51c6a1 (patch)
tree14bb7e13733fa19829b8ec6f2a42e2d739b9fa20
parentec7abeae1af7a6e322888575cfee27ec4e4cc582 (diff)
parente91e2202ec0b63f9e272ce2e075f58cfd90d7082 (diff)
Merge "power_supply: introduce PR_SWAP property"
-rw-r--r--drivers/power/power_supply_sysfs.c1
-rw-r--r--drivers/power/supply/qcom/smb-lib.c1
-rw-r--r--include/linux/power_supply.h1
3 files changed, 3 insertions, 0 deletions
diff --git a/drivers/power/power_supply_sysfs.c b/drivers/power/power_supply_sysfs.c
index 8d7322a325de..bd77e55bafc6 100644
--- a/drivers/power/power_supply_sysfs.c
+++ b/drivers/power/power_supply_sysfs.c
@@ -296,6 +296,7 @@ static struct device_attribute power_supply_attrs[] = {
POWER_SUPPLY_ATTR(ctm_current_max),
POWER_SUPPLY_ATTR(hw_current_max),
POWER_SUPPLY_ATTR(real_type),
+ POWER_SUPPLY_ATTR(pr_swap),
/* Local extensions of type int64_t */
POWER_SUPPLY_ATTR(charge_counter_ext),
/* Properties of type `const char *' */
diff --git a/drivers/power/supply/qcom/smb-lib.c b/drivers/power/supply/qcom/smb-lib.c
index f16d4e32643a..4c66bc500ab4 100644
--- a/drivers/power/supply/qcom/smb-lib.c
+++ b/drivers/power/supply/qcom/smb-lib.c
@@ -866,6 +866,7 @@ int smblib_set_icl_current(struct smb_charger *chg, int icl_ua)
goto enable_icl_changed_interrupt;
}
} else {
+ set_sdp_current(chg, 100000);
rc = smblib_set_charge_param(chg, &chg->param.usb_icl, icl_ua);
if (rc < 0) {
smblib_err(chg, "Couldn't set HC ICL rc=%d\n", rc);
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
index aa8edf9928eb..5cc13e9fbd8f 100644
--- a/include/linux/power_supply.h
+++ b/include/linux/power_supply.h
@@ -248,6 +248,7 @@ enum power_supply_property {
POWER_SUPPLY_PROP_CTM_CURRENT_MAX,
POWER_SUPPLY_PROP_HW_CURRENT_MAX,
POWER_SUPPLY_PROP_REAL_TYPE,
+ POWER_SUPPLY_PROP_PR_SWAP,
/* Local extensions of type int64_t */
POWER_SUPPLY_PROP_CHARGE_COUNTER_EXT,
/* Properties of type `const char *' */