Copyright (c) 2005, Sun Microsystems, Inc. All Rights Reserved.
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
#include <sys/types.h> #include <sys/conf.h> #include <sys/ddi.h> #include <sys/sunddi.h> int ddi_intr_get_cap(ddi_intr_handle_t h, int *flagsp);
int ddi_intr_set_cap(ddi_intr_handle_t h, int flags);
DDI interrupt handle
Pointer to the capability flags returned for this handle
ddi_intr_set_cap() h
DDI interrupt handle
Contains the capability flag to be set
These flags are typically combinations of the following: DDI_INTR_FLAG_EDGE
For discrete interrupts, the host supports edge type of trigger. This flag is not returned for DDI_INTR_TYPE_MSI or DDI_INTR_TYPE_MSIX interrupt types. This is a read-write (RW) flag.
For discrete interrupts the host supports level, edge, or both types of triggers. This flag is not returned for DDI_INTR_TYPE_MSI or DDI_INTR_TYPE_MSIX interrupt types.
The interrupt can be masked either by the device or by the host bridge, or optionally by the host. This is a read-only (RO) flag.
The interrupt supports an interrupt pending bit. This is a read-only (RO) flag.
All interrupts of the given type must be block-enabled and are not individually maskable. This is a read-only (RO) flag.
The ddi_intr_set_cap() function allows a driver to specify the capability flags for the interrupt handle h. Only DDI_INTR_FLAG_LEVEL and DDI_INTR_FLAG_EDGE flags can be set. Some devices can support both level and edge capability and either can be set by using the ddi_intr_set_cap() function. Setting the capability flags is device and platform dependent.
The ddi_intr_set_cap() function can be called after interrupts are allocated and prior to adding the interrupt handler. For all other times it returns failure.
On success.
On encountering invalid input parameters.
On any implementation specific failure.
On device not supporting operation.
ATTRIBUTE TYPE ATTRIBUTE VALUE |
Interface Stability Committed |
Writing Device Drivers