mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
power: qpnp-smbcharger-mmi: Set 5V to 9V
The USB Input voltage should be 5V to 9 V. Change-Id: I2cd1976feb4c80ff5f02fa232eec3da0ff65cdac Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com> Reviewed-on: https://gerrit.mot.com/1231211 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Curtis Porter <porterc@motorola.com> Reviewed-by: Konstantin Makariev <kmakariev@motorola.com> Reviewed-by: Ling Jin <lingjin@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
068f6a1035
commit
e6cfa933fc
1 changed files with 20 additions and 0 deletions
|
|
@ -41,6 +41,19 @@
|
|||
#define ICL_OVERRIDE_AFTER_APSD_BIT BIT(4)
|
||||
#define USBIN_AICL_OPTIONS_CFG_REG (USBIN_BASE + 0x80)
|
||||
#define LEGACY_CABLE_CFG_REG (TYPEC_BASE + 0x5A)
|
||||
#define USBIN_ADAPTER_ALLOW_CFG_REG (USBIN_BASE + 0x60)
|
||||
#define USBIN_ADAPTER_ALLOW_MASK GENMASK(3, 0)
|
||||
enum {
|
||||
USBIN_ADAPTER_ALLOW_5V = 0,
|
||||
USBIN_ADAPTER_ALLOW_9V = 2,
|
||||
USBIN_ADAPTER_ALLOW_5V_OR_9V = 3,
|
||||
USBIN_ADAPTER_ALLOW_12V = 4,
|
||||
USBIN_ADAPTER_ALLOW_5V_OR_12V = 5,
|
||||
USBIN_ADAPTER_ALLOW_9V_TO_12V = 6,
|
||||
USBIN_ADAPTER_ALLOW_5V_OR_9V_TO_12V = 7,
|
||||
USBIN_ADAPTER_ALLOW_5V_TO_9V = 8,
|
||||
USBIN_ADAPTER_ALLOW_5V_TO_12V = 12,
|
||||
};
|
||||
|
||||
struct smb_mmi_chg_param {
|
||||
const char *name;
|
||||
|
|
@ -1251,6 +1264,13 @@ static int smb_mmi_probe(struct platform_device *pdev)
|
|||
0xFF, 0))
|
||||
pr_err("Could Not set Legacy Cable CFG\n");
|
||||
|
||||
if ((chip->smb_version == PM8150B_SUBTYPE) ||
|
||||
(chip->smb_version == PM660_SUBTYPE))
|
||||
if (smblib_masked_write_mmi(chip, USBIN_ADAPTER_ALLOW_CFG_REG,
|
||||
USBIN_ADAPTER_ALLOW_MASK,
|
||||
USBIN_ADAPTER_ALLOW_5V_TO_9V))
|
||||
pr_err("Could Not set USB Adapter CFG\n");
|
||||
|
||||
chip->factory_mode = mmi_factory_check();
|
||||
|
||||
rc = device_create_file(chip->dev,
|
||||
|
|
|
|||
Loading…
Reference in a new issue