blob: 0b11fdaf96c0426685320307b726db6e2453f164 [file] [log] [blame]
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001/*
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 Kondeti8f6ca4f2012-06-26 09:44:36 +053020#include <linux/usb/composite.h>
21
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070022struct android_usb_platform_data {
23 int (*update_pid_and_serial_num)(uint32_t, const char *);
Ofir Cohen94213a72012-05-03 14:26:32 +030024 u32 swfi_latency;
Ido Shayevitz3987b8d2012-06-24 13:27:41 +030025 u8 usb_core_id;
Rajkumar Raghupathyc9cb2052012-04-26 13:14:10 +053026 bool cdrom;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070027};
28
Pavankumar Kondeti8f6ca4f2012-06-26 09:44:36 +053029#ifndef CONFIG_TARGET_CORE
30static 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}
38static inline void f_tcm_exit(void)
39{
40}
41static inline int tcm_bind_config(struct usb_configuration *c)
42{
43 return -ENODEV;
44}
45#endif
46
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070047#endif /* __LINUX_USB_ANDROID_H */