Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9fb55ade authored by Kavya Nunna's avatar Kavya Nunna
Browse files

power: smblite-lib: Enable non-standard ICL configuration for SDP



Allow HC mode configuration of ICL for SDP for non-standard
current settings This is required for flash/torch
operations where ICL is tweaked based on flash/torch status.

Change-Id: I8dffe3a2fc9b5c9c89722a38a78a96f29f90196a
Signed-off-by: default avatarKavya Nunna <knunna@codeaurora.org>
parent fe614dee
Loading
Loading
Loading
Loading
+9 −10
Original line number Diff line number Diff line
@@ -494,20 +494,19 @@ static int set_sdp_current(struct smb_charger *chg, int icl_ua)
	case USBIN_500UA:
		icl_options = USB51_MODE_BIT;
		break;
	/* USB900 mode is not present use ICL configuration register */
	case USBIN_900UA:
	default:
		/* Use ICL configuration register for HC_MODE*/
		icl_override = SW_OVERRIDE_HC_MODE;
		icl_options = USBIN_MODE_CHG_BIT;
		break;
	}

	rc = smblite_lib_set_charge_param(chg, &chg->param.usb_icl,
						USBIN_900UA);
						icl_ua);
	if (rc < 0) {
		smblite_lib_err(chg, "Couldn't set HC ICL rc=%d\n", rc);
		return rc;
	}
		break;
	default:
		return -EINVAL;
	}

	rc = smblite_lib_masked_write(chg,
			USBIN_ICL_OPTIONS_REG, USB51_MODE_BIT, icl_options);