1/*-
2 * Copyright (c) 2000 Takanori Watanabe <takawata@jp.freebsd.org>
3 * Copyright (c) 2000 Mitsuru IWASAKI <iwasaki@jp.freebsd.org>
4 * Copyright (c) 2000, 2001 Michael Smith
5 * Copyright (c) 2000 BSDi
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
--- 12 unchanged lines hidden (view full) ---
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * $FreeBSD: head/sys/dev/acpica/acpi.c 111750 2003-03-02 18:47:38Z phk $
30 */
31
32#include "opt_acpi.h"
33#include <sys/param.h>
34#include <sys/kernel.h>
35#include <sys/proc.h>
36#include <sys/fcntl.h>
37#include <sys/malloc.h>
--- 31 unchanged lines hidden (view full) ---
69 */
70
71static d_open_t acpiopen;
72static d_close_t acpiclose;
73static d_ioctl_t acpiioctl;
74
75#define CDEV_MAJOR 152
76static struct cdevsw acpi_cdevsw = {
77 /* open */ acpiopen,
78 /* close */ acpiclose,
79 /* read */ noread,
80 /* write */ nowrite,
81 /* ioctl */ acpiioctl,
82 /* poll */ nopoll,
83 /* mmap */ nommap,
84 /* strategy */ nostrategy,
85 /* name */ "acpi",
86 /* maj */ CDEV_MAJOR,
87 /* dump */ nodump,
88 /* psize */ nopsize,
89 /* flags */ 0
90};
91
92static const char* sleep_state_names[] = {
93 "S0", "S1", "S2", "S3", "S4", "S5", "NONE"};
94
95/* this has to be static, as the softc is gone when we need it */
96static int acpi_off_state = ACPI_STATE_S5;
97
--- 2050 unchanged lines hidden ---
2 * Copyright (c) 2000 Takanori Watanabe <takawata@jp.freebsd.org>
3 * Copyright (c) 2000 Mitsuru IWASAKI <iwasaki@jp.freebsd.org>
4 * Copyright (c) 2000, 2001 Michael Smith
5 * Copyright (c) 2000 BSDi
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
--- 12 unchanged lines hidden (view full) ---
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * $FreeBSD: head/sys/dev/acpica/acpi.c 111750 2003-03-02 18:47:38Z phk $
30 */
31
32#include "opt_acpi.h"
33#include <sys/param.h>
34#include <sys/kernel.h>
35#include <sys/proc.h>
36#include <sys/fcntl.h>
37#include <sys/malloc.h>
--- 31 unchanged lines hidden (view full) ---
69 */
70
71static d_open_t acpiopen;
72static d_close_t acpiclose;
73static d_ioctl_t acpiioctl;
74
75#define CDEV_MAJOR 152
76static struct cdevsw acpi_cdevsw = {
77 /* open */ acpiopen,
78 /* close */ acpiclose,
79 /* read */ noread,
80 /* write */ nowrite,
81 /* ioctl */ acpiioctl,
82 /* poll */ nopoll,
83 /* mmap */ nommap,
84 /* strategy */ nostrategy,
85 /* name */ "acpi",
86 /* maj */ CDEV_MAJOR,
87 /* dump */ nodump,
88 /* psize */ nopsize,
89 /* flags */ 0
90};
91
92static const char* sleep_state_names[] = {
93 "S0", "S1", "S2", "S3", "S4", "S5", "NONE"};
94
95/* this has to be static, as the softc is gone when we need it */
96static int acpi_off_state = ACPI_STATE_S5;
97
--- 2050 unchanged lines hidden ---