Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [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 | |
Pavankumar Kondeti | 8f6ca4f | 2012-06-26 09:44:36 +0530 | [diff] [blame] | 20 | #include <linux/usb/composite.h> |
| 21 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 22 | struct android_usb_platform_data { |
| 23 | int (*update_pid_and_serial_num)(uint32_t, const char *); |
Ofir Cohen | 94213a7 | 2012-05-03 14:26:32 +0300 | [diff] [blame] | 24 | u32 swfi_latency; |
Ido Shayevitz | 3987b8d | 2012-06-24 13:27:41 +0300 | [diff] [blame] | 25 | u8 usb_core_id; |
Rajkumar Raghupathy | c9cb205 | 2012-04-26 13:14:10 +0530 | [diff] [blame] | 26 | bool cdrom; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 27 | }; |
| 28 | |
Pavankumar Kondeti | 8f6ca4f | 2012-06-26 09:44:36 +0530 | [diff] [blame] | 29 | #ifndef CONFIG_TARGET_CORE |
| 30 | static inline int f_tcm_init(int (*connect_cb)(bool connect)) |
| 31 | { |
| 32 | /* |
| 33 | * Fail bind() not init(). If a function init() returns error |
| 34 | * android composite registration would fail. |
| 35 | */ |
| 36 | return 0; |
| 37 | } |
| 38 | static inline void f_tcm_exit(void) |
| 39 | { |
| 40 | } |
| 41 | static inline int tcm_bind_config(struct usb_configuration *c) |
| 42 | { |
| 43 | return -ENODEV; |
| 44 | } |
| 45 | #endif |
| 46 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 47 | #endif /* __LINUX_USB_ANDROID_H */ |