[SQUASH] power: supply: Silence massive debug logspam

power/supply: qcom: Silence charging drivers

Signed-off-by: Yaroslav Furman <yaro330@gmail.com>

power: supply: ti: silence charging spam

Signed-off-by: Yaroslav Furman <yaro330@gmail.com>

qpnp-qg: silence qg_get_prop_soc_decimal spam

Signed-off-by: Yaroslav Furman <yaro330@gmail.com>

qpnp-smb5: silence another annoying logger

Signed-off-by: Yaroslav Furman <yaro330@gmail.com>

qcom: smb5-lib: stfu

Signed-off-by: Yaroslav Furman <yaro330@gmail.com>

smb5-lib: silence annoying loggers

Signed-off-by: Yaroslav Furman <yaro330@gmail.com>

power: maxim: silence drivers

Leave actual errors enabled.

Signed-off-by: Yaroslav Furman <yaro330@gmail.com>

power_supply_sysfs: silence 'failed to report 'flash_trigger' spam

Signed-off-by: Yaroslav Furman <yaro330@gmail.com>

qpnp-smb5: silence some kernel spam

Signed-off-by: Yaroslav Furman <yaro330@gmail.com>
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
This commit is contained in:
Yaroslav Furman 2020-12-05 01:52:36 +03:00 committed by Adithya R
parent c0d3ec9799
commit fe557d2e3b
10 changed files with 84 additions and 226 deletions

View File

@ -31,10 +31,10 @@
#include <linux/regmap.h>
#include <linux/random.h>
#define ds_info pr_err
#define ds_dbg pr_err
#define ds_info pr_debug
#define ds_dbg pr_debug
#define ds_err pr_err
#define ds_log pr_err
#define ds_log pr_debug
struct ds28e16_data {
struct platform_device *pdev;
@ -1220,7 +1220,7 @@ static int verify_get_property(struct power_supply *psy, enum power_supply_prope
return -EAGAIN;
break;
default:
ds_err("unsupported property %d\n", psp);
ds_dbg("unsupported property %d\n", psp);
return -ENODATA;
}
@ -1262,7 +1262,7 @@ static int verify_set_property(struct power_supply *psy,
auth_BDCONST = val->intval;
break;
default:
ds_err("unsupported property %d\n", prop);
ds_dbg("unsupported property %d\n", prop);
return -ENODATA;
}

View File

@ -22,10 +22,10 @@
#include <linux/device.h>
#include <linux/spinlock.h>
#define ow_info pr_err
#define ow_dbg pr_err
#define ow_info pr_debug
#define ow_dbg pr_debug
#define ow_err pr_err
#define ow_log pr_err
#define ow_log pr_debug
#define DRV_STRENGTH_16MA (0x7 << 6)
#define DRV_STRENGTH_12MA (0x5 << 6)

View File

@ -114,7 +114,7 @@ static ssize_t power_supply_show_property(struct device *dev,
dev_dbg(dev, "driver has no data for `%s' property\n",
attr->attr.name);
else if (ret != -ENODEV && ret != -EAGAIN)
dev_err_ratelimited(dev,
dev_dbg(dev,
"driver failed to report `%s' property: %zd\n",
attr->attr.name, ret);
return ret;

View File

@ -157,8 +157,6 @@ static int qg_process_tcss_soc(struct qpnp_qg *chip, int sys_soc)
qg_iterm_ua = -1 * prop.intval;
}
pr_err("[%s] qg_iterm_ua=%d\n", __func__, qg_iterm_ua);
rc = power_supply_get_property(chip->batt_psy,
POWER_SUPPLY_PROP_HEALTH, &prop);
if (!rc && (prop.intval == POWER_SUPPLY_HEALTH_COOL ||

View File

@ -1806,7 +1806,7 @@ static int qg_get_prop_soc_decimal(struct qpnp_qg *chip, int *val)
soc_dec = chip->sys_soc % 100;
soc = qg_get_prop_soc_decimal_rate(chip, &dec_rate);
pr_err("debug soc_dec=%d dec_rate=%d last_val=%d last_soc_dec=%d last_hal_soc=%d\n",
pr_debug("debug soc_dec=%d dec_rate=%d last_val=%d last_soc_dec=%d last_hal_soc=%d\n",
soc_dec, dec_rate, last_val, last_soc_dec, last_hal_soc);
if (soc_dec >= 0 && soc_dec < (50 - dec_rate))
@ -1834,7 +1834,7 @@ static int qg_get_prop_soc_decimal(struct qpnp_qg *chip, int *val)
if (last_hal_soc != hal_soc)
last_hal_soc = hal_soc;
pr_err("debug val=%d soc_dec=%d sys_soc=%d dec_rate=%d soc=%d hal_soc=%d last_val=%d last_soc_dec=%d last_hal_soc=%d\n",
pr_debug("debug val=%d soc_dec=%d sys_soc=%d dec_rate=%d soc=%d hal_soc=%d last_val=%d last_soc_dec=%d last_hal_soc=%d\n",
*val, soc_dec, chip->sys_soc, dec_rate, soc, hal_soc, last_val, last_soc_dec, last_hal_soc);
return 0;

View File

@ -1463,7 +1463,7 @@ static int smb5_usb_main_get_prop(struct power_supply *psy,
break;
}
if (rc < 0)
pr_err("Couldn't get prop %d rc = %d\n", psp, rc);
pr_debug("Couldn't get prop %d rc = %d\n", psp, rc);
return rc;
}
@ -1973,7 +1973,6 @@ static int smb5_batt_get_prop(struct power_supply *psy,
rc = smblib_get_prop_batt_awake(chg, val);
break;
default:
pr_err("batt power supply prop %d not supported\n", psp);
return -EINVAL;
}
@ -3840,17 +3839,14 @@ static int thermal_notifier_callback(struct notifier_block *noti, unsigned long
struct fb_event *ev_data = data;
struct smb_charger *chg = container_of(noti, struct smb_charger, notifier);
int *blank;
printk("%s %d",__FUNCTION__,__LINE__);
if (ev_data && ev_data->data && chg) {
blank = ev_data->data;
if (event == MSM_DRM_EARLY_EVENT_BLANK && *blank == MSM_DRM_BLANK_UNBLANK) {
lct_backlight_off = false;
pr_info("thermal_notifier lct_backlight_off:%d",lct_backlight_off);
schedule_work(&chg->fb_notify_work);
}
else if (event == MSM_DRM_EVENT_BLANK && *blank == MSM_DRM_BLANK_POWERDOWN) {
lct_backlight_off = true;
pr_info("thermal_notifier lct_backlight_off:%d",lct_backlight_off);
schedule_work(&chg->fb_notify_work);
}
}

View File

@ -2334,7 +2334,6 @@ int smblib_get_prop_batt_status(struct smb_charger *chg,
else if ((usb_online || vbus_now > 4000000) && (batt_temp > -100) && (batt_temp < 580) &&
(POWER_SUPPLY_HEALTH_OVERHEAT != batt_health) && (POWER_SUPPLY_HEALTH_OVERVOLTAGE != batt_health)) {
val->intval = POWER_SUPPLY_STATUS_CHARGING;
pr_info("vbus_now = %d, report charging\n", vbus_now);
} else
val->intval = POWER_SUPPLY_STATUS_NOT_CHARGING;
break;
@ -2390,7 +2389,6 @@ int smblib_get_prop_batt_status(struct smb_charger *chg,
}else if ((usb_online || vbus_now > 4000000) && (batt_temp > -100) && (batt_temp < 580) &&
(POWER_SUPPLY_HEALTH_OVERHEAT != batt_health) && (POWER_SUPPLY_HEALTH_OVERVOLTAGE != batt_health)) {
val->intval = POWER_SUPPLY_STATUS_CHARGING;
pr_info("vbus_now is %d, report charging\n", vbus_now);
} else {
val->intval = POWER_SUPPLY_STATUS_NOT_CHARGING;
}
@ -2822,9 +2820,6 @@ int smblib_set_prop_system_temp_level(struct smb_charger *chg,
if (val->intval > chg->thermal_levels)
return -EINVAL;
pr_info("%s val=%d, chg->system_temp_level=%d, LctThermal=%d, lct_backlight_off= %d, IsInCall=%d \n "
,__FUNCTION__,val->intval,chg->system_temp_level, LctThermal, lct_backlight_off, LctIsInCall);
if (LctThermal == 0) { //from therml-engine always store lvl_sel
lct_therm_lvl_reserved.intval = val->intval;
}
@ -2844,8 +2839,6 @@ int smblib_set_prop_system_temp_level(struct smb_charger *chg,
return 0;
chg->system_temp_level = val->intval;
pr_info("%s intval:%d system temp level:%d thermal_levels:%d",
__FUNCTION__,val->intval,chg->system_temp_level,chg->thermal_levels);
if (chg->system_temp_level == chg->thermal_levels)
return vote(chg->chg_disable_votable,
@ -2861,117 +2854,6 @@ int smblib_set_prop_system_temp_level(struct smb_charger *chg,
}
#define PERIPHERAL_MASK 0xFF
static u16 peripheral_base;
static char log[256] = "";
static char version[8] = "smb:01:";
static inline void dump_reg(struct smb_charger *chg, u16 addr,
const char *name)
{
u8 reg;
int rc;
char reg_data[50] = "";
if (NULL == name) {
strlcat(log, "\n", sizeof(log));
printk(log);
return;
}
rc = smblib_read(chg, addr, &reg);
if (rc < 0)
smblib_err(chg, "Couldn't read OTG status rc=%d\n", rc);
/* print one peripheral base registers in one line */
if (peripheral_base != (addr & ~PERIPHERAL_MASK)) {
peripheral_base = addr & ~PERIPHERAL_MASK;
memset(log, 0, sizeof(log));
snprintf(reg_data, sizeof(reg_data), "%s%04x ", version, peripheral_base);
strlcat(log, reg_data, sizeof(log));
}
memset(reg_data, 0, sizeof(reg_data));
snprintf(reg_data, sizeof(reg_data), "%02x ", reg);
strlcat(log, reg_data, sizeof(log));
smblib_dbg(chg, PR_REGISTER, "%s - %04X = %02X\n",
name, addr, reg);
}
static void dump_regs(struct smb_charger *chg)
{
u16 addr;
/* charger peripheral */
for (addr = 0x6; addr <= 0xE; addr++)
dump_reg(chg, CHGR_BASE + addr, "CHGR Status");
for (addr = 0x10; addr <= 0x1B; addr++)
dump_reg(chg, CHGR_BASE + addr, "CHGR INT");
for (addr = 0x50; addr <= 0x70; addr++)
dump_reg(chg, CHGR_BASE + addr, "CHGR Config");
dump_reg(chg, CHGR_BASE + addr, NULL);
for (addr = 0x10; addr <= 0x1B; addr++)
dump_reg(chg, BATIF_BASE + addr, "BATIF INT");
for (addr = 0x50; addr <= 0x52; addr++)
dump_reg(chg, BATIF_BASE + addr, "BATIF Config");
for (addr = 0x60; addr <= 0x62; addr++)
dump_reg(chg, BATIF_BASE + addr, "BATIF Config");
for (addr = 0x70; addr <= 0x71; addr++)
dump_reg(chg, BATIF_BASE + addr, "BATIF Config");
dump_reg(chg, BATIF_BASE + addr, NULL);
for (addr = 0x6; addr <= 0x10; addr++)
dump_reg(chg, USBIN_BASE + addr, "USBIN Status");
for (addr = 0x12; addr <= 0x19; addr++)
dump_reg(chg, USBIN_BASE + addr, "USBIN INT ");
for (addr = 0x40; addr <= 0x43; addr++)
dump_reg(chg, USBIN_BASE + addr, "USBIN Cmd ");
for (addr = 0x58; addr <= 0x70; addr++)
dump_reg(chg, USBIN_BASE + addr, "USBIN Config ");
for (addr = 0x80; addr <= 0x84; addr++)
dump_reg(chg, USBIN_BASE + addr, "USBIN Config ");
dump_reg(chg, USBIN_BASE + addr, NULL);
for (addr = 0x06; addr <= 0x1B; addr++)
dump_reg(chg, TYPEC_BASE + addr, "TYPEC Status");
for (addr = 0x42; addr <= 0x72; addr++)
dump_reg(chg, TYPEC_BASE + addr, "TYPEC Config");
dump_reg(chg, TYPEC_BASE + 0x44, "TYPEC MODE CFG");
dump_reg(chg, TYPEC_BASE + addr, NULL);
for (addr = 0x6; addr <= 0x10; addr++)
dump_reg(chg, MISC_BASE + addr, "MISC Status");
for (addr = 0x15; addr <= 0x1B; addr++)
dump_reg(chg, MISC_BASE + addr, "MISC INT");
for (addr = 0x51; addr <= 0x62; addr++)
dump_reg(chg, MISC_BASE + addr, "MISC Config");
for (addr = 0x70; addr <= 0x76; addr++)
dump_reg(chg, MISC_BASE + addr, "MISC Config");
for (addr = 0x80; addr <= 0x84; addr++)
dump_reg(chg, MISC_BASE + addr, "MISC Config");
for (addr = 0x90; addr <= 0x94; addr++)
dump_reg(chg, MISC_BASE + addr, "MISC Config");
dump_reg(chg, MISC_BASE + addr, NULL);
}
#define CHARGING_PERIOD_S 600
#define NOT_CHARGING_PERIOD_S 1200
static void smblib_reg_work(struct work_struct *work)
@ -2983,7 +2865,6 @@ static void smblib_reg_work(struct work_struct *work)
int icl_settle, usb_cur_in, usb_vol_in, icl_sts;
int charger_type, typec_mode, typec_orientation;
dump_regs(chg);
rc = smblib_get_prop_usb_present(chg, &val);
if (rc < 0) {
pr_err("Couldn't get usb present rc=%d\n", rc);
@ -6218,8 +6099,6 @@ static int check_reduce_fcc_condition(struct smb_charger *chg)
(chg->charge_type != POWER_SUPPLY_CHARGE_TYPE_FAST) ||
(chg->batt_health != POWER_SUPPLY_HEALTH_GOOD))
{
pr_err("%s: cp_charge_enabled(%d), charge_status(%d), charge_type(%d), batt_health(%d)\n",
__FUNCTION__, chg->cp_charge_enabled, chg->charge_status, chg->charge_type, chg->batt_health);
return 0;
}
@ -6266,7 +6145,6 @@ static void reduce_fcc_work(struct work_struct *work)
chg->esr_work_status = ESR_CHECK_FCC_NOLIMIT;
reduce_fcc = false;
esr_work_time = ESR_WORK_TIME_180S;
pr_info("calculate esr condition not satisfy.\n");
}
vote(chg->fcc_votable, ESR_WORK_VOTER, reduce_fcc, effective_fcc);
@ -6879,7 +6757,6 @@ int smblib_get_quick_charge_type(struct smb_charger *chg)
|| (pval.intval == POWER_SUPPLY_HEALTH_OVERHEAT))
return 0;
pr_err("[%s] real_charger_type=%d pd_verifed=%d qc_class_ab=%d\n", __func__, chg->real_charger_type, chg->pd_verifed, chg->qc_class_ab);
/* davinic do not need to report this type */
if ((chg->real_charger_type == POWER_SUPPLY_TYPE_USB_PD)
&& chg->pd_verifed && chg->qc_class_ab) {
@ -7716,8 +7593,6 @@ irqreturn_t typec_state_change_irq_handler(int irq, void *data)
chg->typec_mode = typec_mode;
#ifdef CONFIG_REVERSE_CHARGE
pr_err("longcheer:%s,reverse_charge_mode=%d,typec_mode=%d\n",__func__,
chg->reverse_charge_mode,chg->typec_mode);
if(chg->typec_mode == POWER_SUPPLY_TYPEC_SINK){
if (gpio_is_valid(chg->switch_sel_gpio)){
gpio_set_value(chg->switch_sel_gpio, 0);
@ -9409,8 +9284,6 @@ void rerun_reverse_check(struct smb_charger *chg)
if(chg->reverse_charge_state != chg->reverse_charge_mode)
chg->reverse_charge_state = chg->reverse_charge_mode;
pr_err("longcheer:%s,reverse_charge_mode=%d,typec_mode=%d,real_charger_type=%d\n",__func__,
chg->reverse_charge_mode,chg->typec_mode,chg->real_charger_type);
//if(chg->real_charger_type == POWER_SUPPLY_TYPE_USB_PD)
// return;
lct_vbus_enable(chg, false);

View File

@ -841,7 +841,6 @@ static int handle_jeita(struct step_chg_info *chip)
batt_soc = pval.intval;
rc = power_supply_get_property(chip->bms_psy,
POWER_SUPPLY_PROP_FASTCHARGE_MODE, &pval);
pr_err("%s:fastcharge_mode=%d\n", __func__, pval.intval);
if (rc < 0) {
pr_err("Couldn't read fastcharge mode fail rc=%d\n", rc);
return rc;
@ -864,7 +863,6 @@ static int handle_jeita(struct step_chg_info *chip)
rc = power_supply_set_property(chip->batt_psy,
POWER_SUPPLY_PROP_CHARGE_TERM_CURRENT, &pval);
}
pr_info("batt_temp = %d, ffc_chg_term_current=%d\n", batt_temp, chg_term_current);
}
}
@ -878,9 +876,6 @@ static int handle_jeita(struct step_chg_info *chip)
if (!chip->usb_icl_votable)
goto set_jeita_fv;
pr_err("%s = %d FCC = %duA FV = %duV\n",
chip->jeita_fcc_config->param.prop_name, batt_temp, fcc_ua, fv_uv);
/* set and clear fast charge mode when soft jeita trigger and clear */
rc = power_supply_get_property(chip->usb_psy,
POWER_SUPPLY_PROP_PD_AUTHENTICATION, &pval);
@ -908,7 +903,6 @@ static int handle_jeita(struct step_chg_info *chip)
(hvdcp3_charger_type == STEP_HVDCP3_CLASSB_27W)) {
if ((temp >= BATT_WARM_THRESHOLD || temp <= BATT_COOL_THRESHOLD)
&& !fast_mode_dis) {
pr_err("temp:%d disable fastcharge mode\n", temp);
pval.intval = false;
rc = power_supply_set_property(chip->usb_psy,
POWER_SUPPLY_PROP_FASTCHARGE_MODE, &pval);
@ -920,7 +914,6 @@ static int handle_jeita(struct step_chg_info *chip)
} else if ((temp < BATT_WARM_THRESHOLD - chip->jeita_fv_config->param.hysteresis)
&& (temp > BATT_COOL_THRESHOLD + chip->jeita_fv_config->param.hysteresis)
&& fast_mode_dis) {
pr_err("temp:%d enable fastcharge mode\n", temp);
pval.intval = true;
rc = power_supply_set_property(chip->usb_psy,
POWER_SUPPLY_PROP_FASTCHARGE_MODE, &pval);

View File

@ -149,7 +149,7 @@ static int cp_get_effective_fcc_val(pm_t pm_state)
effective_fcc_val = get_effective_result(pm_state.fcc_votable);
effective_fcc_val = effective_fcc_val / 1000;
pr_info("effective_fcc_val: %d\n", effective_fcc_val);
pr_debug("effective_fcc_val: %d\n", effective_fcc_val);
return effective_fcc_val;
}
@ -166,7 +166,7 @@ static int cp_get_effective_usb_icl_val(void)
}
effective_usb_icl_val = get_effective_result(pm_state.usb_icl_votable);
pr_info("effective_usb_icl_val: %d voted by:%s\n", effective_usb_icl_val, get_effective_client(pm_state.usb_icl_votable));
pr_debug("effective_usb_icl_val: %d voted by:%s\n", effective_usb_icl_val, get_effective_client(pm_state.usb_icl_votable));
return effective_usb_icl_val;
}
@ -212,7 +212,7 @@ static int qc3_get_bms_fastcharge_mode(void)
rc = power_supply_get_property(pm_state.bms_psy,
POWER_SUPPLY_PROP_FASTCHARGE_MODE, &pval);
if (rc < 0) {
pr_info("Couldn't get fastcharge mode:%d\n", rc);
pr_debug("Couldn't get fastcharge mode:%d\n", rc);
return 0;
}
@ -237,7 +237,7 @@ static int qc3_get_batt_current_thermal_level(int *level)
POWER_SUPPLY_PROP_CHARGE_CONTROL_LIMIT, &val);
if (rc < 0) {
pr_info("Couldn't get themal level:%d\n", rc);
pr_debug("Couldn't get themal level:%d\n", rc);
return rc;
}
@ -272,7 +272,7 @@ static bool qc3_disable_cp_by_jeita_status(void)
POWER_SUPPLY_PROP_TEMP, &val);
if (ret < 0) {
pr_info("Couldn't get batt temp prop:%d\n", ret);
pr_debug("Couldn't get batt temp prop:%d\n", ret);
return false;
}
@ -317,7 +317,7 @@ static void cp_get_batt_capacity(void)
POWER_SUPPLY_PROP_CAPACITY, &val);
if (!ret)
pm_state.capacity = val.intval;
pr_info("capacity %d\n", pm_state.capacity);
pr_debug("capacity %d\n", pm_state.capacity);
}
static void cp_update_fc_status(void)
@ -558,7 +558,7 @@ static int cp_tune_vbus_volt(bool up)
ret = power_supply_set_property(psy,
POWER_SUPPLY_PROP_DP_DM_BQ, &val);
pr_info("tune adapter voltage %s %s\n", up ? "up" : "down",
pr_debug("tune adapter voltage %s %s\n", up ? "up" : "down",
ret ? "fail" : "successfully");
return ret;
@ -595,7 +595,7 @@ static int cp_reset_vbus_volt(void)
ret = power_supply_set_property(psy,
POWER_SUPPLY_PROP_DP_DM_BQ, &val);
pr_info("reset vbus volt %s\n", ret ? "fail" : "successfully");
pr_debug("reset vbus volt %s\n", ret ? "fail" : "successfully");
}
return ret;
@ -651,7 +651,7 @@ static int cp_get_qc_hvdcp3_type(void)
POWER_SUPPLY_PROP_HVDCP3_TYPE, &val);
if (!ret)
pm_state.hvdcp3_type = val.intval;
pr_info("hvdcp3 type %d\n", pm_state.hvdcp3_type);
pr_debug("hvdcp3 type %d\n", pm_state.hvdcp3_type);
return ret;
}
@ -678,7 +678,7 @@ static int cp_flash2_charge(unsigned int port)
pr_debug("bat_volt_lp_lmt = %d\n", sys_config.bat_volt_lp_lmt);
pr_debug("ibus_limit: %d\n", ibus_limit);
pr_info("vbus=%d, ibus=%d, vbat=%d, ibat=%d, ibus_target_val=%d\n",
pr_debug("vbus=%d, ibus=%d, vbat=%d, ibat=%d, ibus_target_val=%d\n",
pm_state.bq2597x.vbus_volt,
pm_state.bq2597x.ibus_curr,
pm_state.bq2597x.vbat_volt,
@ -728,7 +728,7 @@ static int cp_flash2_charge(unsigned int port)
sys_config.ibat_minus_deviation_val = 1050;
sys_config.ibat_plus_deviation_val = 50;
pm_state.batt_cell_volt_triggered = true;
pr_info("batt cell volt > 4200mv or batt soc > 29%, modify bq qc3 adjust parameters\n");
pr_debug("batt cell volt > 4200mv or batt soc > 29%, modify bq qc3 adjust parameters\n");
}
}
@ -772,7 +772,7 @@ static int cp_flash2_charge(unsigned int port)
return -CP_ENABLE_FAIL;
else if (thermal_level >= MAX_THERMAL_LEVEL
|| pm_state.is_temp_out_fc2_range) {
pr_info("thermal level (%d) too high or batt temp is out of fc2 range, pm_state.is_temp_out_fc2_range:%d\n",
pr_debug("thermal level (%d) too high or batt temp is out of fc2 range, pm_state.is_temp_out_fc2_range:%d\n",
thermal_level, pm_state.is_temp_out_fc2_range);
return CP_ENABLE_FAIL;
}
@ -828,9 +828,9 @@ void cp_statemachine(unsigned int port)
if (!pm_state.bq2597x.vbus_pres) {
pm_state.state = CP_STATE_DISCONNECT;
recovery = true;
pr_info("vbus disconnected\n");
pr_debug("vbus disconnected\n");
} else if (pm_state.state == CP_STATE_DISCONNECT) {
pr_info("vbus connected\n");
pr_debug("vbus connected\n");
recovery = true;
pm_state.jeita_triggered = false;
pm_state.is_temp_out_fc2_range = false;
@ -880,17 +880,17 @@ void cp_statemachine(unsigned int port)
cp_get_batt_capacity();
qc3_get_batt_current_thermal_level(&thermal_level);
pm_state.is_temp_out_fc2_range = qc3_disable_cp_by_jeita_status();
pr_info("is_temp_out_fc2_range:%d\n", pm_state.is_temp_out_fc2_range);
pr_debug("is_temp_out_fc2_range:%d\n", pm_state.is_temp_out_fc2_range);
if (pm_state.usb_type == POWER_SUPPLY_TYPE_USB_HVDCP_3
|| pm_state.usb_type == POWER_SUPPLY_TYPE_USB_HVDCP_3P5) {
pr_info("vbus_volt:%d\n", pm_state.bq2597x.vbus_volt);
pr_debug("vbus_volt:%d\n", pm_state.bq2597x.vbus_volt);
cp_reset_vbus_volt();
msleep(100);
if (thermal_level >= MAX_THERMAL_LEVEL
|| pm_state.is_temp_out_fc2_range) {
cp_move_state(CP_STATE_SW_ENTRY);
pr_info("thermal too high or batt temp out of range or slowly charging, waiting...\n");
pr_debug("thermal too high or batt temp out of range or slowly charging, waiting...\n");
} else if (pm_state.bq2597x.vbat_volt < sys_config.min_vbat_start_flash2)
cp_move_state(CP_STATE_SW_ENTRY);
else if (pm_state.bq2597x.vbat_volt > sys_config.bat_volt_lp_lmt - 100
@ -921,7 +921,7 @@ void cp_statemachine(unsigned int port)
case CP_STATE_SW_ENTRY_2:
pr_err("vbat=%d,vbus=%d\n", pm_state.bq2597x.vbat_volt, pm_state.bq2597x.vbus_volt);
pr_info("enable sw charger and check enable\n");
pr_debug("enable sw charger and check enable\n");
cp_enable_sw(true);
usb_icl_value = cp_get_effective_usb_icl_val();
if (pm_state.usb_icl_votable && (usb_icl_value < QC3_MAIN_CHARGER_ICL))
@ -936,21 +936,21 @@ void cp_statemachine(unsigned int port)
pr_err("vbat=%d,vbus=%d\n", pm_state.bq2597x.vbat_volt, pm_state.bq2597x.vbus_volt);
qc3_get_batt_current_thermal_level(&thermal_level);
if (retry_enable_bq_count >= 5) {
pr_info("retry_enable_bq_count=%d\n", retry_enable_bq_count);
pr_debug("retry_enable_bq_count=%d\n", retry_enable_bq_count);
break;
}
pm_state.is_temp_out_fc2_range = qc3_disable_cp_by_jeita_status();
if (thermal_level < MAX_THERMAL_LEVEL && !pm_state.is_temp_out_fc2_range && recovery) {
if (tune_vbus_count >= 2) {
pr_info("unsupport qc3, use sw charging\n");
pr_debug("unsupport qc3, use sw charging\n");
break;
}
tune_vbus_count++;
pr_info("thermal or batt temp recovery...\n");
pr_debug("thermal or batt temp recovery...\n");
recovery = false;
} else {
pr_info("thermal(%d) too high or batt temp out of range\n", thermal_level);
pr_debug("thermal(%d) too high or batt temp out of range\n", thermal_level);
}
cp_get_batt_capacity();
if (pm_state.bq2597x.vbat_volt > sys_config.bat_volt_lp_lmt - 100
@ -959,7 +959,7 @@ void cp_statemachine(unsigned int port)
}
if (!pm_state.sw_near_cv && !recovery) {
if (pm_state.bq2597x.vbat_volt > sys_config.min_vbat_start_flash2) {
pr_info("battery volt: %d is ok, proceeding to flash charging...\n",
pr_debug("battery volt: %d is ok, proceeding to flash charging...\n",
pm_state.bq2597x.vbat_volt);
usb_icl_value = cp_get_effective_usb_icl_val();
if (pm_state.usb_icl_votable && (usb_icl_value > QC3_CHARGER_ICL))
@ -1156,7 +1156,7 @@ static int cp_qc30_notifier_call(struct notifier_block *nb,
} else if (pm_state.usb_type == POWER_SUPPLY_TYPE_UNKNOWN && usb_hvdcp3_on == true) {
cancel_delayed_work(&pm_state.qc3_pm_work);
schedule_delayed_work(&pm_state.qc3_pm_work, 0);
pr_info("pm_state.usb_type: %d\n", pm_state.usb_type);
pr_debug("pm_state.usb_type: %d\n", pm_state.usb_type);
usb_hvdcp3_on = false;
}
}
@ -1237,7 +1237,7 @@ static int cp_qc30_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct cp_qc30_data *chip;
pr_info("%s enter\n", __func__);
pr_debug("%s enter\n", __func__);
chip = devm_kzalloc(dev, sizeof(struct cp_qc30_data), GFP_KERNEL);
if (!chip)
@ -1260,7 +1260,7 @@ static int cp_qc30_probe(struct platform_device *pdev)
cp_qc30_register_notifier(chip);
pr_info("charge pump qc3 probe\n");
pr_debug("charge pump qc3 probe\n");
return ret;
}

View File

@ -122,7 +122,7 @@ static int pd_get_batt_current_thermal_level(struct usbpd_pm *pdpm, int *level)
rc = power_supply_get_property(pdpm->sw_psy,
POWER_SUPPLY_PROP_CHARGE_CONTROL_LIMIT, &pval);
if (rc < 0) {
pr_info("Couldn't get fastcharge mode:%d\n", rc);
pr_debug("Couldn't get fastcharge mode:%d\n", rc);
return rc;
}
@ -156,7 +156,7 @@ static bool pd_disable_cp_by_jeita_status(struct usbpd_pm *pdpm)
rc = power_supply_get_property(pdpm->bms_psy,
POWER_SUPPLY_PROP_TEMP, &pval);
if (rc < 0) {
pr_info("Couldn't get batt temp prop:%d\n", rc);
pr_debug("Couldn't get batt temp prop:%d\n", rc);
return false;
}
@ -209,7 +209,7 @@ static bool is_cool_charge(struct usbpd_pm *pdpm)
rc = power_supply_get_property(pdpm->bms_psy,
POWER_SUPPLY_PROP_TEMP, &pval);
if (rc < 0) {
pr_info("Couldn't get batt temp prop:%d\n", rc);
pr_debug("Couldn't get batt temp prop:%d\n", rc);
return false;
}
batt_temp = pval.intval;
@ -232,7 +232,7 @@ static bool is_warm_charge(struct usbpd_pm *pdpm)
rc = power_supply_get_property(pdpm->bms_psy,
POWER_SUPPLY_PROP_TEMP, &pval);
if (rc < 0) {
pr_info("Couldn't get batt temp prop:%d\n", rc);
pr_debug("Couldn't get batt temp prop:%d\n", rc);
return false;
}
batt_temp = pval.intval;
@ -276,7 +276,7 @@ static int usbpd_get_effective_fcc_val(struct usbpd_pm *pdpm)
effective_fcc_val = get_effective_result(pdpm->fcc_votable);
effective_fcc_val = effective_fcc_val / 1000;
pr_info("effective_fcc_val: %d\n", effective_fcc_val);
pr_debug("effective_fcc_val: %d\n", effective_fcc_val);
return effective_fcc_val;
}
@ -478,7 +478,7 @@ static int usbpd_pm_check_cp_sec_enabled(struct usbpd_pm *pdpm)
POWER_SUPPLY_PROP_CHARGING_ENABLED, &val);
if (!ret)
pdpm->cp_sec.charge_enabled = !!val.intval;
pr_info("pdpm->cp_sec.charge_enabled:%d\n", pdpm->cp_sec.charge_enabled);
pr_debug("pdpm->cp_sec.charge_enabled:%d\n", pdpm->cp_sec.charge_enabled);
return ret;
}
@ -602,14 +602,14 @@ static void usbpd_pm_evaluate_src_caps(struct usbpd_pm *pdpm)
}
if (pdpm->pps_supported) {
pr_info("PPS supported, preferred APDO pos:%d, max volt:%d, current:%d\n",
pr_debug("PPS supported, preferred APDO pos:%d, max volt:%d, current:%d\n",
pdpm->apdo_selected_pdo,
pdpm->apdo_max_volt,
pdpm->apdo_max_curr);
if (pdpm->apdo_max_curr <= LOW_POWER_PPS_CURR_THR)
pdpm->apdo_max_curr = XIAOMI_LOW_POWER_PPS_CURR_MAX;
} else {
pr_info("Not qualified PPS adapter\n");
pr_debug("Not qualified PPS adapter\n");
}
}
@ -624,15 +624,15 @@ static void usbpd_update_pps_status(struct usbpd_pm *pdpm)
ret = usbpd_get_pps_status(pdpm->pd, &status);
if (!ret) {
pr_info("get_pps_status: status_db :0x%x\n", status);
pr_debug("get_pps_status: status_db :0x%x\n", status);
/*TODO: check byte order to insure data integrity*/
pdpm->adapter_voltage = (status & 0xFFFF) * 20;
pdpm->adapter_current = ((status >> 16) & 0xFF) * 50;
pdpm->adapter_ptf = ((status >> 24) & 0x06) >> 1;
pdpm->adapter_omf = !!((status >> 24) & 0x08);
pr_info("adapter_volt:%d, adapter_current:%d\n",
pr_debug("adapter_volt:%d, adapter_current:%d\n",
pdpm->adapter_voltage, pdpm->adapter_current);
pr_info("pdpm->adapter_ptf:%d, pdpm->adapter_omf:%d\n",
pr_debug("pdpm->adapter_ptf:%d, pdpm->adapter_omf:%d\n",
pdpm->adapter_ptf, pdpm->adapter_omf);
}
}
@ -712,7 +712,7 @@ static int usbpd_pm_fc2_charge_algo(struct usbpd_pm *pdpm)
if (pm_config.cp_sec_enable)
ibus_total += pdpm->cp_sec.ibus_curr;
pr_info("ibus_limit:%d ibus:%d vbus:%d ibat:%d vbat:%d\n",
pr_debug("ibus_limit:%d ibus:%d vbus:%d ibat:%d vbat:%d\n",
ibus_limit, ibus_total, pdpm->cp.vbus_volt, pdpm->cp.ibat_curr, pdpm->cp.vbat_volt);
if (ibus_total < ibus_limit - 50)
@ -750,22 +750,22 @@ static int usbpd_pm_fc2_charge_algo(struct usbpd_pm *pdpm)
pr_debug("is_temp_out_fc2_range:%d\n", pdpm->is_temp_out_fc2_range);
if (pdpm->cp.bat_therm_fault) { /* battery overheat, stop charge*/
pr_info("bat_therm_fault:%d\n", pdpm->cp.bat_therm_fault);
pr_debug("bat_therm_fault:%d\n", pdpm->cp.bat_therm_fault);
return PM_ALGO_RET_THERM_FAULT;
} else if (thermal_level >= MAX_THERMAL_LEVEL
|| pdpm->is_temp_out_fc2_range) {
pr_info("is_temp_out_fc2_range:%d,thermal_level:%d\n", pdpm->is_temp_out_fc2_range, thermal_level);
pr_info("thermal level too high or batt temp is out of fc2 range\n");
pr_debug("is_temp_out_fc2_range:%d,thermal_level:%d\n", pdpm->is_temp_out_fc2_range, thermal_level);
pr_debug("thermal level too high or batt temp is out of fc2 range\n");
return PM_ALGO_RET_CHG_DISABLED;
} else if (pdpm->cp.bat_ocp_fault || pdpm->cp.bus_ocp_fault
|| pdpm->cp.bat_ovp_fault || pdpm->cp.bus_ovp_fault) {
pr_info("bat_ocp_fault:%d, bus_ocp_fault:%d, bat_ovp_fault:%d, bus_ovp_fault:%d\n",
pr_debug("bat_ocp_fault:%d, bus_ocp_fault:%d, bat_ovp_fault:%d, bus_ovp_fault:%d\n",
pdpm->cp.bat_ocp_fault, pdpm->cp.bus_ocp_fault,
pdpm->cp.bat_ovp_fault, pdpm->cp.bus_ovp_fault);
return PM_ALGO_RET_OTHER_FAULT; /* go to switch, and try to ramp up*/
} else if (!pdpm->cp.charge_enabled
|| (pm_config.cp_sec_enable && !pdpm->cp_sec.charge_enabled)) {
pr_info("cp.charge_enabled:%d, cp_sec.charge_enabled:%d\n",
pr_debug("cp.charge_enabled:%d, cp_sec.charge_enabled:%d\n",
pdpm->cp.charge_enabled, pdpm->cp_sec.charge_enabled);
return PM_ALGO_RET_CHG_DISABLED;
}
@ -774,7 +774,7 @@ static int usbpd_pm_fc2_charge_algo(struct usbpd_pm *pdpm)
if ((pdpm->cp.vbat_volt > pm_config.bat_volt_lp_lmt && is_cool_charge(pdpm))
|| (pdpm->cp.vbat_volt > BATT_WARM_CHG_VOLT && is_warm_charge(pdpm))) {
if (cool_warm_overcharge_timer++ > TAPER_TIMEOUT) {
pr_info("cool warm overcharge\n");
pr_debug("cool warm overcharge\n");
cool_warm_overcharge_timer = 0;
pdpm->bq_cool_warm_done = true;
return PM_ALGO_RET_CHG_DISABLED;
@ -787,7 +787,7 @@ static int usbpd_pm_fc2_charge_algo(struct usbpd_pm *pdpm)
if (pdpm->cp.vbat_volt > pm_config.bat_volt_lp_lmt - TAPER_VOL_HYS
&& pdpm->cp.ibat_curr < pm_config.fc2_taper_current) {
if (fc2_taper_timer++ > TAPER_TIMEOUT) {
pr_info("charge pump taper charging done\n");
pr_debug("charge pump taper charging done\n");
fc2_taper_timer = 0;
return PM_ALGO_RET_TAPER_DONE;
}
@ -804,7 +804,7 @@ static int usbpd_pm_fc2_charge_algo(struct usbpd_pm *pdpm)
//pdpm->request_current = min(pdpm->apdo_max_curr, curr_ibus_limit);
pr_info("steps:%d sw_ctrl_steps:%d step_vbat:%d step_ibat:%d step_ibus:%d\n",
pr_debug("steps:%d sw_ctrl_steps:%d step_vbat:%d step_ibat:%d step_ibus:%d\n",
steps, sw_ctrl_steps, step_vbat, step_ibat, step_ibus);
if (pdpm->apdo_max_volt == PPS_VOL_MAX)
@ -833,7 +833,7 @@ static const unsigned char *pm_str[] = {
static void usbpd_pm_move_state(struct usbpd_pm *pdpm, enum pm_state state)
{
#if 1
pr_info("state change:%s -> %s\n",
pr_debug("state change:%s -> %s\n",
pm_str[pdpm->state], pm_str[state]);
#endif
pdpm->state = state;
@ -857,14 +857,14 @@ static int usbpd_pm_sm(struct usbpd_pm *pdpm)
pd_get_batt_current_thermal_level(pdpm, &thermal_level);
pdpm->is_temp_out_fc2_range = pd_disable_cp_by_jeita_status(pdpm);
pr_info("is_temp_out_fc2_range:%d\n", pdpm->is_temp_out_fc2_range);
pr_debug("is_temp_out_fc2_range:%d\n", pdpm->is_temp_out_fc2_range);
effective_fcc_val = usbpd_get_effective_fcc_val(pdpm);
if (effective_fcc_val > 0) {
curr_fcc_lmt = min(pm_config.bat_curr_lp_lmt, effective_fcc_val);
curr_ibus_lmt = curr_fcc_lmt >> 1;
pr_info("curr_ibus_lmt:%d\n", curr_ibus_lmt);
pr_debug("curr_ibus_lmt:%d\n", curr_ibus_lmt);
}
if (pdpm->cp.vbat_volt < pm_config.min_vbat_for_cp) {
@ -875,9 +875,9 @@ static int usbpd_pm_sm(struct usbpd_pm *pdpm)
else
usbpd_select_pdo(pdpm->pd, pdpm->apdo_selected_pdo,
6000000, pdpm->apdo_max_curr * 1000);
pr_info("batt_volt %d, waiting...\n", pdpm->cp.vbat_volt);
pr_debug("batt_volt %d, waiting...\n", pdpm->cp.vbat_volt);
} else if (pdpm->cp.vbat_volt > pm_config.bat_volt_lp_lmt - 50) {
pr_info("batt_volt %d is too high for cp,\
pr_debug("batt_volt %d is too high for cp,\
charging with switch charger\n",
pdpm->cp.vbat_volt);
usbpd_pm_move_state(pdpm, PD_PM_STATE_FC2_EXIT);
@ -892,9 +892,9 @@ static int usbpd_pm_sm(struct usbpd_pm *pdpm)
else
usbpd_select_pdo(pdpm->pd, pdpm->apdo_selected_pdo,
6000000, pdpm->apdo_max_curr * 1000);
pr_info("thermal too high or batt temp is out of fc2 range, waiting...\n");
pr_debug("thermal too high or batt temp is out of fc2 range, waiting...\n");
} else {
pr_info("batt_volt-%d is ok, start flash charging\n",
pr_debug("batt_volt-%d is ok, start flash charging\n",
pdpm->cp.vbat_volt);
usbpd_pm_move_state(pdpm, PD_PM_STATE_FC2_ENTRY);
}
@ -922,7 +922,7 @@ static int usbpd_pm_sm(struct usbpd_pm *pdpm)
usbpd_select_pdo(pdpm->pd, pdpm->apdo_selected_pdo,
pdpm->request_voltage * 1000, pdpm->request_current * 1000);
pr_info("entry1 request_voltage:%d, request_current:%d\n",
pr_debug("entry1 request_voltage:%d, request_current:%d\n",
pdpm->request_voltage, pdpm->request_current);
usbpd_pm_move_state(pdpm, PD_PM_STATE_FC2_ENTRY_2);
@ -931,7 +931,7 @@ static int usbpd_pm_sm(struct usbpd_pm *pdpm)
break;
case PD_PM_STATE_FC2_ENTRY_2:
pr_info("tune adapter volt %d , vbatt %d tune_vbus_retry=%d\n",
pr_debug("tune adapter volt %d , vbatt %d tune_vbus_retry=%d\n",
pdpm->cp.vbus_volt, pdpm->cp.vbat_volt, tune_vbus_retry);
if (pdpm->cp.vbus_volt < (pdpm->cp.vbat_volt * 2 + BUS_VOLT_INIT_UP - 50)) {
tune_vbus_retry++;
@ -939,7 +939,7 @@ static int usbpd_pm_sm(struct usbpd_pm *pdpm)
usbpd_select_pdo(pdpm->pd, pdpm->apdo_selected_pdo,
pdpm->request_voltage * 1000,
pdpm->request_current * 1000);
pr_info("entry2 request_voltage:%d, request_current:%d\n",
pr_debug("entry2 request_voltage:%d, request_current:%d\n",
pdpm->request_voltage, pdpm->request_current);
} else if (pdpm->cp.vbus_volt > (pdpm->cp.vbat_volt * 2 + BUS_VOLT_INIT_UP + 200)) {
tune_vbus_retry++;
@ -947,10 +947,10 @@ static int usbpd_pm_sm(struct usbpd_pm *pdpm)
usbpd_select_pdo(pdpm->pd, pdpm->apdo_selected_pdo,
pdpm->request_voltage * 1000,
pdpm->request_current * 1000);
pr_info("entry2 request_voltage:%d, request_current:%d\n",
pr_debug("entry2 request_voltage:%d, request_current:%d\n",
pdpm->request_voltage, pdpm->request_current);
} else {
pr_info("adapter volt tune ok, retry %d times\n", tune_vbus_retry);
pr_debug("adapter volt tune ok, retry %d times\n", tune_vbus_retry);
usbpd_pm_move_state(pdpm, PD_PM_STATE_FC2_ENTRY_3);
break;
}
@ -959,9 +959,9 @@ static int usbpd_pm_sm(struct usbpd_pm *pdpm)
if (retry_count < 1) {
usbpd_pm_move_state(pdpm, PD_PM_STATE_FC2_ENTRY_1);
retry_count++;
pr_info("Failed to tune adapter volt into valid range, retry again\n");
pr_debug("Failed to tune adapter volt into valid range, retry again\n");
} else {
pr_info("Failed to tune adapter volt into valid range, charge with switching charger\n");
pr_debug("Failed to tune adapter volt into valid range, charge with switching charger\n");
usbpd_pm_move_state(pdpm, PD_PM_STATE_FC2_EXIT);
}
}
@ -1008,16 +1008,16 @@ static int usbpd_pm_sm(struct usbpd_pm *pdpm)
ret = usbpd_pm_fc2_charge_algo(pdpm);
if (ret == PM_ALGO_RET_THERM_FAULT) {
pr_info("Move to stop charging:%d\n", ret);
pr_debug("Move to stop charging:%d\n", ret);
stop_sw = true;
usbpd_pm_move_state(pdpm, PD_PM_STATE_FC2_EXIT);
break;
} else if (ret == PM_ALGO_RET_OTHER_FAULT || ret == PM_ALGO_RET_TAPER_DONE) {
pr_info("Move to switch charging:%d\n", ret);
pr_debug("Move to switch charging:%d\n", ret);
usbpd_pm_move_state(pdpm, PD_PM_STATE_FC2_EXIT);
break;
} else if (ret == PM_ALGO_RET_CHG_DISABLED) {
pr_info("Move to switch charging, will try to recover flash charging:%d\n",
pr_debug("Move to switch charging, will try to recover flash charging:%d\n",
ret);
recover = true;
usbpd_pm_move_state(pdpm, PD_PM_STATE_FC2_EXIT);
@ -1026,15 +1026,13 @@ static int usbpd_pm_sm(struct usbpd_pm *pdpm)
usbpd_select_pdo(pdpm->pd, pdpm->apdo_selected_pdo,
pdpm->request_voltage * 1000,
pdpm->request_current * 1000);
pr_info("request_voltage:%d, request_current:%d\n",
pdpm->request_voltage, pdpm->request_current);
}
/*stop second charge pump if either of ibus is lower than 400ma during CV*/
if (pm_config.cp_sec_enable && pdpm->cp_sec.charge_enabled
&& pdpm->cp.vbat_volt > pm_config.bat_volt_lp_lmt - TAPER_WITH_IBUS_HYS
&& (pdpm->cp.ibus_curr < TAPER_IBUS_THR
|| pdpm->cp_sec.ibus_curr < TAPER_IBUS_THR)) {
pr_info("second cp is disabled due to ibus < 450mA\n");
pr_debug("second cp is disabled due to ibus < 450mA\n");
usbpd_pm_enable_cp_sec(pdpm, false);
usbpd_pm_check_cp_sec_enabled(pdpm);
}
@ -1136,7 +1134,7 @@ static void usbpd_pd_contact(struct usbpd_pm *pdpm, bool connected)
{
pdpm->pd_active = connected;
pr_info("pd_active = %d\n", connected);
pr_debug("pd_active = %d\n", connected);
if (connected) {
@ -1250,7 +1248,7 @@ static int pd_policy_parse_dt(struct usbpd_pm *pdpm)
pr_err("pd-bat-volt-max property missing, use default val\n");
else
pm_config.bat_volt_lp_lmt = pdpm->bat_volt_max;
pr_info("pm_config.bat_volt_lp_lmt:%d\n", pm_config.bat_volt_lp_lmt);
pr_debug("pm_config.bat_volt_lp_lmt:%d\n", pm_config.bat_volt_lp_lmt);
rc = of_property_read_u32(node,
"mi,pd-bat-curr-max", &pdpm->bat_curr_max);
@ -1258,7 +1256,7 @@ static int pd_policy_parse_dt(struct usbpd_pm *pdpm)
pr_err("pd-bat-curr-max property missing, use default val\n");
else
pm_config.bat_curr_lp_lmt = pdpm->bat_curr_max;
pr_info("pm_config.bat_curr_lp_lmt:%d\n", pm_config.bat_curr_lp_lmt);
pr_debug("pm_config.bat_curr_lp_lmt:%d\n", pm_config.bat_curr_lp_lmt);
rc = of_property_read_u32(node,
"mi,pd-bus-volt-max", &pdpm->bus_volt_max);
@ -1266,7 +1264,7 @@ static int pd_policy_parse_dt(struct usbpd_pm *pdpm)
pr_err("pd-bus-volt-max property missing, use default val\n");
else
pm_config.bus_volt_lp_lmt = pdpm->bus_volt_max;
pr_info("pm_config.bus_volt_lp_lmt:%d\n", pm_config.bus_volt_lp_lmt);
pr_debug("pm_config.bus_volt_lp_lmt:%d\n", pm_config.bus_volt_lp_lmt);
rc = of_property_read_u32(node,
"mi,pd-bus-curr-max", &pdpm->bus_curr_max);
@ -1274,7 +1272,7 @@ static int pd_policy_parse_dt(struct usbpd_pm *pdpm)
pr_err("pd-bus-curr-max property missing, use default val\n");
else
pm_config.bus_curr_lp_lmt = pdpm->bus_curr_max;
pr_info("pm_config.bus_curr_lp_lmt:%d\n", pm_config.bus_curr_lp_lmt);
pr_debug("pm_config.bus_curr_lp_lmt:%d\n", pm_config.bus_curr_lp_lmt);
rc = of_property_read_u32(node,
"mi,pd-bus-curr-compensate", &pdpm->bus_curr_compensate);
@ -1282,7 +1280,7 @@ static int pd_policy_parse_dt(struct usbpd_pm *pdpm)
pr_err("pd-bus-curr-compensate property missing, use default val\n");
else
pm_config.bus_curr_compensate = pdpm->bus_curr_compensate;
pr_info("pm_config.bus_curr_compensate:%d\n", pm_config.bus_curr_compensate);
pr_debug("pm_config.bus_curr_compensate:%d\n", pm_config.bus_curr_compensate);
pdpm->cp_sec_enable = of_property_read_bool(node,
"mi,cp-sec-enable");
@ -1290,7 +1288,7 @@ static int pd_policy_parse_dt(struct usbpd_pm *pdpm)
rc = of_property_read_u32(node,
"mi,pd-ffc-bat-volt-max", &pdpm->ffc_bat_volt_max);
pr_info("pdpm->ffc_bat_volt_max:%d\n",
pr_debug("pdpm->ffc_bat_volt_max:%d\n",
pdpm->ffc_bat_volt_max);
return rc;
@ -1302,7 +1300,7 @@ static int usbpd_pm_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct usbpd_pm *pdpm;
pr_info("%s enter\n", __func__);
pr_debug("%s enter\n", __func__);
pdpm = kzalloc(sizeof(struct usbpd_pm), GFP_KERNEL);
if (!pdpm)