diff options
author | Andrew Duggan <aduggan@synaptics.com> | 2015-05-06 18:06:03 -0700 |
---|---|---|
committer | Andrew Duggan <aduggan@synaptics.com> | 2015-05-06 18:06:03 -0700 |
commit | 161c83c40b122099327e57f96b4cf52cadd13661 (patch) | |
tree | fba3c1e871733f5617635ba494ea5b812b7cd17d | |
parent | bef9c2dd3bfbe71b75f59c0dba08402414e008a2 (diff) | |
download | platform_external_rmi4utils-161c83c40b122099327e57f96b4cf52cadd13661.tar.gz platform_external_rmi4utils-161c83c40b122099327e57f96b4cf52cadd13661.tar.bz2 platform_external_rmi4utils-161c83c40b122099327e57f96b4cf52cadd13661.zip |
Add option to rebind the driver from rmihidtool.
-rw-r--r-- | rmihidtool/main.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/rmihidtool/main.cpp b/rmihidtool/main.cpp index 1202d07..3d614f3 100644 --- a/rmihidtool/main.cpp +++ b/rmihidtool/main.cpp @@ -34,7 +34,7 @@ #include "hiddevice.h" -#define RMI4UPDATE_GETOPTS "hp:ir:w:foam" +#define RMI4UPDATE_GETOPTS "hp:ir:w:foamb" enum rmihidtool_cmd { RMIHIDTOOL_CMD_INTERACTIVE, @@ -44,6 +44,7 @@ RMIHIDTOOL_CMD_PROPS, RMIHIDTOOL_CMD_ATTN, RMIHIDTOOL_CMD_PRINT_FUNCTIONS, + RMIHIDTOOL_CMD_REBIND_DRIVER, }; static int report_attn = 0; @@ -61,6 +62,7 @@ void print_help(const char *prog_name) fprintf(stdout, "\t-o, --props\t\t\t\tPrint device properties\n"); fprintf(stdout, "\t-a, --attention\t\t\t\tPrint attention reports until control + c\n"); fprintf(stdout, "\t-m, --print-functions\t\t\tPrint RMI4 functions for the device.\n"); + fprintf(stdout, "\t-b, --rebind-driver\t\t\tRebind the driver to force an update of device properties.\n"); } void print_cmd_usage() @@ -207,6 +209,7 @@ int main(int argc, char ** argv) {"props", 0, NULL, 'o'}, {"attention", 0, NULL, 'a'}, {"print-functions", 0, NULL, 'm'}, + {"rebind-driver", 0, NULL, 'b'}, {0, 0, 0, 0}, }; enum rmihidtool_cmd cmd = RMIHIDTOOL_CMD_INTERACTIVE; @@ -255,6 +258,9 @@ int main(int argc, char ** argv) case 'm': cmd = RMIHIDTOOL_CMD_PRINT_FUNCTIONS; break; + case 'b': + cmd = RMIHIDTOOL_CMD_REBIND_DRIVER; + break; default: print_help(argv[0]); return 0; @@ -335,6 +341,9 @@ int main(int argc, char ** argv) device->ScanPDT(); device->PrintFunctions(); break; + case RMIHIDTOOL_CMD_REBIND_DRIVER: + device->RebindDriver(); + break; case RMIHIDTOOL_CMD_INTERACTIVE: default: interactive(device, report); |