} else if (ratecheck(&sc->sc_lastbattchk, &zapm_battchkrate)) {
} else if (!sc->sc_suspended && ratecheck(&sc->sc_lastbattchk, &zapm_battchkrate)) {
zapm_poll(void *v){	struct zapm_softc *sc = v;	int	ac_on = sc->sc_ac_on;	int	charging = sc->sc_charging;	int	volt = sc->sc_batt_volt;	int	s;	s = splhigh();	if (sc->sc_discharging) {		sc->sc_discharging = 0;		volt = zapm_batt_volt();		ac_on = zapm_ac_on();		charging = ac_on && sc->sc_batt_full < MIN_BATT_FULL;		zapm_enable_charging(sc, charging);		DPRINTF(("zapm_poll: discharge off volt %d\n", volt));	} else		ac_on = zapm_ac_on();	if (ac_on) {		if (charging) {			if (zapm_charge_complete(sc)) {				DPRINTF(("zapm_poll: batt full\n"));				charging = 0;				zapm_enable_charging(sc, 0);			}		} else if (!zapm_charge_complete(sc)) {			charging = 1;			volt = zapm_batt_volt();			zapm_enable_charging(sc, 1);			DPRINTF(("zapm_poll: start charging volt %d\n", volt));		} else if (ratecheck(&sc->sc_lastbattchk, &zapm_battchkrate)		    && !zapm_charge_complete(sc)) {			DPRINTF(("zapm_poll: discharge on\n"));			if (charging)				zapm_enable_charging(sc, 0);			sc->sc_discharging = 1;			scoop_discharge_battery(1);			timeout_add(&sc->sc_poll, DISCHARGE_TIMEOUT);		}	} else {		if (sc->sc_ac_on) {			sc->sc_batt_full = 0;			charging = 0;			zapm_enable_charging(sc, 0);			timerclear(&sc->sc_lastbattchk);			DPRINTF(("zapm_poll: stop charging\n"));		} else if (ratecheck(&sc->sc_lastbattchk, &zapm_battchkrate)) {			volt = zapm_batt_volt();			DPRINTF(("zapm_poll: volt %d\n", volt));		}		if (zapm_batt_state(volt) == APM_BATT_CRITICAL)			sc->sc_event = APM_CRIT_SUSPEND_REQ;	}	if (ac_on != sc->sc_ac_on || charging != sc->sc_charging ||	    volt != sc->sc_batt_volt) {		sc->sc_ac_on = ac_on;		sc->sc_charging = charging;		sc->sc_batt_volt = volt;		if (sc->sc_event == APM_NOEVENT)			sc->sc_event = APM_POWER_CHANGE;	}#ifdef APMDEBUG	if (sc->sc_event != APM_NOEVENT)		printf("zapm_poll: power event %d\n", sc->sc_event);#endif	splx(s);}