blob: e9971f89d36d87c85a50642676aa51f3b50ee1f9 [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;
Matt Mowerb9f66092013-12-11 23:03:55 -060027 int nluns;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070028};
29
Pavankumar Kondeti8f6ca4f2012-06-26 09:44:36 +053030#ifndef CONFIG_TARGET_CORE
31static inline int f_tcm_init(int (*connect_cb)(bool connect))
32{
33 /*
34 * Fail bind() not init(). If a function init() returns error
35 * android composite registration would fail.
36 */
37 return 0;
38}
39static inline void f_tcm_exit(void)
40{
41}
42static inline int tcm_bind_config(struct usb_configuration *c)
43{
44 return -ENODEV;
45}
46#endif
47
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070048#endif /* __LINUX_USB_ANDROID_H */