I was looking for a way to use my smartphone as webcam and found this page:
I tried the second option listed in the post, an application called DroidCAM. The post is a little bit outdated and currently the DroidCAM has a client for Linux.
You need to compile a kernel module that will “fake” a device driver webcam, the instructions to compile and test it is here:
A limitation is the max resolution of 640×480.