1/*-
2 * Copyright (c) 2001 Mitsuru IWASAKI
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
--- 9 unchanged lines hidden (view full) ---
18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/i386/acpica/acpi_machdep.c 107144 2002-11-21 20:55:22Z jhb $
27 */
28
29#include <sys/param.h>
30#include <sys/bus.h>
31#include <sys/conf.h>
32#include <sys/fcntl.h>
33#include <sys/uio.h>
34
--- 24 unchanged lines hidden (view full) ---
59static d_open_t apmopen;
60static d_close_t apmclose;
61static d_write_t apmwrite;
62static d_ioctl_t apmioctl;
63static d_poll_t apmpoll;
64
65#define CDEV_MAJOR 39
66static struct cdevsw apm_cdevsw = {
67 /* open */ apmopen,
68 /* close */ apmclose,
69 /* read */ noread,
70 /* write */ apmwrite,
71 /* ioctl */ apmioctl,
72 /* poll */ apmpoll,
73 /* mmap */ nommap,
74 /* strategy */ nostrategy,
75 /* name */ "apm",
76 /* maj */ CDEV_MAJOR,
77 /* dump */ nodump,
78 /* psize */ nopsize,
79 /* flags */ 0,
80};
81
82static int
83acpi_capm_convert_battstate(struct acpi_battinfo *battp)
84{
85 int state;
86
87 state = 0xff; /* XXX unknown */
--- 261 unchanged lines hidden ---
2 * Copyright (c) 2001 Mitsuru IWASAKI
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
--- 9 unchanged lines hidden (view full) ---
18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/i386/acpica/acpi_machdep.c 107144 2002-11-21 20:55:22Z jhb $
27 */
28
29#include <sys/param.h>
30#include <sys/bus.h>
31#include <sys/conf.h>
32#include <sys/fcntl.h>
33#include <sys/uio.h>
34
--- 24 unchanged lines hidden (view full) ---
59static d_open_t apmopen;
60static d_close_t apmclose;
61static d_write_t apmwrite;
62static d_ioctl_t apmioctl;
63static d_poll_t apmpoll;
64
65#define CDEV_MAJOR 39
66static struct cdevsw apm_cdevsw = {
67 /* open */ apmopen,
68 /* close */ apmclose,
69 /* read */ noread,
70 /* write */ apmwrite,
71 /* ioctl */ apmioctl,
72 /* poll */ apmpoll,
73 /* mmap */ nommap,
74 /* strategy */ nostrategy,
75 /* name */ "apm",
76 /* maj */ CDEV_MAJOR,
77 /* dump */ nodump,
78 /* psize */ nopsize,
79 /* flags */ 0,
80};
81
82static int
83acpi_capm_convert_battstate(struct acpi_battinfo *battp)
84{
85 int state;
86
87 state = 0xff; /* XXX unknown */
--- 261 unchanged lines hidden ---