diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2003-02-26 20:22:05 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2003-02-26 20:22:05 +0000 |
commit | 8ea09ddfc16c6e8c45c0c0d397ccbf021a6bc3b3 (patch) | |
tree | a72d3c6867250276bd288f2595e2bdb225359ed5 /sys/dev/hil/hildevs.h | |
parent | 993c4c542af6a9f1a2e97d1b43e65de0a2bd09bd (diff) |
New hil child devices attachment framework, that allow them to be detached
at runtime.
Handle reconfiguration notices from the loop, and do the necessary
detach/attach work so that our vision of the loop is in sync with reality.
Adapt all hil child devices to the above changes.
"This is not as plug'n'play as usb, but you get the same feeling anyways..."
Diffstat (limited to 'sys/dev/hil/hildevs.h')
-rw-r--r-- | sys/dev/hil/hildevs.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/sys/dev/hil/hildevs.h b/sys/dev/hil/hildevs.h index 7ccb01c70d2..c4c93e1c30c 100644 --- a/sys/dev/hil/hildevs.h +++ b/sys/dev/hil/hildevs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: hildevs.h,v 1.2 2003/02/15 23:42:48 miod Exp $ */ +/* $OpenBSD: hildevs.h,v 1.3 2003/02/26 20:22:04 miod Exp $ */ /* * Copyright (c) 2003, Miodrag Vallat. * All rights reserved. @@ -50,3 +50,23 @@ struct hil_attach_args { #define HIL_DEVICE_KEYBOARD 1 #define HIL_DEVICE_IDMODULE 2 #define HIL_DEVICE_MOUSE 3 + +/* Common softc part for hil devices */ +struct hildev_softc { + struct device sc_dev; + + int sc_code; /* hil code */ + int sc_type; /* hil device type */ + + int sc_infolen; /* identify info length */ + u_int8_t sc_info[HILBUFSIZE]; /* identify info bits */ + + void (*sc_fn)(struct hildev_softc *, u_int, u_int8_t *); +}; + +#define hd_code sc_hildev.sc_code +#define hd_fn sc_hildev.sc_fn +#define hd_info sc_hildev.sc_info +#define hd_infolen sc_hildev.sc_infolen +#define hd_parent sc_hildev.sc_dev.dv_parent +#define hd_type sc_hildev.sc_type |