Nicholas Flintham | 1e3d311 | 2013-04-10 10:48:38 +0100 | [diff] [blame^] | 1 | /* |
| 2 | * Platform data for Android USB |
| 3 | * |
| 4 | * Copyright (C) 2008 Google, Inc. |
| 5 | * Author: Mike Lockwood <lockwood@android.com> |
| 6 | * |
| 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. |
| 10 | * |
| 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. |
| 15 | * |
| 16 | */ |
| 17 | #ifndef __LINUX_USB_ANDROID_H |
| 18 | #define __LINUX_USB_ANDROID_H |
| 19 | |
| 20 | #include <linux/usb/composite.h> |
| 21 | #include <linux/if_ether.h> |
| 22 | |
| 23 | #if 0 |
| 24 | struct android_usb_function { |
| 25 | struct list_head list; |
| 26 | char *name; |
| 27 | int (*bind_config)(struct usb_configuration *c); |
| 28 | }; |
| 29 | #endif |
| 30 | struct android_usb_product { |
| 31 | __u16 vendor_id; |
| 32 | |
| 33 | |
| 34 | __u16 product_id; |
| 35 | |
| 36 | int num_functions; |
| 37 | char **functions; |
| 38 | }; |
| 39 | |
| 40 | struct android_usb_platform_data { |
| 41 | |
| 42 | __u16 vendor_id; |
| 43 | |
| 44 | |
| 45 | __u16 product_id; |
| 46 | |
| 47 | __u16 version; |
| 48 | |
| 49 | char *product_name; |
| 50 | char *manufacturer_name; |
| 51 | char *serial_number; |
| 52 | |
| 53 | int num_products; |
| 54 | struct android_usb_product *products; |
| 55 | |
| 56 | int num_functions; |
| 57 | char **functions; |
| 58 | |
| 59 | void (*enable_fast_charge)(bool enable); |
| 60 | bool RndisDisableMPDecision; |
| 61 | |
| 62 | int usb_id_pin_gpio; |
| 63 | |
| 64 | int (*update_pid_and_serial_num)(uint32_t, const char *); |
| 65 | |
| 66 | char *fserial_init_string; |
| 67 | |
| 68 | char *usb_rmnet_interface; |
| 69 | char *usb_diag_interface; |
| 70 | |
| 71 | unsigned char diag_init:1; |
| 72 | unsigned char modem_init:1; |
| 73 | unsigned char rmnet_init:1; |
| 74 | unsigned char reserved:5; |
| 75 | |
| 76 | |
| 77 | |
| 78 | |
| 79 | int nluns; |
| 80 | int cdrom_lun; |
| 81 | int cdrom_cttype; |
| 82 | u32 swfi_latency; |
| 83 | int (*match)(int product_id, int intrsharing); |
| 84 | u8 usb_core_id; |
| 85 | int adb_perf_lock_on; |
| 86 | int mtp_perf_lock_on; |
| 87 | }; |
| 88 | |
| 89 | struct usb_mass_storage_platform_data { |
| 90 | |
| 91 | char *vendor; |
| 92 | char *product; |
| 93 | int release; |
| 94 | |
| 95 | char can_stall; |
| 96 | |
| 97 | int nluns; |
| 98 | }; |
| 99 | |
| 100 | struct usb_ether_platform_data { |
| 101 | u8 ethaddr[ETH_ALEN]; |
| 102 | u32 vendorID; |
| 103 | const char *vendorDescr; |
| 104 | }; |
| 105 | int htc_usb_enable_function(char *name, int ebl); |
| 106 | #if 0 |
| 107 | extern void android_register_function(struct android_usb_function *f); |
| 108 | |
| 109 | extern int android_enable_function(struct usb_function *f, int enable); |
| 110 | #endif |
| 111 | |
| 112 | #endif |