Hotplug in device with Linux
Hi there,
I am working on sharp PDA that has Linux in it.
I'd like it to trigger some event when USB line has been plugged into host, so that I can use it to call up a corresponding AP to offer service. Can hotplug trigger this kind of event in Linux device?
Thank & regards,
Calin
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 5 lines · ?L???w
Hi there,
I am working on sharp PDA that has Linux in it.
I'd like it to trigger some event when USB line has been plugged into host, so that I can use it to call up a corresponding AP to offer service.
So your Linux PDA shows up as a USB device when plugged into a USB host? Or is it the other way around?
Quoted 1 line
Can hotplug trigger this kind of event in Linux device?
Yes. If you are a USB host you should get that event today. If you are a USB device (what Linux calls a USB gadget), you should generate that event, but as there is no mainline code for USB gadget's right now, I do not think that has been hooked up yet.
Are you using the Lineo USB gadget code, or some other USB code?
thanks,
greg k-h
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
----- Original Message -----
From: "Greg KH" <[email protected]>
To: "?L???w" <[email protected]>
Cc: <[email protected]>
Sent: Friday, May 02, 2003 10:40 AM
Subject: Re: Hotplug in device with Linux
Quoted 5 lines · ?L???w
Quoted 4 lines
Hi there,
I am working on sharp PDA that has Linux in it.
I'd like it to trigger some event when USB line has been plugged into
host,
Quoted 4 lines
Quoted 1 line
so that I can use it to call up a corresponding AP to offer service.
So your Linux PDA shows up as a USB device when plugged into a USB host? Or is it the other way around?
I want to get that event in "Linux PDA", not in host...
What I want to do is that both SyncML client and server can automatically be called up respectively
in Linux device and in Linux host when USB line has connected device and host.
It's not too hard to do that in Linux host by hotplug manners, but I donot know how to do that in Linux device.
It seems that hotplug doesn't support this manners in device side. Does it?
Quoted 7 lines
Quoted 2 lines
Can hotplug trigger this kind of event in Linux device?
Yes. If you are a USB host you should get that event today. If you are a USB device (what Linux calls a USB gadget), you should generate that event, but as there is no mainline code for USB gadget's right now, I do not think that has been hooked up yet.
Do you mean my USB driver in Linux device should invoke hotplug helper by myself?
Is it too odd to invoke AP by USB driver itself in Linux device?
Quoted 2 lines
Are you using the Lineo USB gadget code, or some other USB code?
I am not sure. Sorry.. :-)
Quoted 5 lines
thanks,
greg k-h
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 3 lines · ???
It's not too hard to do that in Linux host by hotplug manners, but I donot know how to do that in Linux device.
It seems that hotplug doesn't support this manners in device side. Does it?
If you are using the Lineo code, then no, I do not think it supports it. Actually I don't think any USB gadget code supports this yet, but am not really sure, as there is no USB gadget code in the main kernel tree yet.
But if you have the source of your kernel, it should not be very hard to add such support.
Good luck,
greg k-h
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 8 lines · Greg KH
Quoted 3 lines · ???
It's not too hard to do that in Linux host by hotplug manners, but I donot know how to do that in Linux device.
It seems that hotplug doesn't support this manners in device side. Does it?If you are using the Lineo code, then no, I do not think it supports it.
I'm not sure where "Lineo code" stops, but Zaurus does seem to load USB drivers based on hotplug events.
I certainly needed to modify Sharp's hacked /etc/hotplug/net.agent to set a unique Ethernet address, since the Zaurus ROMs don't. The hacks done for the Zaurus included removal of BASH-isms (it doesn't need those capabilities anyway) and a bunch of stuff I never bothered to figure out. (Looked strange to me, as if someone never finished some modifications they were working on.)
Quoted 2 lines
Actually I don't think any USB gadget code supports this yet, but am not really sure, as there is no USB gadget code in the main kernel tree yet.
That's in the works ... I need to see if 2.5.68 is still as broken as it was when I first tried it! :)
- Dave
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 3 lines · David Brownell
That's in the works ... I need to see if 2.5.68 is still as broken as it was when I first tried it! :)
It still wedges for me when unloading a host controller :( I haven't spent any time tracking this down yet...
greg k-h
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 8 lines · Greg KH
Quoted 2 lines · David Brownell
That's in the works ... I need to see if 2.5.68 is still as broken as it was when I first tried it! :)
It still wedges for me when unloading a host controller :( I haven't spent any time tracking this down yet...
The 2.5.68 problems I had were appearing even before that, basics like IRQ handling flakiness. But yes, losing the ability to "/etc/init.d/hotplug stop" is another lose!
- Dave
Quoted 3 lines
greg k-h
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel