mirror of
https://github.com/LineageOS/android_kernel_samsung_msm8226.git
synced 2026-09-29 00:00:25 +02:00
Supported different usb functions' has different throughput requirement. USB controller supports streaming mode feature which enables double buffering scheme on both IN and OUT endpoint, and reduces number of NAKs for IN transfer. Hence noticeble throughput is increased with it. Currently streaming mode is disable with USB controller. As supported usb functions'like mtp, rndis are required to have higher throughput. Add support which allows to enable streaming mode with usb controller in device mode when particular function based composition is being enabled. CRs-Fixed: 550553 Change-Id: Ibf6f3dc3f3b821647ba9beb15ed735a85c8ed586 Signed-off-by: Mayank Rana <mrana@codeaurora.org>
53 lines
1.3 KiB
C
53 lines
1.3 KiB
C
/*
|
|
* Platform data for Android USB
|
|
*
|
|
* Copyright (C) 2008 Google, Inc.
|
|
* Author: Mike Lockwood <lockwood@android.com>
|
|
*
|
|
* This software is licensed under the terms of the GNU General Public
|
|
* License version 2, as published by the Free Software Foundation, and
|
|
* may be copied, distributed, and modified under those terms.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
*/
|
|
#ifndef __LINUX_USB_ANDROID_H
|
|
#define __LINUX_USB_ANDROID_H
|
|
|
|
#include <linux/usb/composite.h>
|
|
|
|
#define MAX_STREAMING_FUNCS 3
|
|
#define FUNC_NAME_LEN 10
|
|
struct android_usb_platform_data {
|
|
int (*update_pid_and_serial_num)(uint32_t, const char *);
|
|
u32 swfi_latency;
|
|
u8 usb_core_id;
|
|
bool cdrom;
|
|
bool internal_ums;
|
|
char streaming_func[MAX_STREAMING_FUNCS][FUNC_NAME_LEN];
|
|
int streaming_func_count;
|
|
};
|
|
|
|
#ifndef CONFIG_TARGET_CORE
|
|
static inline int f_tcm_init(int (*connect_cb)(bool connect))
|
|
{
|
|
/*
|
|
* Fail bind() not init(). If a function init() returns error
|
|
* android composite registration would fail.
|
|
*/
|
|
return 0;
|
|
}
|
|
static inline void f_tcm_exit(void)
|
|
{
|
|
}
|
|
static inline int tcm_bind_config(struct usb_configuration *c)
|
|
{
|
|
return -ENODEV;
|
|
}
|
|
#endif
|
|
|
|
#endif /* __LINUX_USB_ANDROID_H */
|