• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/hid/

Lines Matching refs:report

243 /* Find a given report */
250 struct hid_report *report = NULL;
252 list_for_each_entry(report, feature_report_list, list) {
253 if (report->id == id)
254 return report;
256 dev_warn(&hdev->dev, "No report with id 0x%x found\n", id);
262 struct hid_device *hdev, struct hid_report *report);
270 /* Submit a report and wait for a reply from device - if device fades away
277 struct hid_report *report = picolcd_out_report(report_id, hdev);
281 if (!report || !data)
290 work->out_report = report;
296 for (i = k = 0; i < report->maxfield; i++)
297 for (j = 0; j < report->field[i]->report_count; j++) {
298 hid_set_field(report->field[i], j, k < size ? raw_data[k] : 0);
302 usbhid_submit_report(data->hdev, report, USB_DIR_OUT);
398 struct hid_report *report = picolcd_out_report(REPORT_LCD_CMD, data->hdev);
403 if (!report || report->maxfield != 1)
408 for (j = 0; j < report->field[0]->maxusage; j++)
410 hid_set_field(report->field[0], j, i << 2);
412 hid_set_field(report->field[0], j, mapcmd[j]);
414 hid_set_field(report->field[0], j, 0);
415 usbhid_submit_report(data->hdev, report, USB_DIR_OUT);
907 struct hid_report *report = picolcd_out_report(REPORT_BRIGHTNESS, data->hdev);
910 if (!report || report->maxfield != 1 || report->field[0]->report_count != 1)
916 hid_set_field(report->field[0], 0, data->lcd_power == FB_BLANK_UNBLANK ? data->lcd_brightness : 0);
917 usbhid_submit_report(data->hdev, report, USB_DIR_OUT);
933 static int picolcd_init_backlight(struct picolcd_data *data, struct hid_report *report)
938 if (!report)
940 if (report->maxfield != 1 || report->field[0]->report_count != 1 ||
941 report->field[0]->report_size != 8) {
942 dev_err(dev, "unsupported BRIGHTNESS report");
991 struct hid_report *report)
1020 struct hid_report *report = picolcd_out_report(REPORT_CONTRAST, data->hdev);
1023 if (!report || report->maxfield != 1 || report->field[0]->report_count != 1)
1028 hid_set_field(report->field[0], 0, data->lcd_contrast);
1029 usbhid_submit_report(data->hdev, report, USB_DIR_OUT);
1045 static int picolcd_init_lcd(struct picolcd_data *data, struct hid_report *report)
1050 if (!report)
1052 if (report->maxfield != 1 || report->field[0]->report_count != 1 ||
1053 report->field[0]->report_size != 8) {
1054 dev_err(dev, "unsupported CONTRAST report");
1087 struct hid_report *report)
1106 struct hid_report *report;
1111 report = picolcd_out_report(REPORT_LED_STATE, data->hdev);
1112 if (!report || report->maxfield != 1 || report->field[0]->report_count != 1)
1116 hid_set_field(report->field[0], 0, data->led_state);
1117 usbhid_submit_report(data->hdev, report, USB_DIR_OUT);
1165 static int picolcd_init_leds(struct picolcd_data *data, struct hid_report *report)
1173 if (!report)
1175 if (report->maxfield != 1 || report->field[0]->report_count != 1 ||
1176 report->field[0]->report_size != 8) {
1177 dev_err(dev, "unsupported LED_STATE report");
1234 struct hid_report *report)
1251 struct hid_report *report, u8 *raw_data, int size)
1315 struct hid_report *report, u8 *raw_data, int size)
1360 struct hid_report *report = picolcd_out_report(REPORT_RESET, hdev);
1364 if (!data || !report || report->maxfield != 1)
1372 hid_set_field(report->field[0], 0, 1);
1373 usbhid_submit_report(hdev, report, USB_DIR_OUT);
1409 struct hid_report *report = NULL;
1416 report = picolcd_out_report(REPORT_EXIT_FLASHER, data->hdev);
1421 report = picolcd_out_report(REPORT_EXIT_KEYBOARD, data->hdev);
1425 if (!report)
1434 hid_set_field(report->field[0], 0, timeout & 0xff);
1435 hid_set_field(report->field[0], 1, (timeout >> 8) & 0xff);
1436 usbhid_submit_report(data->hdev, report, USB_DIR_OUT);
1826 * Helper code for HID report level dumping/debugging
1851 struct hid_device *hdev, struct hid_report *report)
1854 int raw_size = (report->size >> 3) + 1;
1866 snprintf(buff, BUFF_SZ, "\nout report %d (size %d) = ",
1867 report->id, raw_size);
1873 raw_data[0] = report->id;
1874 hid_output_report(report, raw_data);
1879 switch (report->id) {
1882 snprintf(buff, BUFF_SZ, "out report %s (%d, size=%d)\n",
1883 "REPORT_LED_STATE", report->id, raw_size-1);
1890 snprintf(buff, BUFF_SZ, "out report %s (%d, size=%d)\n",
1891 "REPORT_BRIGHTNESS", report->id, raw_size-1);
1898 snprintf(buff, BUFF_SZ, "out report %s (%d, size=%d)\n",
1899 "REPORT_CONTRAST", report->id, raw_size-1);
1906 snprintf(buff, BUFF_SZ, "out report %s (%d, size=%d)\n",
1907 "REPORT_RESET", report->id, raw_size-1);
1915 snprintf(buff, BUFF_SZ, "out report %s (%d, size=%d)\n",
1916 "REPORT_LCD_CMD", report->id, raw_size-1);
1922 snprintf(buff, BUFF_SZ, "out report %s (%d, size=%d)\n",
1923 "REPORT_LCD_CMD", report->id, raw_size-1);
1929 snprintf(buff, BUFF_SZ, "out report %s (%d, size=%d)\n",
1930 "REPORT_LCD_CMD", report->id, raw_size-1);
1936 snprintf(buff, BUFF_SZ, "out report %s (%d, size=%d)\n",
1937 "REPORT_EE_READ", report->id, raw_size-1);
1947 snprintf(buff, BUFF_SZ, "out report %s (%d, size=%d)\n",
1948 "REPORT_EE_WRITE", report->id, raw_size-1);
1969 snprintf(buff, BUFF_SZ, "out report %s (%d, size=%d)\n",
1970 "REPORT_ERASE_MEMORY", report->id, raw_size-1);
1989 snprintf(buff, BUFF_SZ, "out report %s (%d, size=%d)\n",
1990 "REPORT_READ_MEMORY", report->id, raw_size-1);
2013 snprintf(buff, BUFF_SZ, "out report %s (%d, size=%d)\n",
2014 "REPORT_WRITE_MEMORY", report->id, raw_size-1);
2058 snprintf(buff, BUFF_SZ, "out report %s (%d, size=%d)\n",
2059 "REPORT_EXIT_KEYBOARD", report->id, raw_size-1);
2067 snprintf(buff, BUFF_SZ, "out report %s (%d, size=%d)\n",
2068 "REPORT_VERSION", report->id, raw_size-1);
2072 snprintf(buff, BUFF_SZ, "out report %s (%d, size=%d)\n",
2073 "REPORT_DEVID", report->id, raw_size-1);
2077 snprintf(buff, BUFF_SZ, "out report %s (%d, size=%d)\n",
2078 "REPORT_SPLASH_SIZE", report->id, raw_size-1);
2082 snprintf(buff, BUFF_SZ, "out report %s (%d, size=%d)\n",
2083 "REPORT_HOOK_VERSION", report->id, raw_size-1);
2087 snprintf(buff, BUFF_SZ, "out report %s (%d, size=%d)\n",
2088 "REPORT_VERSION", report->id, raw_size-1);
2096 snprintf(buff, BUFF_SZ, "out report %s (%d, size=%d)\n",
2097 "<unknown>", report->id, raw_size-1);
2106 struct hid_device *hdev, struct hid_report *report,
2120 switch (report->id) {
2122 /* 2 data bytes with affected report and error code */
2123 snprintf(buff, BUFF_SZ, "report %s (%d, size=%d)\n",
2124 "REPORT_ERROR_CODE", report->id, size-1);
2127 snprintf(buff, BUFF_SZ, "\tError code 0x%02x (%s) in reply to report 0x%02x\n",
2130 snprintf(buff, BUFF_SZ, "\tError code 0x%02x in reply to report 0x%02x\n",
2136 snprintf(buff, BUFF_SZ, "report %s (%d, size=%d)\n",
2137 "REPORT_KEY_STATE", report->id, size-1);
2151 snprintf(buff, BUFF_SZ, "report %s (%d, size=%d)\n",
2152 "REPORT_IR_DATA", report->id, size-1);
2171 snprintf(buff, BUFF_SZ, "report %s (%d, size=%d)\n",
2172 "REPORT_EE_DATA", report->id, size-1);
2194 snprintf(buff, BUFF_SZ, "report %s (%d, size=%d)\n",
2195 "REPORT_MEMORY", report->id, size-1);
2236 snprintf(buff, BUFF_SZ, "report %s (%d, size=%d)\n",
2237 "REPORT_VERSION", report->id, size-1);
2244 snprintf(buff, BUFF_SZ, "report %s (%d, size=%d)\n",
2245 "REPORT_BL_ERASE_MEMORY", report->id, size-1);
2250 snprintf(buff, BUFF_SZ, "report %s (%d, size=%d)\n",
2251 "REPORT_BL_READ_MEMORY", report->id, size-1);
2256 snprintf(buff, BUFF_SZ, "report %s (%d, size=%d)\n",
2257 "REPORT_BL_WRITE_MEMORY", report->id, size-1);
2262 snprintf(buff, BUFF_SZ, "report %s (%d, size=%d)\n",
2263 "REPORT_DEVID", report->id, size-1);
2273 snprintf(buff, BUFF_SZ, "report %s (%d, size=%d)\n",
2274 "REPORT_SPLASH_SIZE", report->id, size-1);
2284 snprintf(buff, BUFF_SZ, "report %s (%d, size=%d)\n",
2285 "REPORT_HOOK_VERSION", report->id, size-1);
2292 snprintf(buff, BUFF_SZ, "report %s (%d, size=%d)\n",
2293 "<unknown>", report->id, size-1);
2355 struct hid_device *hdev, struct hid_report *report,
2371 * Handle raw report as sent by device
2374 struct hid_report *report, u8 *raw_data, int size)
2383 if (report->id == REPORT_KEY_STATE) {
2385 ret = picolcd_raw_keypad(data, report, raw_data+1, size-1);
2386 } else if (report->id == REPORT_IR_DATA) {
2388 ret = picolcd_raw_cir(data, report, raw_data+1, size-1);
2393 * report we got is one of the expected ones or not.
2398 data->pending->in_report = report;
2404 picolcd_debug_raw_event(data, hdev, report, raw_data, size);
2450 struct hid_report *report)
2456 if (!report)
2458 if (report->maxfield != 1 || report->field[0]->report_count != 2 ||
2459 report->field[0]->report_size != 8) {
2460 dev_err(&hdev->dev, "unsupported KEY_STATE report");
2506 static inline int picolcd_init_cir(struct picolcd_data *data, struct hid_report *report)
2624 dev_err(&hdev->dev, "device report parse failed\n");