2 * Platform data for Android USB
4 * Copyright (C) 2008 Google, Inc.
5 * Author: Mike Lockwood <lockwood@android.com>
7 * This software is licensed under the terms of the GNU General Public
8 * License version 2, as published by the Free Software Foundation, and
9 * may be copied, distributed, and modified under those terms.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
17 #ifndef __LINUX_USB_ANDROID_H
18 #define __LINUX_USB_ANDROID_H
20 #include <linux/usb/composite.h>
21 #include <linux/if_ether.h>
23 struct android_usb_function {
24 struct list_head list;
26 int (*bind_config)(struct usb_configuration *c);
29 struct android_usb_product {
30 /* Default product ID. */
33 /* List of function names associated with this product.
34 * This is used to compute the USB product ID dynamically
35 * based on which functions are enabled.
41 struct android_usb_platform_data {
42 /* USB device descriptor fields */
45 /* Default product ID. */
51 char *manufacturer_name;
54 /* List of available USB products.
55 * This is used to compute the USB product ID dynamically
56 * based on which functions are enabled.
57 * if num_products is zero or no match can be found,
58 * we use the default product ID
61 struct android_usb_product *products;
63 /* List of all supported USB functions.
64 * This list is used to define the order in which
65 * the functions appear in the configuration's list of USB interfaces.
66 * This is necessary to avoid depending upon the order in which
67 * the individual function drivers are initialized.
73 /* Platform data for "usb_mass_storage" driver. */
74 struct usb_mass_storage_platform_data {
75 /* Contains values for the SC_INQUIRY SCSI command. */
84 /* Platform data for USB ethernet driver. */
85 struct usb_ether_platform_data {
88 const char *vendorDescr;
91 extern void android_usb_set_connected(int on);
93 extern void android_register_function(struct android_usb_function *f);
95 extern void android_enable_function(struct usb_function *f, int enable);
98 #endif /* __LINUX_USB_ANDROID_H */