/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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
* 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]
*
* CDDL HEADER END
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_PSHOT_H
#define _SYS_PSHOT_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* user accessable features
*/
/* determines max pshot_minor allocation per softstate */
#ifdef _KERNEL
static int pshot_debug = 0;
static int pshot_event_test_enable = 0;
#ifdef DEBUG
static int pshot_debug_on = 0;
static int pshot_event_test_on = 0;
#endif
/*
* soft state and minor node management
* (includes user features above)
*/
/*
* a "node number" is currently implemented as an index into a pshot_minor_t
* array, therefore the max must be less than PSHOT_MAX_MINOR_PERINST and
* ideally, the minor array should be fully populated, with a node number
* defined for each index
*/
#define PSHOT_NODENUM_DEVCTL 0
struct pshot_minor {
};
struct pshot {
int instance;
};
static int pshot_minor_decode_inst(minor_t);
/*
* children device configuration
*/
typedef struct pshot_device {
char *name;
char *nodetype;
char *compat;
static char *pshot_str2nt(char *);
static int pshot_devices_setup(dev_info_t *);
const pshot_device_t *, size_t);
/*
* softstate state bits
*/
/*
* Leaf ops (supports hotplug controls to the device)
*/
static int pshot_probe(dev_info_t *);
int *);
int *);
/*
* Event handling prototype support.
*/
/* for hash sanity check */
#define PSHOT_EVENT_TAG_OFFLINE 0
typedef struct pshot_event_callback {
int (*callback)();
void *arg;
void *arg, void *bus_impldata);
void *bus_impldata);
#ifdef DEBUG
void *arg, void *bus_impldata);
static void pshot_event_test(void *arg);
static void pshot_event_test_post_one(void *arg);
#endif
/* event busops */
/* function prototypes */
ddi_bus_config_op_t, void *, dev_info_t **);
ddi_bus_config_op_t, void *);
ddi_intr_handle_impl_t *, void *);
static void pshot_setup_autoattach(dev_info_t *);
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_PSHOT_H */