DEV_OPS(9S) | Data Structures for Drivers | DEV_OPS(9S) |
dev_ops - device operations structure
#include <sys/conf.h> #include <sys/devops.h>
illumos DDI specific (illumos DDI).
dev_ops contains driver common fields and pointers to the bus_ops and cb_ops(9S).
Following are the device functions provided in the device operations structure. All fields must be set at compile time.
devo_rev
devo_refcnt
devo_getinfo
devo_identify
devo_probe
devo_attach
devo_detach
devo_reset
devo_cb_ops
devo_bus_ops
devo_power
devo_quiesce
int devo_rev; int devo_refcnt; int (*devo_getinfo)(dev_info_t *dip,
ddi_info_cmd_t infocmd, void *arg, void **result); int (*devo_identify)(dev_info_t *dip); int (*devo_probe)(dev_info_t *dip); int (*devo_attach)(dev_info_t *dip,
ddi_attach_cmd_t cmd); int (*devo_detach)(dev_info_t *dip,
ddi_detach_cmd_t cmd); int (*devo_reset)(dev_info_t *dip, ddi_reset_cmd_t cmd); struct cb_ops *devo_cb_ops; struct bus_ops *devo_bus_ops; int (*devo_power)(dev_info_t *dip, int component, int level); int (*devo_quiesce)(dev_info_t *dip);
attach(9E), detach(9E), getinfo(9E), power(9E), probe(9E), quiesce(9E), nodev(9F)
Writing Device Drivers
September 16, 2008 | OmniOS |