Lines Matching +full:8 +full:dev

57 #include <dev/usb/usb.h>
58 #include <dev/usb/usbdi.h>
59 #include <dev/usb/usbdi_util.h>
63 #include <dev/usb/usb_core.h>
64 #include <dev/usb/usb_process.h>
65 #include <dev/usb/usb_device.h>
66 #include <dev/usb/usb_request.h>
67 #include <dev/usb/usb_debug.h>
68 #include <dev/usb/usb_hub.h>
69 #include <dev/usb/usb_util.h>
70 #include <dev/usb/usb_busdma.h>
71 #include <dev/usb/usb_transfer.h>
72 #include <dev/usb/usb_dynamic.h>
74 #include <dev/usb/usb_controller.h>
75 #include <dev/usb/usb_bus.h>
77 #include <dev/usb/usb_hub_private.h>
78 #include <contrib/dev/acpica/include/acpi.h>
79 #include <contrib/dev/acpica/include/accommon.h>
80 #include <dev/acpica/acpivar.h>
138 acpi_uhub_parse_upc(device_t dev, unsigned p, ACPI_HANDLE ah, struct sysctl_oid_list *poid) in acpi_uhub_parse_upc() argument
141 struct acpi_uhub_softc *sc = device_get_softc(dev); in acpi_uhub_parse_upc()
160 device_printf(dev, "Port %u %sconnectable %s\n", in acpi_uhub_parse_upc()
165 device_get_sysctl_ctx(dev), in acpi_uhub_parse_upc()
202 port->pld[4] | (port->pld[5] << 8), in acpi_uhub_port_sysctl()
203 port->pld[6] | (port->pld[7] << 8)); in acpi_uhub_port_sysctl()
204 if (port->pld[8] & 1) { in acpi_uhub_port_sysctl()
207 if (port->pld[8] & 2) { in acpi_uhub_port_sysctl()
210 if (port->pld[8] & 4) { in acpi_uhub_port_sysctl()
213 int panelpos = (port->pld[8] >> 3) & 7; in acpi_uhub_port_sysctl()
229 posstr[(port->pld[8] >> 6) & 3]); in acpi_uhub_port_sysctl()
253 port->pld[16] | (port->pld[17] << 8), in acpi_uhub_port_sysctl()
254 port->pld[18] | (port->pld[19] << 8)); in acpi_uhub_port_sysctl()
264 acpi_uhub_parse_pld(device_t dev, unsigned p, ACPI_HANDLE ah, struct sysctl_oid_list *tree) in acpi_uhub_parse_pld() argument
267 struct acpi_uhub_softc *sc = device_get_softc(dev); in acpi_uhub_parse_pld()
296 device_get_sysctl_ctx(dev), tree, OID_AUTO, in acpi_uhub_parse_pld()
301 device_printf(dev, "Revision:%d\n", in acpi_uhub_parse_pld()
304 device_printf(dev, in acpi_uhub_parse_pld()
309 device_printf(dev, "Width %d mm Height %d mm\n", in acpi_uhub_parse_pld()
310 resbuf[4] | (resbuf[5] << 8), in acpi_uhub_parse_pld()
311 resbuf[6] | (resbuf[7] << 8)); in acpi_uhub_parse_pld()
312 if (resbuf[8] & 1) { in acpi_uhub_parse_pld()
313 device_printf(dev, "Visible\n"); in acpi_uhub_parse_pld()
315 if (resbuf[8] & 2) { in acpi_uhub_parse_pld()
316 device_printf(dev, "Dock\n"); in acpi_uhub_parse_pld()
318 if (resbuf[8] & 4) { in acpi_uhub_parse_pld()
319 device_printf(dev, "Lid\n"); in acpi_uhub_parse_pld()
321 device_printf(dev, "PanelPosition: %d\n", in acpi_uhub_parse_pld()
322 (resbuf[8] >> 3) & 7); in acpi_uhub_parse_pld()
323 device_printf(dev, "VertPosition: %d\n", in acpi_uhub_parse_pld()
324 (resbuf[8] >> 6) & 3); in acpi_uhub_parse_pld()
325 device_printf(dev, "HorizPosition: %d\n", in acpi_uhub_parse_pld()
327 device_printf(dev, "Shape: %d\n", in acpi_uhub_parse_pld()
329 device_printf(dev, "80: %02x, %02x, %02x\n", in acpi_uhub_parse_pld()
331 device_printf(dev, "96: %02x, %02x, %02x, %02x\n", in acpi_uhub_parse_pld()
336 device_printf(dev, "VOFF%d mm HOFF %dmm", in acpi_uhub_parse_pld()
337 resbuf[16] | (resbuf[17] << 8), in acpi_uhub_parse_pld()
338 resbuf[18] | (resbuf[19] << 8)); in acpi_uhub_parse_pld()
348 acpi_uhub_find_rh(device_t dev, ACPI_HANDLE *ah) in acpi_uhub_find_rh() argument
354 grand = device_get_parent(device_get_parent(dev)); in acpi_uhub_find_rh()
360 acpi_uhub_find_rh_cb, NULL, dev, ah)); in acpi_uhub_find_rh()
367 device_t dev = ctx; in acpi_usb_hub_port_probe_cb() local
368 struct acpi_uhub_softc *sc = device_get_softc(dev); in acpi_usb_hub_port_probe_cb()
377 struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(dev); in acpi_usb_hub_port_probe_cb()
384 SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), in acpi_usb_hub_port_probe_cb()
390 acpi_uhub_parse_upc(dev, devinfo->Address, ah, tree); in acpi_usb_hub_port_probe_cb()
391 acpi_uhub_parse_pld(dev, devinfo->Address, ah, tree); in acpi_usb_hub_port_probe_cb()
392 SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), tree, in acpi_usb_hub_port_probe_cb()
404 acpi_usb_hub_port_probe(device_t dev, ACPI_HANDLE ah) in acpi_usb_hub_port_probe() argument
409 NULL, dev, NULL)); in acpi_usb_hub_port_probe()
413 acpi_uhub_root_probe(device_t dev) in acpi_uhub_root_probe() argument
421 status = acpi_uhub_find_rh(dev, &ah); in acpi_uhub_root_probe()
423 uhub_probe(dev) <= 0) { in acpi_uhub_root_probe()
431 acpi_uhub_probe(device_t dev) in acpi_uhub_probe() argument
438 ah = acpi_get_handle(dev); in acpi_uhub_probe()
442 if (uhub_probe(dev) <= 0) { in acpi_uhub_probe()
449 acpi_uhub_attach_common(device_t dev) in acpi_uhub_attach_common() argument
452 struct acpi_uhub_softc *sc = device_get_softc(dev); in acpi_uhub_attach_common()
460 status = acpi_usb_hub_port_probe(dev, sc->ah); in acpi_uhub_attach_common()
470 acpi_uhub_detach(device_t dev) in acpi_uhub_detach() argument
472 struct acpi_uhub_softc *sc = device_get_softc(dev); in acpi_uhub_detach()
476 return (uhub_detach(dev)); in acpi_uhub_detach()
480 acpi_uhub_root_attach(device_t dev) in acpi_uhub_root_attach() argument
483 struct acpi_uhub_softc *sc = device_get_softc(dev); in acpi_uhub_root_attach()
485 if (ACPI_FAILURE(acpi_uhub_find_rh(dev, &sc->ah)) || in acpi_uhub_root_attach()
489 if ((ret = uhub_attach(dev)) != 0) { in acpi_uhub_root_attach()
493 if ((ret = acpi_uhub_attach_common(dev)) != 0) { in acpi_uhub_root_attach()
494 acpi_uhub_detach(dev); in acpi_uhub_root_attach()
500 acpi_uhub_attach(device_t dev) in acpi_uhub_attach() argument
503 struct acpi_uhub_softc *sc = device_get_softc(dev); in acpi_uhub_attach()
505 sc->ah = acpi_get_handle(dev); in acpi_uhub_attach()
510 if ((ret = uhub_attach(dev)) != 0) { in acpi_uhub_attach()
514 if ((ret = acpi_uhub_attach_common(dev)) != 0) { in acpi_uhub_attach()
515 acpi_uhub_detach(dev); in acpi_uhub_attach()
522 acpi_uhub_read_ivar(device_t dev, device_t child, int idx, uintptr_t *res) in acpi_uhub_read_ivar() argument
525 struct acpi_uhub_softc *sc = device_get_softc(dev); in acpi_uhub_read_ivar()