Lines Matching full:charger
46 /* TUSB1210 charger detection work states */
185 dev_dbg(tusb->dev, "charger type: %d\n", type); in tusb1210_chg_det_set_type()
218 * Boards using a TUSB121x for charger-detection have 3 power_supply class devs:
220 * tusb1211-charger-detect(1) -> charger -> fuel-gauge
222 * To determine if an USB charger is connected to the board, the online prop of
223 * the charger psy needs to be read. Since the tusb1211-charger-detect psy is
228 * these boards and the charger psy is looked up by name from this list.
230 * (1) modelling the external USB charger
233 "bq24190-charger",
238 struct power_supply *charger = NULL; in tusb1210_get_online() local
243 for (i = 0; i < ARRAY_SIZE(tusb1210_chargers) && !charger; i++) in tusb1210_get_online()
244 charger = power_supply_get_by_name(tusb1210_chargers[i]); in tusb1210_get_online()
246 if (!charger) in tusb1210_get_online()
249 ret = power_supply_get_property(charger, POWER_SUPPLY_PROP_ONLINE, &val); in tusb1210_get_online()
253 power_supply_put(charger); in tusb1210_get_online()
276 /* Should never happen, skip charger detection */ in tusb1210_chg_det_work()
284 * Use the builtin charger detection FSM to keep things simple. in tusb1210_chg_det_work()
286 * boards which actually rely on the phy for charger detection. in tusb1210_chg_det_work()
297 /* Wait 400 ms for the charger detection FSM to finish */ in tusb1210_chg_det_work()
319 /* Set SW_CONTROL to stop the charger-det FSM */ in tusb1210_chg_det_work()
323 /* Clear DP_VSRC_EN which may have been enabled by the charger-det FSM */ in tusb1210_chg_det_work()
327 /* Clear CHGD_IDP_SRC_EN (may have been enabled by the charger-det FSM) */ in tusb1210_chg_det_work()
353 * The phy seems to take approx. 600ms longer then the charger in tusb1210_chg_det_work()
421 .name = "tusb1211-charger-detect",
431 /* Setup charger detection if requested, on errors continue without chg-det */
443 dev_err(dev, "error charger detection is only supported on the TUSB1211\n"); in tusb1210_probe_charger_detect()
456 * Delay initial run by 2 seconds to allow the charger driver, in tusb1210_probe_charger_detect()