Loading drivers/power/qpnp-linear-charger.c +4 −5 Original line number Diff line number Diff line Loading @@ -37,8 +37,7 @@ #define BATT_PRES_IRQ BIT(0) /* USB CHARGER PATH peripheral register offsets */ #define USB_PTH_STS_REG 0x09 #define USB_IN_VALID_MASK LBC_MASK(7, 6) #define USB_IN_VALID_MASK BIT(1) #define USB_SUSP_REG 0x47 #define USB_SUSPEND_BIT BIT(0) Loading Loading @@ -604,15 +603,15 @@ static int qpnp_lbc_is_usb_chg_plugged_in(struct qpnp_lbc_chip *chip) u8 usbin_valid_rt_sts; int rc; rc = qpnp_lbc_read(chip, chip->usb_chgpth_base + USB_PTH_STS_REG, rc = qpnp_lbc_read(chip, chip->usb_chgpth_base + INT_RT_STS_REG, &usbin_valid_rt_sts, 1); if (rc) { pr_err("spmi read failed: addr=%03X, rc=%d\n", chip->usb_chgpth_base + USB_PTH_STS_REG, rc); chip->usb_chgpth_base + INT_RT_STS_REG, rc); return rc; } pr_debug("usb_path_sts 0x%x\n", usbin_valid_rt_sts); pr_debug("rt_sts 0x%x\n", usbin_valid_rt_sts); return (usbin_valid_rt_sts & USB_IN_VALID_MASK) ? 1 : 0; } Loading Loading
drivers/power/qpnp-linear-charger.c +4 −5 Original line number Diff line number Diff line Loading @@ -37,8 +37,7 @@ #define BATT_PRES_IRQ BIT(0) /* USB CHARGER PATH peripheral register offsets */ #define USB_PTH_STS_REG 0x09 #define USB_IN_VALID_MASK LBC_MASK(7, 6) #define USB_IN_VALID_MASK BIT(1) #define USB_SUSP_REG 0x47 #define USB_SUSPEND_BIT BIT(0) Loading Loading @@ -604,15 +603,15 @@ static int qpnp_lbc_is_usb_chg_plugged_in(struct qpnp_lbc_chip *chip) u8 usbin_valid_rt_sts; int rc; rc = qpnp_lbc_read(chip, chip->usb_chgpth_base + USB_PTH_STS_REG, rc = qpnp_lbc_read(chip, chip->usb_chgpth_base + INT_RT_STS_REG, &usbin_valid_rt_sts, 1); if (rc) { pr_err("spmi read failed: addr=%03X, rc=%d\n", chip->usb_chgpth_base + USB_PTH_STS_REG, rc); chip->usb_chgpth_base + INT_RT_STS_REG, rc); return rc; } pr_debug("usb_path_sts 0x%x\n", usbin_valid_rt_sts); pr_debug("rt_sts 0x%x\n", usbin_valid_rt_sts); return (usbin_valid_rt_sts & USB_IN_VALID_MASK) ? 1 : 0; } Loading