usb host mode

Jean-Michel Bouffard jean-michel.bouffard at crc.ca
Fri Mar 7 14:57:11 CET 2008


I don't know if it will help you but I'm using USB host mode and I
didn't have to start a module or to change the kernel configuration.
Only the patch was enough. Then to switch to host I did:
> ifconfig usb0 down (to prevent crash of the usb networking)
> echo "host" > /sys/devices/platform/s3c2410-ohci/usb_mode

So I can't see why you wouldn't have the
/sys/devices/platform/s3c2410-ohci/usb_mode file. Strange...

I think USB host is already included in kernel 2.6.24 so it could be an
alternative for you.

-- 
Jean-Michel Bouffard


Felipe Balbi wrote:
> 
> On Fri, 7 Mar 2008 18:08:13 +0530, "Phani Kumar Kancharala"
> <kancharlaphanikumar at gmail.com> wrote:
>> yeah, Driver -> USB -> Gadget -> Ethernet Gadget Drive is already
> enabled.
>> In fact, I could able to use Ethernet over USB.
>> FYI,
>>  I am using 2.6.22.5 kernel patched with the usb_mode_swith.patch
>>  I cross verified whether the patch is applied correctly using the tool
>> "nm", it listed both show_usb_mode and set_usb_mode on the ohci_hcd.ko.
> 
> Hmm, so you should have the sysfs entry.
> 
> find /sys -name mode  should help you find it ;-)
> 
>> Thanks n Regards,
>> Phani Kumar
>>
>> On Fri, Mar 7, 2008 at 5:51 PM, Felipe Balbi <me at felipebalbi.com> wrote:
>>
>>>
>>> On Fri, 7 Mar 2008 17:30:44 +0530, "Phani Kumar Kancharala"
>>> <kancharlaphanikumar at gmail.com> wrote:
>>>> Thanks Felipe,
>>>> The module ohci-hcd is loaded but use count is zero.
>>>> what do you mean by gadget driver? where can I get it??
>>> make menuconfig
>>> Driver -> USB -> Gadget -> Ethernet Gadget Driver ;-)
>>>
>>> enable that one ;-)
>>>
>>> BTW, HCDs will always have usecount 0, this is done so you can
>>> rmmod/modprobe easier.
>>> good for debugging :-p
>>>
>>>> Best Regards,
>>>> Phani Kumar
>>>> On Fri, Mar 7, 2008 at 4:59 PM, Felipe Balbi <me at felipebalbi.com>
>> wrote:
>>>>>
>>>>> On Fri, 7 Mar 2008 15:35:10 +0530, "Phani Kumar Kancharala"
>>>>> <kancharlaphanikumar at gmail.com> wrote:
>>>>>> Hi all,
>>>>>> I am trying to run the usb in host mode. I created a new kernel
>> image
>>>>>> after
>>>>>> applying the patch given in the wiki.
>>>>>> Now the problem is, I couldn't see the file "usb_mode" under
>>>>>> /sys/devices/platform/s3c2410-ohci/.
>>>>>>
>>>>>> should we create this file or it will be there on loading the
>> module
>>>>>> ohci_hcd??
>>>>> You need to load the module.
>>>>> You may need a gadget driver as well for switching roles between host
>>>> and
>>>>> peripheral
>>>>>
>>>>>> Thanks n Regards
>>>>>> Phani Kumar
>>>>> --
>>>>> Best Regards,
>>>>>
>>>>> Felipe Balbi
>>>>> http://felipebalbi.com
>>>>> me at felipebalbi.com
>>>>>
>>>>>
>>> --
>>> Best Regards,
>>>
>>> Felipe Balbi
>>> http://felipebalbi.com
>>> me at felipebalbi.com
>>>
>>>






More information about the openmoko-kernel mailing list