* Re: Hotplug in device with Linux
2003-05-02 1:52 Hotplug in device with Linux 林建安
@ 2003-05-02 2:40 ` Greg KH
2003-05-02 3:10 ` ???
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2003-05-02 2:40 UTC (permalink / raw)
To: linux-hotplug
On Fri, May 02, 2003 at 09:52:47AM +0800, ?L???w wrote:
>
> 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?
> 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
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: Hotplug in device with Linux
2003-05-02 1:52 Hotplug in device with Linux 林建安
2003-05-02 2:40 ` Greg KH
@ 2003-05-02 3:10 ` ???
2003-05-02 3:48 ` Greg KH
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: ??? @ 2003-05-02 3:10 UTC (permalink / raw)
To: linux-hotplug
----- Original Message -----
From: "Greg KH" <greg@kroah.com>
To: "?L???w" <calin@iii.org.tw>
Cc: <linux-hotplug-devel@lists.sourceforge.net>
Sent: Friday, May 02, 2003 10:40 AM
Subject: Re: Hotplug in device with Linux
> On Fri, May 02, 2003 at 09:52:47AM +0800, ?L???w wrote:
> >
> > 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?
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?
>
> > 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?
>
> Are you using the Lineo USB gadget code, or some other USB code?
I am not sure. Sorry.. :-)
>
> 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
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: Hotplug in device with Linux
2003-05-02 1:52 Hotplug in device with Linux 林建安
2003-05-02 2:40 ` Greg KH
2003-05-02 3:10 ` ???
@ 2003-05-02 3:48 ` Greg KH
2003-05-02 5:09 ` David Brownell
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2003-05-02 3:48 UTC (permalink / raw)
To: linux-hotplug
On Fri, May 02, 2003 at 11:10:12AM +0800, ??? wrote:
> 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
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: Hotplug in device with Linux
2003-05-02 1:52 Hotplug in device with Linux 林建安
` (2 preceding siblings ...)
2003-05-02 3:48 ` Greg KH
@ 2003-05-02 5:09 ` David Brownell
2003-05-02 6:11 ` Greg KH
2003-05-02 6:56 ` David Brownell
5 siblings, 0 replies; 7+ messages in thread
From: David Brownell @ 2003-05-02 5:09 UTC (permalink / raw)
To: linux-hotplug
Greg KH wrote:
> On Fri, May 02, 2003 at 11:10:12AM +0800, ??? wrote:
>
>>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.)
> 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
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: Hotplug in device with Linux
2003-05-02 1:52 Hotplug in device with Linux 林建安
` (3 preceding siblings ...)
2003-05-02 5:09 ` David Brownell
@ 2003-05-02 6:11 ` Greg KH
2003-05-02 6:56 ` David Brownell
5 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2003-05-02 6:11 UTC (permalink / raw)
To: linux-hotplug
On Thu, May 01, 2003 at 10:09:05PM -0700, David Brownell wrote:
>
> 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
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: Hotplug in device with Linux
2003-05-02 1:52 Hotplug in device with Linux 林建安
` (4 preceding siblings ...)
2003-05-02 6:11 ` Greg KH
@ 2003-05-02 6:56 ` David Brownell
5 siblings, 0 replies; 7+ messages in thread
From: David Brownell @ 2003-05-02 6:56 UTC (permalink / raw)
To: linux-hotplug
Greg KH wrote:
> On Thu, May 01, 2003 at 10:09:05PM -0700, David Brownell wrote:
>
>>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
>
> 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
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 7+ messages in thread