Lines Matching full:charger
41 /* TUSB1210 charger detection work states */
67 struct power_supply *charger; member
180 dev_dbg(&tusb->ulpi->dev, "charger type: %d\n", type); in tusb1210_chg_det_set_type()
213 * Boards using a TUSB121x for charger-detection have 3 power_supply class devs:
215 * tusb1211-charger-detect(1) -> charger -> fuel-gauge
217 * To determine if an USB charger is connected to the board, the online prop of
218 * the charger psy needs to be read. Since the tusb1211-charger-detect psy is
223 * these boards and the charger psy is looked up by name from this list.
225 * (1) modelling the external USB charger
228 "bq24190-charger",
236 for (i = 0; i < ARRAY_SIZE(tusb1210_chargers) && !tusb->charger; i++) in tusb1210_get_online()
237 tusb->charger = power_supply_get_by_name(tusb1210_chargers[i]); in tusb1210_get_online()
239 if (!tusb->charger) in tusb1210_get_online()
242 if (power_supply_get_property(tusb->charger, POWER_SUPPLY_PROP_ONLINE, &val)) in tusb1210_get_online()
266 /* Should never happen, skip charger detection */ in tusb1210_chg_det_work()
274 * Use the builtin charger detection FSM to keep things simple. in tusb1210_chg_det_work()
276 * boards which actually rely on the phy for charger detection. in tusb1210_chg_det_work()
287 /* Wait 400 ms for the charger detection FSM to finish */ in tusb1210_chg_det_work()
309 /* Set SW_CONTROL to stop the charger-det FSM */ in tusb1210_chg_det_work()
313 /* Clear DP_VSRC_EN which may have been enabled by the charger-det FSM */ in tusb1210_chg_det_work()
317 /* Clear CHGD_IDP_SRC_EN (may have been enabled by the charger-det FSM) */ in tusb1210_chg_det_work()
343 * The phy seems to take approx. 600ms longer then the charger in tusb1210_chg_det_work()
417 .name = "tusb1211-charger-detect",
426 /* Setup charger detection if requested, on errors continue without chg-det */
437 dev_err(dev, "error charger detection is only supported on the TUSB1211\n"); in tusb1210_probe_charger_detect()
450 * Delay initial run by 2 seconds to allow the charger driver, in tusb1210_probe_charger_detect()
470 if (tusb->charger) in tusb1210_remove_charger_detect()
471 power_supply_put(tusb->charger); in tusb1210_remove_charger_detect()