I assume then you mean that the D40 could send a signal to the USB port. But ... what would cause it to do that?

The D40 doesn't send any "event" type signals to it's mini-USB port, other than providing power to the USB port when the camera is turned on. I'm not trying to get the camera to trigger the RPi. I want the RPi to trigger the camera.

The use case for a camera is the other way around -- "capture an image when this event happens". An event would be pushing the shutter button or a capture signal sent from another device connected to the mini-USB port on the camera.