1139790Simp#-
247398Sdfr# Copyright (c) 1999 Doug Rabson
347398Sdfr# All rights reserved.
447398Sdfr#
547398Sdfr# Redistribution and use in source and binary forms, with or without
647398Sdfr# modification, are permitted provided that the following conditions
747398Sdfr# are met:
847398Sdfr# 1. Redistributions of source code must retain the above copyright
947398Sdfr#    notice, this list of conditions and the following disclaimer.
1047398Sdfr# 2. Redistributions in binary form must reproduce the above copyright
1147398Sdfr#    notice, this list of conditions and the following disclaimer in the
1247398Sdfr#    documentation and/or other materials provided with the distribution.
1347398Sdfr#
1447398Sdfr# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1547398Sdfr# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1647398Sdfr# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1747398Sdfr# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1847398Sdfr# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1947398Sdfr# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2047398Sdfr# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2147398Sdfr# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2247398Sdfr# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2347398Sdfr# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2447398Sdfr# SUCH DAMAGE.
2547398Sdfr#
2650477Speter# $FreeBSD$
2747398Sdfr#
2847398Sdfr
2959093Sdfr#include <sys/bus.h>
3050769Sdfr#include <isa/isavar.h>
3150769Sdfr
3247398SdfrINTERFACE isa;
3347398Sdfr
3447398Sdfr#
3550769Sdfr# Add a Plug-and-play configuration to the device. Configurations with 
3650769Sdfr# a lower priority are preferred.
3750769Sdfr#
3850769SdfrMETHOD int add_config {
3950769Sdfr	device_t	dev;
4050769Sdfr	device_t	child;
4150769Sdfr	int		priority;
4250769Sdfr	struct isa_config *config;
4350769Sdfr};
4450769Sdfr
4550769Sdfr#
4650769Sdfr# Register a function which can be called to configure a device with
4750769Sdfr# a given set of resources. The function will be called with a struct
4850769Sdfr# isa_config representing the desired configuration and a flag to
4950769Sdfr# state whether the device should be enabled.
5050769Sdfr#
5150769SdfrMETHOD void set_config_callback {
5250769Sdfr	device_t	dev;
5350769Sdfr	device_t	child;
5450769Sdfr	isa_config_cb	*fn;
5550769Sdfr	void		*arg;
5650769Sdfr};
5750769Sdfr
5850769Sdfr#
5950769Sdfr# A helper method for implementing probe methods for PnP compatible
6050769Sdfr# drivers. The driver calls this method with a list of PnP ids and
6150769Sdfr# descriptions and it returns zero if one of the ids matches or ENXIO
6250769Sdfr# otherwise.
6350769Sdfr# 
6450769Sdfr# If the device is not plug-and-play compatible, this method returns
6550769Sdfr# ENOENT, allowing the caller to fall back to heuristic probing
6650769Sdfr# techniques.
6750769Sdfr#  
6850769SdfrMETHOD int pnp_probe {
6950769Sdfr	device_t	dev;
7050769Sdfr	device_t	child;
7150769Sdfr	struct isa_pnp_id *ids;
7250769Sdfr};
73