1 /*****************************************************************************/
4 * devtree.h -- USB device tree.
6 * Copyright (C) 1999 Thomas Sailer, sailer@ife.ee.ethz.ch
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 * Please note that the GPL allows you to use the driver, NOT the radio.
23 * In order to use the radio, you need a license from the communications
24 * authority of your country.
28 /*****************************************************************************/
33 /* ---------------------------------------------------------------------- */
41 /* ---------------------------------------------------------------------- */
43 #define USBFLG_DELETED 1
46 /* ---------------------------------------------------------------------- */
49 struct list_head list;
50 struct list_head childlist;
57 struct list_head list;
58 struct list_head childlist;
61 struct usbbusnode *bus;
62 struct usbdevnode *parent;
65 unsigned int vendorid;
66 unsigned int productid;
69 extern struct list_head usbbuslist;
71 /* ---------------------------------------------------------------------- */
73 extern void devtree_markdeleted(void);
74 extern struct usbbusnode *devtree_findbus(unsigned int busn);
75 extern struct usbdevnode *devtree_finddevice(struct usbbusnode *bus, unsigned int devn);
76 extern void devtree_parsedevfile(int fd);
77 extern void devtree_busconnect(struct usbbusnode *bus);
78 extern void devtree_busdisconnect(struct usbbusnode *bus);
79 extern void devtree_devconnect(struct usbdevnode *dev);
80 extern void devtree_devdisconnect(struct usbdevnode *dev);
81 extern void devtree_processchanges(void);
82 extern void devtree_dump(void);
84 extern int lprintf(unsigned int vl, const char *format, ...) __attribute__ ((format (printf, 2, 3)));
86 /* ---------------------------------------------------------------------- */
87 #endif /* _DEVTREE_H */