new-driver: keep driver_info local to the api.c source file There is a circular reference between the driver info structure (which lists callback routines) and a driver's routines (one of them may have to reference the driver info). Add a forward declaration, and keep the declaration and the implementation 'static' within the api.c source file. Otherwise linker issues may arise should developers put the declaration into protocol.h since it's marked as SR_PRIV in the template.
new-driver: do accept multiple command line words for driver name The README specifies that driver names consist of multiple words (typically vendor and model). Adjust the args parser configuration such that more than one word gets accepted (the previous implementation did insist on a single word).
new-driver: refactoring - use argparse and add several cmdline options - prevent global vars - allow to be run from other directory than sigrok-util/source - use plain python .format() for templating
new-driver: fix for libsigrok since dd5c48a6 This patch in libsigrok removes the drivers.c completely, so new-driver should not try to modify it any more. It has been replaced by a register mechanism to add driver pointer in a new special section. So drv-api.c must be modified to include a call to SR_REGISTER_DEV_DRIVER