主题 : tiny4412 在内核设置里可以设置exynos-usb-switch这个驱动 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 23644
精华: 0
发帖: 44
金钱: 220 两
威望: 44 点
综合积分: 88 分
注册时间: 2010-06-23
最后登录: 2017-09-13
楼主  发表于: 2014-04-20 14:34

 tiny4412 在内核设置里可以设置exynos-usb-switch这个驱动

这个驱动编译到内核后,如何使用可以使usb host 转usb device,或者usb device 转usb host
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2014-04-20 20:59
这个应该不是光盘上内核源代码里的东西, 能否说明它的出处?
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 23644
精华: 0
发帖: 44
金钱: 220 两
威望: 44 点
综合积分: 88 分
注册时间: 2010-06-23
最后登录: 2017-09-13
2楼  发表于: 2014-04-21 09:39
是在D:\friendlyarm\disk1\Android\linux-3.5\drivers\usb\misc.友善之臂的linux源码
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
3楼  发表于: 2014-04-21 13:13

 回 2楼(zmxfirst) 的帖子

不好意思,之前没注意到:)
从这个驱动的源代码看,它依赖于硬件上的三个GPIO连接:

1) gpio_host_detect, 用于检测是否需要切换成Host Mode,看起来应该接在XuotgID上;
2)gpio_device_detect,用于检测是否需要切换成Device Mode,看起来应该接在XuotgVBUS信号上;
3)gpio_host_vbus,用于控制在Host Mode下的VBUS电源输出

在Tiny4412上,只有1306底板的XuotgVBUS上有GPIO连接(GPX1_0/XEINT8), 而对于XuotgID和VBUS输出均没有GPIO连接,所以恐怕没办法在Tiny4412上用这个驱动。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 23644
精华: 0
发帖: 44
金钱: 220 两
威望: 44 点
综合积分: 88 分
注册时间: 2010-06-23
最后登录: 2017-09-13
4楼  发表于: 2014-04-21 13:40
谢谢! 还有个问题,如果usb 连接u盘可以识别,是不是可以认为是转换成Host Mode
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
5楼  发表于: 2014-04-21 14:07

 回 4楼(zmxfirst) 的帖子

如果要识别U盘,必须先切换成Host Mode,这是通过检测USB ID pin实现的。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 23644
精华: 0
发帖: 44
金钱: 220 两
威望: 44 点
综合积分: 88 分
注册时间: 2010-06-23
最后登录: 2017-09-13
6楼  发表于: 2014-04-21 16:17

 Re:回 2楼(zmxfirst) 的帖子

引用第3楼kasim于2014-04-21 13:13发表的 回 2楼(zmxfirst) 的帖子 :
不好意思,之前没注意到:)
从这个驱动的源代码看,它依赖于硬件上的三个GPIO连接:

1) gpio_host_detect, 用于检测是否需要切换成Host Mode,看起来应该接在XuotgID上;
2)gpio_device_detect,用于检测是否需要切换成Device Mode,看起来应该接在XuotgVBUS信号上;
.......


如果需要在tiny4412 的1312 开发板的android下使用这个驱动,需要怎么做,能提供一个思路吗?

硬件上需要做什么,驱动的修改需要做什么?或者友善能提供的化,多少费用
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
7楼  发表于: 2014-04-26 22:22

 回 6楼(zmxfirst) 的帖子

我想只要硬件上能满足上面帖子中所提到的GPIO连接的条件,这个驱动应该就可以用了,不需要做任何修改。
至于友善之臂是否能提供支持,建议你到论坛的官方技术支持版块咨询,我无法回答。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."