version 1.80.2.3, 2010/03/11 15:04:06 |
version 1.81, 2008/04/28 20:23:59 |
Line 123 Static int uhid_do_ioctl(struct uhid_sof |
|
Line 123 Static int uhid_do_ioctl(struct uhid_sof |
|
USB_DECLARE_DRIVER(uhid); |
USB_DECLARE_DRIVER(uhid); |
|
|
int |
int |
uhid_match(device_t parent, cfdata_t match, void *aux) |
uhid_match(struct device *parent, struct cfdata *match, |
|
void *aux) |
{ |
{ |
#ifdef UHID_DEBUG |
#ifdef UHID_DEBUG |
struct uhidev_attach_arg *uha = aux; |
struct uhidev_attach_arg *uha = aux; |
Line 138 uhid_match(device_t parent, cfdata_t mat |
|
Line 139 uhid_match(device_t parent, cfdata_t mat |
|
} |
} |
|
|
void |
void |
uhid_attach(device_t parent, device_t self, void *aux) |
uhid_attach(struct device *parent, struct device *self, void *aux) |
{ |
{ |
struct uhid_softc *sc = device_private(self); |
struct uhid_softc *sc = (struct uhid_softc *)self; |
struct uhidev_attach_arg *uha = aux; |
struct uhidev_attach_arg *uha = aux; |
int size, repid; |
int size, repid; |
void *desc; |
void *desc; |
|
|
sc->sc_hdev.sc_dev = self; |
|
selinit(&sc->sc_rsel); |
selinit(&sc->sc_rsel); |
sc->sc_hdev.sc_intr = uhid_intr; |
sc->sc_hdev.sc_intr = uhid_intr; |
sc->sc_hdev.sc_parent = uha->parent; |
sc->sc_hdev.sc_parent = uha->parent; |
Line 159 uhid_attach(device_t parent, device_t se |
|
Line 159 uhid_attach(device_t parent, device_t se |
|
sc->sc_osize = hid_report_size(desc, size, hid_output, repid); |
sc->sc_osize = hid_report_size(desc, size, hid_output, repid); |
sc->sc_fsize = hid_report_size(desc, size, hid_feature, repid); |
sc->sc_fsize = hid_report_size(desc, size, hid_feature, repid); |
|
|
aprint_naive("\n"); |
printf(": input=%d, output=%d, feature=%d\n", |
aprint_normal(": input=%d, output=%d, feature=%d\n", |
|
sc->sc_isize, sc->sc_osize, sc->sc_fsize); |
sc->sc_isize, sc->sc_osize, sc->sc_fsize); |
|
|
if (!pmf_device_register(self, NULL, NULL)) |
if (!pmf_device_register(self, NULL, NULL)) |
Line 172 uhid_attach(device_t parent, device_t se |
|
Line 171 uhid_attach(device_t parent, device_t se |
|
int |
int |
uhid_activate(device_ptr_t self, enum devact act) |
uhid_activate(device_ptr_t self, enum devact act) |
{ |
{ |
struct uhid_softc *sc = device_private(self); |
struct uhid_softc *sc = (struct uhid_softc *)self; |
|
|
switch (act) { |
switch (act) { |
|
case DVACT_ACTIVATE: |
|
return (EOPNOTSUPP); |
|
|
case DVACT_DEACTIVATE: |
case DVACT_DEACTIVATE: |
sc->sc_dying = 1; |
sc->sc_dying = 1; |
return 0; |
break; |
default: |
|
return EOPNOTSUPP; |
|
} |
} |
|
return (0); |
} |
} |
|
|
int |
int |
uhid_detach(device_t self, int flags) |
uhid_detach(struct device *self, int flags) |
{ |
{ |
struct uhid_softc *sc = device_private(self); |
struct uhid_softc *sc = (struct uhid_softc *)self; |
int s; |
int s; |
int maj, mn; |
int maj, mn; |
|
|