Print protocol specific information about a device
diff --git a/rmihidtool/main.cpp b/rmihidtool/main.cpp
index 3d614f3..cf25a4b 100644
--- a/rmihidtool/main.cpp
+++ b/rmihidtool/main.cpp
@@ -34,7 +34,7 @@
 
 #include "hiddevice.h"
 
-#define RMI4UPDATE_GETOPTS      "hp:ir:w:foamb"
+#define RMI4UPDATE_GETOPTS      "hp:ir:w:foambd"
 
  enum rmihidtool_cmd {
 	RMIHIDTOOL_CMD_INTERACTIVE,
@@ -45,6 +45,7 @@
 	RMIHIDTOOL_CMD_ATTN,
 	RMIHIDTOOL_CMD_PRINT_FUNCTIONS,
 	RMIHIDTOOL_CMD_REBIND_DRIVER,
+	RMIHIDTOOL_CMD_PRINT_DEVICE_INFO,
 };
 
 static int report_attn = 0;
@@ -63,6 +64,7 @@
 	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");
+	fprintf(stdout, "\t-d, --device-info\t\t\tPrint protocol specific information about the device.\n");
 }
 
 void print_cmd_usage()
@@ -210,6 +212,7 @@
 		{"attention", 0, NULL, 'a'},
 		{"print-functions", 0, NULL, 'm'},
 		{"rebind-driver", 0, NULL, 'b'},
+		{"device-info", 0, NULL, 'd'},
 		{0, 0, 0, 0},
 	};
 	enum rmihidtool_cmd cmd = RMIHIDTOOL_CMD_INTERACTIVE;
@@ -261,6 +264,9 @@
 			case 'b':
 				cmd = RMIHIDTOOL_CMD_REBIND_DRIVER;
 				break;
+			case 'd':
+				cmd = RMIHIDTOOL_CMD_PRINT_DEVICE_INFO;
+				break;
 			default:
 				print_help(argv[0]);
 				return 0;
@@ -344,6 +350,9 @@
 		case RMIHIDTOOL_CMD_REBIND_DRIVER:
 			device->RebindDriver();
 			break;
+		case RMIHIDTOOL_CMD_PRINT_DEVICE_INFO:
+			device->PrintDeviceInfo();
+			break;
 		case RMIHIDTOOL_CMD_INTERACTIVE:
 		default:
 			interactive(device, report);