2 * Copyright (C) 2005-2007 Takahiro Hirofuchi
5 #ifndef __VHCI_DRIVER_H
6 #define __VHCI_DRIVER_H
8 #include <sysfs/libsysfs.h>
11 #include "usbip_common.h"
13 #define USBIP_VHCI_BUS_TYPE "platform"
16 struct usbip_class_device
{
17 char class_path
[SYSFS_PATH_MAX
];
18 char dev_path
[SYSFS_PATH_MAX
];
21 struct usbip_imported_device
{
30 /* usbip_class_device list */
31 struct dlist
*cdev_list
;
32 struct usbip_usb_device udev
;
35 struct usbip_vhci_driver
{
36 char sysfs_mntpath
[SYSFS_PATH_MAX
];
38 /* /sys/devices/platform/vhci_hcd */
39 struct sysfs_device
*hc_device
;
41 /* usbip_class_device list */
42 struct dlist
*cdev_list
;
45 struct usbip_imported_device idev
[MAXNPORT
];
49 extern struct usbip_vhci_driver
*vhci_driver
;
51 int usbip_vhci_driver_open(void);
52 void usbip_vhci_driver_close(void);
54 int usbip_vhci_refresh_device_list(void);
57 int usbip_vhci_get_free_port(void);
58 int usbip_vhci_attach_device2(uint8_t port
, int sockfd
, uint32_t devid
,
62 int usbip_vhci_attach_device(uint8_t port
, int sockfd
, uint8_t busnum
,
63 uint8_t devnum
, uint32_t speed
);
65 int usbip_vhci_detach_device(uint8_t port
);
67 #endif /* __VHCI_DRIVER_H */