Only with BQ24296 OTG+PMU charging, the 1th time to access the USB flash drive tips to solve the problem of charging

Source: Internet
Author: User

Only with BQ24296 OTG+PMU charging, the 1th time to access the USB flash drive tips to solve the problem of charging

Platform: msm8909+android5.1.1

At present, due to the BQ24296 charging mode of power display still have a lot of problems, instead of only using BQ24296 OTG function, or use PMU to charge, but found that the 1th time to access the USB flash drive tips Charging

Why this situation, the root cause is not found out temporarily, but can kernel\drivers\power\qpnp\linear-charger.c under the Get_prop_batt_status () add the following processing can avoid this problem

static int get_prop_batt_status (struct qpnp_lbc_chip *chip) {int rc;u8 reg_val;union power_supply_propval ret = {0,};if (q Pnp_lbc_is_usb_chg_plugged_in (Chip) && chip->chg_done) return POWER_SUPPLY_STATUS_FULL;RC = Qpnp_lbc_read (Chip, Chip->chgr_base + int_rt_sts_reg,&reg_val, 1); if (RC) {pr_err ("Failed to read interrupt STS rc=%d\n", RC); r Eturn Power_supply_charge_type_none;} Kandi Add Startchip->usb_psy->get_property (Chip->usb_psy,power_supply_prop_online, &ret); Ret.intval)//Solve the 1th time Access USB flash drive Display charging problem {if (Reg_val & FAST_CHG_ON_IRQ) {return power_supply_status_charging;}} Kandi add Endreturn power_supply_status_discharging;}


Only with BQ24296 OTG+PMU charging, the 1th time to access the USB flash drive tips to solve the problem of charging

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.