Lines Matching full:cable

448  * duration exceed 'discharging _max_duration_ms', charger cable is
909 * of charger cable
915 struct charger_cable *cable = in charger_extcon_work() local
919 if (cable->attached && cable->min_uA != 0 && cable->max_uA != 0) { in charger_extcon_work()
920 ret = regulator_set_current_limit(cable->charger->consumer, in charger_extcon_work()
921 cable->min_uA, cable->max_uA); in charger_extcon_work()
924 cable->charger->regulator_name, cable->name); in charger_extcon_work()
929 cable->charger->regulator_name, in charger_extcon_work()
930 cable->min_uA, cable->max_uA); in charger_extcon_work()
938 * charger_extcon_notifier - receive the state of charger cable
939 * when registered cable is attached or detached.
942 * @event: the cable state.
948 struct charger_cable *cable = in charger_extcon_notifier() local
952 * The newly state of charger cable. in charger_extcon_notifier()
953 * If cable is attached, cable->attached is true. in charger_extcon_notifier()
955 cable->attached = event; in charger_extcon_notifier()
959 * according to charger cable. in charger_extcon_notifier()
961 schedule_work(&cable->wq); in charger_extcon_notifier()
968 * as the charger cable
971 * @cable: the Charger cable representing the external connector.
974 struct charger_cable *cable) in charger_extcon_init() argument
981 * the charger cable among various external connector in charger_extcon_init()
982 * cable (e.g., TA, USB, MHL, Dock). in charger_extcon_init()
984 INIT_WORK(&cable->wq, charger_extcon_work); in charger_extcon_init()
985 cable->nb.notifier_call = charger_extcon_notifier; in charger_extcon_init()
987 cable->extcon_dev = extcon_get_extcon_dev(cable->extcon_name); in charger_extcon_init()
988 if (IS_ERR_OR_NULL(cable->extcon_dev)) { in charger_extcon_init()
989 pr_err("Cannot find extcon_dev for %s (cable: %s)\n", in charger_extcon_init()
990 cable->extcon_name, cable->name); in charger_extcon_init()
991 if (cable->extcon_dev == NULL) in charger_extcon_init()
994 return PTR_ERR(cable->extcon_dev); in charger_extcon_init()
998 if (!strcmp(cable->name, extcon_mapping[i].name)) { in charger_extcon_init()
1004 pr_err("Cannot find cable for type %s", cable->name); in charger_extcon_init()
1008 cable->extcon_type = extcon_type; in charger_extcon_init()
1010 ret = devm_extcon_register_notifier(cm->dev, cable->extcon_dev, in charger_extcon_init()
1011 cable->extcon_type, &cable->nb); in charger_extcon_init()
1013 pr_err("Cannot register extcon_dev for %s (cable: %s)\n", in charger_extcon_init()
1014 cable->extcon_name, cable->name); in charger_extcon_init()
1023 * of charger cable.
1028 * select the charger cable for charging among a number of external cable
1053 struct charger_cable *cable = &charger->cables[j]; in charger_manager_register_extcon() local
1055 ret = charger_extcon_init(cm, cable); in charger_manager_register_extcon()
1061 cable->charger = charger; in charger_manager_register_extcon()
1062 cable->cm = cm; in charger_manager_register_extcon()
1064 event = extcon_get_state(cable->extcon_dev, in charger_manager_register_extcon()
1065 cable->extcon_type); in charger_manager_register_extcon()
1066 charger_extcon_notifier(&cable->nb, in charger_manager_register_extcon()
1391 "cm-cable-name", &cables->name); in of_cm_parse_desc()
1393 "cm-cable-extcon", in of_cm_parse_desc()
1396 "cm-cable-min", in of_cm_parse_desc()
1399 "cm-cable-max", in of_cm_parse_desc()
1594 /* Register extcon device for charger cable */ in charger_manager_probe()