資源簡介
usb otg 調(diào)試 patch,對(duì)于調(diào)試 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)
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件??????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個(gè)文件信息
- 上一篇:IBM DS3512圖解完整版
- 下一篇:zw_NMEA_Worker.zip
評(píng)論
共有 條評(píng)論