10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 54844Slg150142 * Common Development and Distribution License (the "License"). 64844Slg150142 * You may not use this file except in compliance with the License. 70Sstevel@tonic-gate * 80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate * See the License for the specific language governing permissions 110Sstevel@tonic-gate * and limitations under the License. 120Sstevel@tonic-gate * 130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate * 190Sstevel@tonic-gate * CDDL HEADER END 200Sstevel@tonic-gate */ 210Sstevel@tonic-gate /* 227492SZhigang.Lu@Sun.COM * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 230Sstevel@tonic-gate * Use is subject to license terms. 240Sstevel@tonic-gate */ 250Sstevel@tonic-gate 260Sstevel@tonic-gate #ifndef _SYS_USB_HUBDI_H 270Sstevel@tonic-gate #define _SYS_USB_HUBDI_H 280Sstevel@tonic-gate 290Sstevel@tonic-gate 300Sstevel@tonic-gate #ifdef __cplusplus 310Sstevel@tonic-gate extern "C" { 320Sstevel@tonic-gate #endif 330Sstevel@tonic-gate 341001Ssl147100 #include <sys/usb/usba/usba_types.h> 351001Ssl147100 360Sstevel@tonic-gate /* USBA calls these: */ 370Sstevel@tonic-gate void usba_hubdi_initialization(); 380Sstevel@tonic-gate void usba_hubdi_destruction(); 390Sstevel@tonic-gate 400Sstevel@tonic-gate #define HUBDI_OPS_VERSION_0 0 410Sstevel@tonic-gate #define HUBD_IS_ROOT_HUB 0x1000 420Sstevel@tonic-gate 430Sstevel@tonic-gate 440Sstevel@tonic-gate int usba_hubdi_open(dev_info_t *, dev_t *, int, int, cred_t *); 450Sstevel@tonic-gate int usba_hubdi_close(dev_info_t *, dev_t, int, int, cred_t *); 460Sstevel@tonic-gate int usba_hubdi_ioctl(dev_info_t *, dev_t, int, intptr_t, int, 470Sstevel@tonic-gate cred_t *, int *); 480Sstevel@tonic-gate 490Sstevel@tonic-gate extern struct bus_ops usba_hubdi_busops; 500Sstevel@tonic-gate 510Sstevel@tonic-gate /* 520Sstevel@tonic-gate * autoconfiguration data and routines. 530Sstevel@tonic-gate */ 540Sstevel@tonic-gate int usba_hubdi_info(dev_info_t *, ddi_info_cmd_t, void *, void **); 550Sstevel@tonic-gate int usba_hubdi_attach(dev_info_t *, ddi_attach_cmd_t); 560Sstevel@tonic-gate int usba_hubdi_probe(dev_info_t *); 570Sstevel@tonic-gate int usba_hubdi_detach(dev_info_t *, ddi_detach_cmd_t); 58*7656SSherry.Moore@Sun.COM int usba_hubdi_quiesce(dev_info_t *); 590Sstevel@tonic-gate 600Sstevel@tonic-gate int usba_hubdi_bind_root_hub(dev_info_t *, uchar_t *, size_t, 610Sstevel@tonic-gate usb_dev_descr_t *); 620Sstevel@tonic-gate int usba_hubdi_unbind_root_hub(dev_info_t *); 630Sstevel@tonic-gate 644844Slg150142 int usba_hubdi_reset_device(dev_info_t *, usb_dev_reset_lvl_t); 651001Ssl147100 /* power budget control routines */ 661001Ssl147100 void usba_hubdi_incr_power_budget(dev_info_t *, usba_device_t *); 671001Ssl147100 void usba_hubdi_decr_power_budget(dev_info_t *, usba_device_t *); 681001Ssl147100 int usba_hubdi_check_power_budget(dev_info_t *, usba_device_t *, uint_t); 691001Ssl147100 700Sstevel@tonic-gate #ifdef __cplusplus 710Sstevel@tonic-gate } 720Sstevel@tonic-gate #endif 730Sstevel@tonic-gate 740Sstevel@tonic-gate #endif /* _SYS_USB_HUBDI_H */ 75