Lines Matching refs:mode
98 static void parse_mode(char *arg, int *mode, int ch);
286 * to APM. If nothing succeeds, we'll just run in default mode.
432 parse_mode(char *arg, int *mode, int ch)
436 *mode = MODE_MIN;
438 *mode = MODE_MAX;
440 *mode = MODE_ADAPTIVE;
442 *mode = MODE_HIADAPTIVE;
474 "usage: powerd [-v] [-a mode] [-b mode] [-i %%] [-m freq] [-M freq] [-n mode] [-p ival] [-r %%] [-s source] [-P pidfile]\n");
488 int ch, mode, mode_ac, mode_battery, mode_none, idle, to;
492 /* Default mode for all AC states is adaptive. */
568 mode = mode_none;
592 /* Run in the background unless in verbose mode. */
605 warn("cannot enter daemon mode, exiting");
628 * If we are in adaptive mode and the current frequency is outside the
679 if (mode == MODE_HIADAPTIVE || idle < 120)
698 /* Read the current AC status and record the mode. */
702 mode = mode_ac;
705 mode = mode_battery;
708 mode = mode_none;
728 /* Always switch to the lowest frequency in min mode. */
729 if (mode == MODE_MIN) {
747 /* Always switch to the highest frequency in max mode. */
748 if (mode == MODE_MAX) {
766 /* Adaptive mode; get the current CPU usage times. */
773 if (mode == MODE_ADAPTIVE) {