Lines Matching refs:chg_info

232 	struct ab8500_chargalg_charger_info chg_info;  member
333 if (di->chg_info.charger_type & USB_CHG) { in ab8500_chargalg_check_charger_enable()
337 } else if (di->chg_info.charger_type & AC_CHG) { in ab8500_chargalg_check_charger_enable()
354 if (di->chg_info.conn_chg != di->chg_info.prev_conn_chg) { in ab8500_chargalg_check_charger_connection()
356 if (di->chg_info.conn_chg & AC_CHG) { in ab8500_chargalg_check_charger_connection()
358 if (di->chg_info.charger_type != AC_CHG) { in ab8500_chargalg_check_charger_connection()
359 di->chg_info.charger_type = AC_CHG; in ab8500_chargalg_check_charger_connection()
362 } else if (di->chg_info.conn_chg & USB_CHG) { in ab8500_chargalg_check_charger_connection()
364 di->chg_info.charger_type = USB_CHG; in ab8500_chargalg_check_charger_connection()
368 di->chg_info.charger_type = NO_CHG; in ab8500_chargalg_check_charger_connection()
371 di->chg_info.prev_conn_chg = di->chg_info.conn_chg; in ab8500_chargalg_check_charger_connection()
373 return di->chg_info.conn_chg; in ab8500_chargalg_check_charger_connection()
388 switch (di->chg_info.charger_type) { in ab8500_chargalg_start_safety_timer()
465 di->chg_info.online_chg & AC_CHG) { in ab8500_chargalg_kick_watchdog()
468 di->chg_info.online_chg & USB_CHG) in ab8500_chargalg_kick_watchdog()
496 di->chg_info.ac_iset_ua = iset_ua; in ab8500_chargalg_ac_en()
497 di->chg_info.ac_vset_uv = vset_uv; in ab8500_chargalg_ac_en()
524 di->chg_info.usb_iset_ua = iset_ua; in ab8500_chargalg_usb_en()
525 di->chg_info.usb_vset_uv = vset_uv; in ab8500_chargalg_usb_en()
543 di->chg_info.charger_type & AC_CHG) { in ab8500_chargalg_update_chg_curr()
551 di->chg_info.ac_iset_ua = iset_ua; in ab8500_chargalg_update_chg_curr()
555 di->chg_info.charger_type & USB_CHG) { in ab8500_chargalg_update_chg_curr()
563 di->chg_info.usb_iset_ua = iset_ua; in ab8500_chargalg_update_chg_curr()
623 switch (di->chg_info.charger_type) { in ab8500_chargalg_start_charging()
704 if (di->chg_info.usb_volt_uv > di->bm->chg_params->usb_volt_max_uv) in ab8500_chargalg_check_charger_voltage()
705 di->chg_info.usb_chg_ok = false; in ab8500_chargalg_check_charger_voltage()
707 di->chg_info.usb_chg_ok = true; in ab8500_chargalg_check_charger_voltage()
709 if (di->chg_info.ac_volt_uv > di->bm->chg_params->ac_volt_max_uv) in ab8500_chargalg_check_charger_voltage()
710 di->chg_info.ac_chg_ok = false; in ab8500_chargalg_check_charger_voltage()
712 di->chg_info.ac_chg_ok = true; in ab8500_chargalg_check_charger_voltage()
905 (di->chg_info.conn_chg & AC_CHG)) { in ab8500_chargalg_get_ext_psy_data()
906 di->chg_info.prev_conn_chg = in ab8500_chargalg_get_ext_psy_data()
907 di->chg_info.conn_chg; in ab8500_chargalg_get_ext_psy_data()
908 di->chg_info.conn_chg &= ~AC_CHG; in ab8500_chargalg_get_ext_psy_data()
912 !(di->chg_info.conn_chg & AC_CHG)) { in ab8500_chargalg_get_ext_psy_data()
913 di->chg_info.prev_conn_chg = in ab8500_chargalg_get_ext_psy_data()
914 di->chg_info.conn_chg; in ab8500_chargalg_get_ext_psy_data()
915 di->chg_info.conn_chg |= AC_CHG; in ab8500_chargalg_get_ext_psy_data()
921 (di->chg_info.conn_chg & USB_CHG)) { in ab8500_chargalg_get_ext_psy_data()
922 di->chg_info.prev_conn_chg = in ab8500_chargalg_get_ext_psy_data()
923 di->chg_info.conn_chg; in ab8500_chargalg_get_ext_psy_data()
924 di->chg_info.conn_chg &= ~USB_CHG; in ab8500_chargalg_get_ext_psy_data()
928 !(di->chg_info.conn_chg & USB_CHG)) { in ab8500_chargalg_get_ext_psy_data()
929 di->chg_info.prev_conn_chg = in ab8500_chargalg_get_ext_psy_data()
930 di->chg_info.conn_chg; in ab8500_chargalg_get_ext_psy_data()
931 di->chg_info.conn_chg |= USB_CHG; in ab8500_chargalg_get_ext_psy_data()
946 (di->chg_info.online_chg & AC_CHG)) { in ab8500_chargalg_get_ext_psy_data()
947 di->chg_info.prev_online_chg = in ab8500_chargalg_get_ext_psy_data()
948 di->chg_info.online_chg; in ab8500_chargalg_get_ext_psy_data()
949 di->chg_info.online_chg &= ~AC_CHG; in ab8500_chargalg_get_ext_psy_data()
953 !(di->chg_info.online_chg & AC_CHG)) { in ab8500_chargalg_get_ext_psy_data()
954 di->chg_info.prev_online_chg = in ab8500_chargalg_get_ext_psy_data()
955 di->chg_info.online_chg; in ab8500_chargalg_get_ext_psy_data()
956 di->chg_info.online_chg |= AC_CHG; in ab8500_chargalg_get_ext_psy_data()
964 (di->chg_info.online_chg & USB_CHG)) { in ab8500_chargalg_get_ext_psy_data()
965 di->chg_info.prev_online_chg = in ab8500_chargalg_get_ext_psy_data()
966 di->chg_info.online_chg; in ab8500_chargalg_get_ext_psy_data()
967 di->chg_info.online_chg &= ~USB_CHG; in ab8500_chargalg_get_ext_psy_data()
971 !(di->chg_info.online_chg & USB_CHG)) { in ab8500_chargalg_get_ext_psy_data()
972 di->chg_info.prev_online_chg = in ab8500_chargalg_get_ext_psy_data()
973 di->chg_info.online_chg; in ab8500_chargalg_get_ext_psy_data()
974 di->chg_info.online_chg |= USB_CHG; in ab8500_chargalg_get_ext_psy_data()
1074 di->chg_info.ac_volt_uv = ret.intval; in ab8500_chargalg_get_ext_psy_data()
1077 di->chg_info.usb_volt_uv = ret.intval; in ab8500_chargalg_get_ext_psy_data()
1130 di->chg_info.ac_curr_ua = ret.intval; in ab8500_chargalg_get_ext_psy_data()
1133 di->chg_info.usb_curr_ua = ret.intval; in ab8500_chargalg_get_ext_psy_data()
1293 !di->chg_info.usb_chg_ok || in ab8500_chargalg_algorithm()
1294 !di->chg_info.ac_chg_ok) { in ab8500_chargalg_algorithm()
1335 di->chg_info.charger_type, in ab8500_chargalg_algorithm()
1337 di->chg_info.conn_chg & AC_CHG, in ab8500_chargalg_algorithm()
1338 di->chg_info.conn_chg & USB_CHG, in ab8500_chargalg_algorithm()
1339 di->chg_info.online_chg & AC_CHG, in ab8500_chargalg_algorithm()
1340 di->chg_info.online_chg & USB_CHG, in ab8500_chargalg_algorithm()
1343 di->chg_info.ac_curr_ua, in ab8500_chargalg_algorithm()
1344 di->chg_info.usb_curr_ua, in ab8500_chargalg_algorithm()
1345 di->chg_info.ac_vset_uv, in ab8500_chargalg_algorithm()
1346 di->chg_info.ac_iset_ua, in ab8500_chargalg_algorithm()
1347 di->chg_info.usb_vset_uv, in ab8500_chargalg_algorithm()
1348 di->chg_info.usb_iset_ua); in ab8500_chargalg_algorithm()
1390 di->chg_info.usb_chg_ok && in ab8500_chargalg_algorithm()
1391 di->chg_info.ac_chg_ok) in ab8500_chargalg_algorithm()
1601 if (di->chg_info.conn_chg) in ab8500_chargalg_periodic_work()
1693 if (di->chg_info.online_chg) in ab8500_chargalg_resume()
1709 if (di->chg_info.online_chg) in ab8500_chargalg_suspend()
1810 di->chg_info.prev_conn_chg = -1; in ab8500_chargalg_probe()