rewrite find_devices()

Drop the max_devices parameter and let the function itself find out how
many devices there are. Also, add some documentation.

Signed-off-by: Michael Walle <michael.walle@kontron.com>
use open_ext() instead of open()

This way we can read the version information of the device and the binary
module and check if they are compatible. Additionally, provide this
information to the user.

Signed-off-by: Michael Walle <michael.walle@kontron.com>