> > I was thinking of the case of digital cameras which when connected over
> > USB appear to know when they are plugged in, and stop the camera taking
> > pictures (presumably to prevent access to the store) by going in to
> > transfer mode
>
> Okay, yes.  I don't know exactly how digital cameras decide they are
> connected, but checking for power on the USB lines would be a good way to
> do it.
>
> The firmware inside a camera is much more tightly integrated than the
> programs running on a Linux system, as a general rule.  Hence it can react
> more quickly and more definitively to changes of state.  An interesting
> experiment would be to see what happens if you plug in the camera's USB
> cable while taking a picture!

I know that my camera will only let me connect the USB up when it's in
picture review mode.

Some USB devices have two GPIOs, one for detecting when power is
present on the VBUS and another for enabling the pullup resistor that
tells the host that a device is present.

With such a scheme and some handshaking, you could arrange things such
that the pullup doesn't get enabled while the linux side has the
storage device mounted.

When you get notified that VBUS is present, you would unmount and then
release the lock on the pullup. The host would detect this and then
start querying etc.

Then the linux side wouldn't be able to remount until it detected VBUS
going away, at which time it would reclaim the pullup.

This would require some changes in the pxa2xx_udc driver but is
entirely doable (provided you have the right HW)

-- 
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to