Lines Matching refs:battery
134 } battery[2];
677 * If either battery has been warned, solid LED
679 * If either battery is bad, flash the LED semi quickly
683 if (card->battery[0].good && card->battery[1].good)
685 else if (card->battery[0].warned || card->battery[1].warned)
687 else if (!card->battery[0].good && !card->battery[1].good)
695 static int check_battery(struct cardinfo *card, int battery, int status)
697 if (status != card->battery[battery].good) {
698 card->battery[battery].good = !card->battery[battery].good;
699 card->battery[battery].last_change = jiffies;
701 if (card->battery[battery].good) {
703 "Battery %d now good\n", battery + 1);
704 card->battery[battery].warned = 0;
707 "Battery %d now FAILED\n", battery + 1);
710 } else if (!card->battery[battery].good &&
711 !card->battery[battery].warned &&
712 time_after_eq(jiffies, card->battery[battery].last_change +
715 "Battery %d still FAILED after 5 hours\n", battery + 1);
716 card->battery[battery].warned = 1;
736 "checking battery status, 1 = %s, 2 = %s\n",
960 card->battery[0].good = !(batt_status & BATTERY_1_FAILURE);
961 card->battery[1].good = !(batt_status & BATTERY_2_FAILURE);
962 card->battery[0].last_change = card->battery[1].last_change = jiffies;
972 card->battery[0].good ? "OK" : "FAILURE",
974 card->battery[1].good ? "OK" : "FAILURE");