acpi_if.m revision 131276
1131276Snjl#
2131276Snjl# Copyright (c) 2004 Nate Lawson
3131276Snjl# All rights reserved.
4131276Snjl#
5131276Snjl# Redistribution and use in source and binary forms, with or without
6131276Snjl# modification, are permitted provided that the following conditions
7131276Snjl# are met:
8131276Snjl# 1. Redistributions of source code must retain the above copyright
9131276Snjl#    notice, this list of conditions and the following disclaimer.
10131276Snjl# 2. Redistributions in binary form must reproduce the above copyright
11131276Snjl#    notice, this list of conditions and the following disclaimer in the
12131276Snjl#    documentation and/or other materials provided with the distribution.
13131276Snjl#
14131276Snjl# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15131276Snjl# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16131276Snjl# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17131276Snjl# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18131276Snjl# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19131276Snjl# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20131276Snjl# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21131276Snjl# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22131276Snjl# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23131276Snjl# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24131276Snjl# SUCH DAMAGE.
25131276Snjl#
26131276Snjl# $FreeBSD: head/sys/dev/acpica/acpi_if.m 131276 2004-06-29 18:56:14Z njl $
27131276Snjl#
28131276Snjl
29131276Snjl#include <sys/bus.h>
30131276Snjl#include <sys/types.h>
31131276Snjl#include "acpi.h"
32131276Snjl
33131276SnjlINTERFACE acpi;
34131276Snjl
35131276Snjl#
36131276Snjl# Default implementation for the probe method.
37131276Snjl#
38131276SnjlCODE {
39131276Snjl	static char *
40131276Snjl	acpi_generic_id_probe(device_t bus, device_t dev, char **ids)
41131276Snjl	{
42131276Snjl		return (NULL);
43131276Snjl	}
44131276Snjl};
45131276Snjl
46131276Snjl#
47131276Snjl# Probe
48131276Snjl#
49131276SnjlMETHOD char * id_probe {
50131276Snjl	device_t	bus;
51131276Snjl	device_t	dev;
52131276Snjl	char		**ids;
53131276Snjl} DEFAULT acpi_generic_id_probe;
54131276Snjl
55131276Snjl#
56131276Snjl# AcpiEvaluateObject
57131276Snjl#
58131276SnjlMETHOD ACPI_STATUS evaluate_object {
59131276Snjl	device_t	bus;
60131276Snjl	device_t	dev;
61131276Snjl	ACPI_STRING 	pathname;
62131276Snjl	ACPI_OBJECT_LIST *parameters;
63131276Snjl	ACPI_BUFFER	*ret;
64131276Snjl};
65131276Snjl
66131276Snjl#
67131276Snjl# AcpiWalkNamespace
68131276Snjl#
69131276SnjlMETHOD ACPI_STATUS walk_namespace {
70131276Snjl	device_t	bus;
71131276Snjl	device_t	dev;
72131276Snjl	ACPI_OBJECT_TYPE type;
73131276Snjl	UINT32		max_depth;
74131276Snjl	ACPI_WALK_CALLBACK user_fn;
75131276Snjl	void		*context;
76131276Snjl	void		**ret;
77131276Snjl};
78