Lines Matching defs:charger

42 /* TUSB1210 charger detection work states */
68 struct power_supply *charger;
181 dev_dbg(&tusb->ulpi->dev, "charger type: %d\n", type);
214 * Boards using a TUSB121x for charger-detection have 3 power_supply class devs:
216 * tusb1211-charger-detect(1) -> charger -> fuel-gauge
218 * To determine if an USB charger is connected to the board, the online prop of
219 * the charger psy needs to be read. Since the tusb1211-charger-detect psy is
224 * these boards and the charger psy is looked up by name from this list.
226 * (1) modelling the external USB charger
229 "bq24190-charger",
237 for (i = 0; i < ARRAY_SIZE(tusb1210_chargers) && !tusb->charger; i++)
238 tusb->charger = power_supply_get_by_name(tusb1210_chargers[i]);
240 if (!tusb->charger)
243 if (power_supply_get_property(tusb->charger, POWER_SUPPLY_PROP_ONLINE, &val))
267 /* Should never happen, skip charger detection */
275 * Use the builtin charger detection FSM to keep things simple.
277 * boards which actually rely on the phy for charger detection.
288 /* Wait 400 ms for the charger detection FSM to finish */
310 /* Set SW_CONTROL to stop the charger-det FSM */
314 /* Clear DP_VSRC_EN which may have been enabled by the charger-det FSM */
318 /* Clear CHGD_IDP_SRC_EN (may have been enabled by the charger-det FSM) */
344 * The phy seems to take approx. 600ms longer then the charger
418 .name = "tusb1211-charger-detect",
427 /* Setup charger detection if requested, on errors continue without chg-det */
438 dev_err(dev, "error charger detection is only supported on the TUSB1211\n");
451 * Delay initial run by 2 seconds to allow the charger driver,
471 if (tusb->charger)
472 power_supply_put(tusb->charger);