资源简介
usb otg 调试 patch,对于调试 otg 非常有用。

代码片段和文件信息
/*
* adk-skeleton.c : kernel module to initialize linux machine as android accessory
* and also talk to accessory interface using bulk transfer
*
* Skeleton code for ADK Host driver based on drivers/usb/usb-skeleton.c of
* kernel source v2.6.3 or higher by Greg Kroah-Hartman (greg@kroah.com) and
* https://github.com/gibsson/linux-adk by Gary Bisson
*
* Copyright (C) 2014 - Rajesh Sola
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License or
* (at your option) any later version.
*
* 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.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not see
*/
#include
#include
#include “adk-common.h“
#include
//#include “adk-init.h“
int my_device_vid=0x22b8;//0x04e8;
int my_device_pid=0x2e76;//0x6865;
int init_on_probe=0; //initialize device within probe only if this value is true
//otherwise one need to go for ioctl later
module_param(my_device_vidintS_IRUGO);
module_param(my_device_pidintS_IRUGO);
module_param(init_on_probeintS_IRUGO);
#ifdef CONFIG_USB_AUTOlink
static char aoa_device_name[16] = “aoa-autolink%d“;
#else
static char aoa_device_name[16] = “aoa-skel%d“;
#endif
module_param_string(aoa_device_name aoa_device_name sizeof(aoa_device_name) 0644);
int aoa_read_req_num = 5;
module_param(aoa_read_req_num int 0644);
static struct usb_driver adk_aoa_driver;
/* table of devices that work with this driver */
static struct usb_device_id adk_aoa_table[] = {
{ USB_DEVICE(MY_DEV_VENDOR_ID MY_DEV_PRODUCT_ID) } //replaced by module params
{ USB_DEVICE(CUSTOM_VENDOR_ID CUSTOM_PRODUCT_ID) }
{ USB_DEVICE(AOA_ACCESSORY_VID AOA_ACCESSORY_PID) }
{ USB_DEVICE(AOA_ACCESSORY_VID AOA_ACCESSORY_ADB_PID) }
{ USB_DEVICE(AOA_ACCESSORY_VID AOA_AUDIO_PID) }
{ USB_DEVICE(AOA_ACCESSORY_VID AOA_AUDIO_ADB_PID) }
{ USB_DEVICE(AOA_ACCESSORY_VID AOA_ACCESSORY_AUDIO_PID) }
{ USB_DEVICE(AOA_ACCESSORY_VID AOA_ACCESSORY_AUDIO_ADB_PID) }
{ } /*Terminating entry*/
};
MODULE_DEVICE_TABLE(usb adk_aoa_table);
static void adk_aoa_delete(struct kref *kref)
{
struct usb_adk_aoa *dev = to_adk_aoa_dev(kref);
usb_put_dev(dev->udev);
if(dev->bulk_in_buffer)
kfree(dev->bulk_in_buffer);
kfree(dev->rdbuf.buf);
kfree(dev);
dev = NULL;
}
int adk_aoa_open(struct inode *inode struct file *file)
{
struct usb_adk_aoa *dev;
struct usb_interface *interface;
int subminor;
int retval = 0;
subminor = iminor(inode)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 28732 2018-11-01 10:36 628_test_patch\628_b_otg
文件 57720 2018-10-29 08:22 628_test_patch\628_kernel_dev_bulk_iso
文件 5369 2018-10-29 10:47 628_test_patch\628_otg
文件 24172 2018-10-31 17:47 628_test_patch\628_otg1
文件 368 1980-01-01 00:00 628_test_patch\628_usb.sh
文件 15281 2018-10-18 13:45 628_test_patch\adk-common.c
文件 8818 2018-10-18 13:45 628_test_patch\aoa-skeleton.c
文件 12062 2018-10-19 19:19 628_test_patch\aoa_debug
文件 5114 2018-10-19 18:58 628_test_patch\cp_debu
文件 7074 2018-10-26 09:53 628_test_patch\ctrl_in_out
文件 19998 2018-10-26 18:43 628_test_patch\ehci_usb.c
文件 222271 2018-10-15 19:03 628_test_patch\ga.diff
文件 11236 2018-10-25 10:13 628_test_patch\group.c
文件 3206 2018-10-11 08:42 628_test_patch\kernel_host.differ
文件 21632 2018-10-22 11:53 628_test_patch\kernel_mouse
文件 21255 2018-10-22 19:18 628_test_patch\kernel_mouse1
文件 123407 2018-10-15 17:56 628_test_patch\kernel_op1
文件 10339 2018-10-16 10:06 628_test_patch\kernel_op2
文件 5725 2018-10-18 19:41 628_test_patch\kernel_op3
文件 4320 2018-10-23 15:49 628_test_patch\kernel_uvc
文件 1685 2018-10-15 19:06 628_test_patch\Makefile
文件 2360 2018-10-20 17:49 628_test_patch\master_commit.txt
文件 8572 2018-10-18 11:44 628_test_patch\master_debug
文件 19896 2018-10-20 12:32 628_test_patch\master_debug1
文件 18917 2018-10-20 14:11 628_test_patch\master_debug2
文件 19272 2018-10-20 15:38 628_test_patch\master_debug3
文件 4446 2018-10-20 17:48 628_test_patch\master_debug4
文件 2865 2018-10-24 17:39 628_test_patch\master_dev
文件 7373 2018-11-01 10:47 628_test_patch\master_dev_test
文件 9750 2018-10-22 10:38 628_test_patch\master_mouse
............此处省略21个文件信息
- 上一篇:IBM DS3512图解完整版
- 下一篇:zw_NMEA_Worker.zip
相关资源
- Modbus协议官方文档中、英文全
- SpringBoot+H2+mybatis-plus59130
- 易语言OTG串口通信
- Omron ETN21模块进行modbustcp通讯
- 联想H61主板BIOS升级F9KT58AUS支持22NM.i
- usb hid调试工具
- HID调试助手
- USB.Over.Network.Server 注册机
- Quartus II 15.0中仿真Altera三速以太网I
- Quartus II 15.0中仿真Altera三速以太网I
- ASUS BIOS 加NVME协议文件: Nvme.ffs NV
- WPF USB 网络 串口 通信软件
- 51单片机PWM程序,占空比、周期可调整
- modbus通讯协议详解
- 信号估计DOAmusicespritcapon
- 3人表决器 QuartusII
- USB转串口驱动,FT232R驱动程序,最新
- proteus仿真 AT89C51输出各种波形
- 00
- WinCE下CP210x的驱动程序
- hidusage.h hidpi.h 等USB开发用头文件
- VPC3_DPV1源代码,Profibus
- Adobe Illustrator CS5原版amtlib.dll文件
- 51单片机读取温度数据存储到SD卡中并
- 【单片机】51单片机数码管显示万年历
- 现代谱估计算法 music ESPRIT 谐波分解
- proteus_24C08—有注释(proteus里面使用的
- MUSIC算法c 实现
- 硬件课程设计—流水灯(quartus软件
- 曼彻斯特编解码_同步QuartusII工程
评论
共有 条评论