pmaports/device/testing/linux-xiaomi-lavender/0004-Reduce-battery-spam-in-dmesg.patch
Alexey Min 3456f5fad0
xiaomi-lavender: new device (Xiaomi Redmi Note 7) (!1095)
[ci:skip-build] already built on CI (in 1.5 hours)
2020-04-06 04:38:56 +03:00

87 lines
3.9 KiB
Diff

From 7770adcde4af1c4873d94a6495b93ce83ce4f782 Mon Sep 17 00:00:00 2001
From: Alexey Min <alexey.min@gmail.com>
Date: Wed, 4 Mar 2020 19:39:45 +0300
Subject: [PATCH 4/6] Reduce battery spam in dmesg
Signed-off-by: Alexey Min <alexey.min@gmail.com>
---
drivers/power/supply/qcom/battery.c | 12 ++++++------
drivers/power/supply/qcom/qpnp-smb2.c | 4 ++--
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/power/supply/qcom/battery.c b/drivers/power/supply/qcom/battery.c
index b5a352ba25eb..b31747bc060b 100644
--- a/drivers/power/supply/qcom/battery.c
+++ b/drivers/power/supply/qcom/battery.c
@@ -889,7 +889,7 @@ static int usb_icl_vote_callback(struct votable *votable, void *data,
* USBIN_I_VOTER based on settled current.
*/
if (icl_ua <= 1300000){
- pr_err("icl_ua <= 1300000 disable parallel charger smb1351 \n");
+ pr_devel("icl_ua <= 1300000 disable parallel charger smb1351 \n");
vote(chip->pl_enable_votable_indirect, USBIN_I_VOTER, false, 0);
}
else
@@ -1150,11 +1150,11 @@ static void handle_main_charge_type(struct pl_data *chip)
pr_err("Couldn't get batt charge type rc=%d\n", rc);
return;
}
- pr_err("chip->charge_type =%d, pval.intval=%d \n", chip->charge_type, pval.intval);
+ pr_devel("chip->charge_type =%d, pval.intval=%d \n", chip->charge_type, pval.intval);
/* not fast/not taper state to disables parallel */
if ((pval.intval != POWER_SUPPLY_CHARGE_TYPE_FAST)
&& (pval.intval != POWER_SUPPLY_CHARGE_TYPE_TAPER)) {
- pr_err("main charge CHG_STATE_VOTER disable parllerl charging smb1351\n");
+ pr_devel("main charge CHG_STATE_VOTER disable parllerl charging smb1351\n");
vote(chip->pl_disable_votable, CHG_STATE_VOTER, true, 0);
chip->taper_pct = 100;
vote(chip->pl_disable_votable, TAPER_END_VOTER, false, 0);
@@ -1219,12 +1219,12 @@ static void handle_settled_icl_change(struct pl_data *chip)
return;
}
main_limited = pval.intval;
- pr_err("main_limited=%d, main_settled_ua=%d, chip->pl_settled_ua=%d ,total_current_ua=%d\n", main_limited, main_settled_ua, chip->pl_settled_ua, total_current_ua);
+ pr_devel("main_limited=%d, main_settled_ua=%d, chip->pl_settled_ua=%d ,total_current_ua=%d\n", main_limited, main_settled_ua, chip->pl_settled_ua, total_current_ua);
if ((main_limited && (main_settled_ua + chip->pl_settled_ua) < 1300000)
|| (main_settled_ua == 0)
|| ((total_current_ua >= 0) &&
(total_current_ua <= 1300000))){
- pr_err("total_current_ua <= 1300000 disable parallel charger smb1351 \n");
+ pr_devel("total_current_ua <= 1300000 disable parallel charger smb1351 \n");
vote(chip->pl_enable_votable_indirect, USBIN_I_VOTER, false, 0);
}
else
@@ -1279,7 +1279,7 @@ static void handle_parallel_in_taper(struct pl_data *chip)
* we disable parallel charger
*/
if (pval.intval == POWER_SUPPLY_CHARGE_TYPE_TAPER) {
- pr_err("parallel disabled when smb1351 is taper charge\n");
+ pr_devel("parallel disabled when smb1351 is taper charge\n");
vote(chip->pl_disable_votable, PL_TAPER_EARLY_BAD_VOTER,
true, 0);
return;
diff --git a/drivers/power/supply/qcom/qpnp-smb2.c b/drivers/power/supply/qcom/qpnp-smb2.c
index 5e9db4459a04..8cc4becf2132 100644
--- a/drivers/power/supply/qcom/qpnp-smb2.c
+++ b/drivers/power/supply/qcom/qpnp-smb2.c
@@ -256,7 +256,7 @@ static int smb2_parse_dt(struct smb2 *chip)
"qcom,batteryless-platform");
if (hwc_check_global){
- pr_err("sunxing get global set fcc max 2.3A");
+ pr_debug("sunxing get global set fcc max 2.3A");
chg->batt_profile_fcc_ua = 2300000;
}else{
rc = of_property_read_u32(node,
@@ -1058,7 +1058,7 @@ static int smb2_batt_get_prop(struct power_supply *psy,
case POWER_SUPPLY_PROP_CAPACITY:
rc = smblib_get_prop_batt_capacity(chg, val);
#ifdef XIAOMI_CHARGER_RUNIN
- pr_err("lct battery_capacity =%d\n", val->intval);
+ pr_devel("lct battery_capacity =%d\n", val->intval);
#endif
#ifdef CONFIG_CHARGER_RUNIN
runin_work(chg, val);
--
2.24.1