mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
add CDP max current config interface
add CDP max current config interface for product config Change-Id: I31dc81b67c46dc747163ceaa71bf61e8250b6385 Signed-off-by: Haijian Ma <mahj8@motorola.com> Reviewed-on: https://gerrit.mot.com/2826519 Reviewed-by: Huosheng Liao <liaohs@motorola.com> SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Submit-Approved: Jira Key
This commit is contained in:
parent
8d0e729e1c
commit
8608c07035
3 changed files with 8 additions and 1 deletions
|
|
@ -805,6 +805,12 @@ static int smb5_parse_dt_mmi(struct smb5 *chip, struct device_node *node)
|
|||
chg->usb_dcp_curr_max = 0;
|
||||
np = of_find_node_by_path("/chosen");
|
||||
|
||||
retval = of_property_read_u32(npoint, "qcom,cdp-curr-max",
|
||||
&chg->usb_cdp_curr_max);
|
||||
if (retval) {
|
||||
chg->usb_cdp_curr_max = 1500000;
|
||||
}
|
||||
|
||||
retval = of_property_read_u32(npoint, "qcom,dcp-curr-max",
|
||||
&chg->usb_dcp_curr_max);
|
||||
if (retval) {
|
||||
|
|
|
|||
|
|
@ -6195,7 +6195,7 @@ static void update_sw_icl_max(struct smb_charger *chg, int val)
|
|||
break;
|
||||
case POWER_SUPPLY_TYPE_USB_CDP:
|
||||
vote(chg->usb_icl_votable, SW_ICL_MAX_VOTER, true,
|
||||
CDP_CURRENT_UA);
|
||||
(chg->usb_cdp_curr_max > 0) ? chg->usb_cdp_curr_max : CDP_CURRENT_UA);
|
||||
vote(chg->usb_icl_votable, USB_PSY_VOTER, false, 0);
|
||||
break;
|
||||
case POWER_SUPPLY_TYPE_USB_DCP:
|
||||
|
|
|
|||
|
|
@ -633,6 +633,7 @@ struct smb_charger {
|
|||
ktime_t dcin_uv_last_time;
|
||||
int last_wls_vout;
|
||||
int usb_dcp_curr_max;
|
||||
int usb_cdp_curr_max;
|
||||
|
||||
/* mmi qc3p */
|
||||
struct iio_channel **iio_chan_list_mmi_cp;
|
||||
|
|
|
|||
Loading…
Reference in a new issue