charger:support 2A dcp charger
For non-support turbo charger project. allow max 1.8A charging current of DCP. Change-Id: I2c98600bc4e258df485de79d0201ca86ff89394a Signed-off-by: xuwei9 <xuwei9@lenovo.com> Reviewed-on: https://gerrit.mot.com/1611260 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
1 parent
0d4a9a5693
commit
6483cdf58c
4 files changed
+9
-4
No files matched your search
@@ -38,7 +38,7 @@
|
||||
#include "qg-defs.h"
|
||||
#include <dt-bindings/iio/qcom,spmi-vadc.h>
|
||||
|
||||
static int qg_debug_mask = 0xff;
|
||||
static int qg_debug_mask;
|
||||
|
||||
static int qg_esr_mod_count = 30;
|
||||
static ssize_t esr_mod_count_show(struct device *dev, struct device_attribute
|
||||
|
||||
@@ -229,7 +229,7 @@ struct smb5 {
|
||||
struct smb_dt_props dt;
|
||||
};
|
||||
|
||||
static int __debug_mask = 0xff;
|
||||
static int __debug_mask;
|
||||
|
||||
static ssize_t pd_disabled_show(struct device *dev, struct device_attribute
|
||||
*attr, char *buf)
|
||||
|
||||
@@ -10158,7 +10158,7 @@ static void mmi_heartbeat_work(struct work_struct *work)
|
||||
if (prev_vbus_mv == -1)
|
||||
prev_vbus_mv = usb_mv;
|
||||
|
||||
smblib_dbg(chip, PR_MISC, "batt=%d mV, %d mA, %d C, USB= %d mV\n",
|
||||
smblib_dbg(chip, PR_MOTO, "batt=%d mV, %d mA, %d C, USB= %d mV\n",
|
||||
batt_mv, batt_ma, batt_temp, usb_mv);
|
||||
|
||||
pok_irq = chip->irq_info[SWITCHER_POWER_OK_IRQ].irq;
|
||||
@@ -10253,8 +10253,10 @@ static void mmi_heartbeat_work(struct work_struct *work)
|
||||
POWER_SUPPLY_TYPE_USB_DCP)
|
||||
if (apsd_reg & OCP_CHARGER_BIT)
|
||||
cl_usb = 1000;
|
||||
else
|
||||
else if(chip->mmi.support_2a_dcp)
|
||||
cl_usb = 1800;
|
||||
else
|
||||
cl_usb = 1500;
|
||||
else if (chip->real_charger_type ==
|
||||
POWER_SUPPLY_TYPE_USB_CDP)
|
||||
cl_usb = 1500;
|
||||
@@ -11846,6 +11848,8 @@ static int parse_mmi_dt(struct smb_charger *chg)
|
||||
chg->mmi.vfloat_comp_mv = 0;
|
||||
chg->mmi.vfloat_comp_mv /= 1000;
|
||||
|
||||
chg->mmi.support_2a_dcp = of_property_read_bool(node, "qcom,support-2a-dcp");
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
@@ -505,6 +505,7 @@ struct mmi_params {
|
||||
int max_chrg_temp;
|
||||
int is_otg_enable;
|
||||
bool force_chg_suspend;
|
||||
bool support_2a_dcp;
|
||||
};
|
||||
|
||||
struct smb_charger {
|
||||
|
||||
Reference in new issue
Block a user