Make the code base a bit more modular so it's easier to add new commands. Main change here is: options are parsed twice now, first time for the mode (abs/led) and the device path, then again for the mode-specific options. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>