1/*
2 * APM (Advanced Power Management) BIOS Device Driver
3 *
4 * Copyright (c) 1994 UKAI, Fumitoshi.
5 * Copyright (c) 1994-1995 by HOSOKAWA, Tatsumi <hosokawa@jp.FreeBSD.org>
6 * Copyright (c) 1996 Nate Williams <nate@FreeBSD.org>
7 * Copyright (c) 1997 Poul-Henning Kamp <phk@FreeBSD.org>
8 *
9 * This software may be used, modified, copied, and distributed, in
10 * both source and binary form provided that the above copyright and
11 * these terms are retained. Under no circumstances is the author
12 * responsible for the proper functioning of this software, nor does
13 * the author assume any responsibility for damages incurred with its
14 * use.
15 *
16 * Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
17 *
18 * $FreeBSD: head/sys/i386/bios/apm.c 111815 2003-03-03 12:15:54Z phk $
19 */
20
21#include <sys/param.h>
22#include <sys/systm.h>
23#include <sys/bus.h>
24#include <sys/conf.h>
25#include <sys/eventhandler.h>
26#include <sys/fcntl.h>
--- 58 unchanged lines hidden (view full) ---
85static d_open_t apmopen;
86static d_close_t apmclose;
87static d_write_t apmwrite;
88static d_ioctl_t apmioctl;
89static d_poll_t apmpoll;
90
91#define CDEV_MAJOR 39
92static struct cdevsw apm_cdevsw = {
93 .d_open = apmopen,
94 .d_close = apmclose,
95 .d_write = apmwrite,
96 .d_ioctl = apmioctl,
97 .d_poll = apmpoll,
98 .d_name = "apm",
99 .d_maj = CDEV_MAJOR,
100};
101
102static int apm_suspend_delay = 1;
103static int apm_standby_delay = 1;
104static int apm_debug = 0;
105
106#define APM_DPRINT(args...) do { \
107 if (apm_debug) { \
--- 1321 unchanged lines hidden ---
2 * APM (Advanced Power Management) BIOS Device Driver
3 *
4 * Copyright (c) 1994 UKAI, Fumitoshi.
5 * Copyright (c) 1994-1995 by HOSOKAWA, Tatsumi <hosokawa@jp.FreeBSD.org>
6 * Copyright (c) 1996 Nate Williams <nate@FreeBSD.org>
7 * Copyright (c) 1997 Poul-Henning Kamp <phk@FreeBSD.org>
8 *
9 * This software may be used, modified, copied, and distributed, in
10 * both source and binary form provided that the above copyright and
11 * these terms are retained. Under no circumstances is the author
12 * responsible for the proper functioning of this software, nor does
13 * the author assume any responsibility for damages incurred with its
14 * use.
15 *
16 * Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
17 *
18 * $FreeBSD: head/sys/i386/bios/apm.c 111815 2003-03-03 12:15:54Z phk $
19 */
20
21#include <sys/param.h>
22#include <sys/systm.h>
23#include <sys/bus.h>
24#include <sys/conf.h>
25#include <sys/eventhandler.h>
26#include <sys/fcntl.h>
--- 58 unchanged lines hidden (view full) ---
85static d_open_t apmopen;
86static d_close_t apmclose;
87static d_write_t apmwrite;
88static d_ioctl_t apmioctl;
89static d_poll_t apmpoll;
90
91#define CDEV_MAJOR 39
92static struct cdevsw apm_cdevsw = {
93 .d_open = apmopen,
94 .d_close = apmclose,
95 .d_write = apmwrite,
96 .d_ioctl = apmioctl,
97 .d_poll = apmpoll,
98 .d_name = "apm",
99 .d_maj = CDEV_MAJOR,
100};
101
102static int apm_suspend_delay = 1;
103static int apm_standby_delay = 1;
104static int apm_debug = 0;
105
106#define APM_DPRINT(args...) do { \
107 if (apm_debug) { \
--- 1321 unchanged lines hidden ---