Lines Matching refs:buf
22 struct device_attribute *attr, char *buf) \
32 rc = sprintf(buf, format_string, \
46 struct device_attribute *attr, char *buf) in bMaxPower_show() argument
56 rc = sprintf(buf, "%dmA\n", usb_get_max_power(udev, actconfig)); in bMaxPower_show()
63 struct device_attribute *attr, char *buf) in configuration_show() argument
73 rc = sprintf(buf, "%s\n", actconfig->string); in configuration_show()
84 const char *buf, size_t count) in bConfigurationValue_store() argument
89 if (sscanf(buf, "%d", &config) != 1 || config < -1 || config > 255) in bConfigurationValue_store()
102 struct device_attribute *attr, char *buf) \
109 retval = sprintf(buf, "%s\n", udev->name); \
120 char *buf) in speed_show() argument
147 return sprintf(buf, "%s\n", speed); in speed_show()
152 char *buf) in busnum_show() argument
157 return sprintf(buf, "%d\n", udev->bus->busnum); in busnum_show()
162 char *buf) in devnum_show() argument
167 return sprintf(buf, "%d\n", udev->devnum); in devnum_show()
172 char *buf) in devpath_show() argument
177 return sprintf(buf, "%s\n", udev->devpath); in devpath_show()
182 char *buf) in version_show() argument
189 return sprintf(buf, "%2x.%02x\n", bcdUSB >> 8, bcdUSB & 0xff); in version_show()
194 char *buf) in maxchild_show() argument
199 return sprintf(buf, "%d\n", udev->maxchild); in maxchild_show()
204 char *buf) in quirks_show() argument
209 return sprintf(buf, "0x%x\n", udev->quirks); in quirks_show()
214 struct device_attribute *attr, char *buf) in avoid_reset_quirk_show() argument
219 return sprintf(buf, "%d\n", !!(udev->quirks & USB_QUIRK_RESET)); in avoid_reset_quirk_show()
224 const char *buf, size_t count) in avoid_reset_quirk_store() argument
229 if (sscanf(buf, "%d", &val) != 1 || val < 0 || val > 1) in avoid_reset_quirk_store()
242 char *buf) in urbnum_show() argument
247 return sprintf(buf, "%d\n", atomic_read(&udev->urbnum)); in urbnum_show()
252 char *buf) in removable_show() argument
270 return sprintf(buf, "%s\n", state); in removable_show()
275 struct device_attribute *attr, char *buf) in ltm_capable_show() argument
278 return sprintf(buf, "%s\n", "yes"); in ltm_capable_show()
279 return sprintf(buf, "%s\n", "no"); in ltm_capable_show()
286 char *buf) in persist_show() argument
290 return sprintf(buf, "%d\n", udev->persist_enabled); in persist_show()
294 const char *buf, size_t count) in persist_store() argument
303 if (sscanf(buf, "%d", &value) != 1) in persist_store()
339 struct device_attribute *attr, char *buf) in connected_duration_show() argument
343 return sprintf(buf, "%u\n", in connected_duration_show()
356 struct device_attribute *attr, char *buf) in active_duration_show() argument
365 return sprintf(buf, "%u\n", duration); in active_duration_show()
370 struct device_attribute *attr, char *buf) in autosuspend_show() argument
372 return sprintf(buf, "%d\n", dev->power.autosuspend_delay / 1000); in autosuspend_show()
376 struct device_attribute *attr, const char *buf, in autosuspend_store() argument
381 if (sscanf(buf, "%d", &value) != 1 || value >= INT_MAX/1000 || in autosuspend_store()
405 char *buf) in level_show() argument
413 return sprintf(buf, "%s\n", p); in level_show()
417 const char *buf, size_t count) in level_store() argument
425 cp = memchr(buf, '\n', count); in level_store()
427 len = cp - buf; in level_store()
432 strncmp(buf, on_string, len) == 0) in level_store()
436 strncmp(buf, auto_string, len) == 0) in level_store()
448 struct device_attribute *attr, char *buf) in usb2_hardware_lpm_show() argument
458 return sprintf(buf, "%s\n", p); in usb2_hardware_lpm_show()
463 const char *buf, size_t count) in usb2_hardware_lpm_store() argument
471 ret = strtobool(buf, &value); in usb2_hardware_lpm_store()
489 char *buf) in usb2_lpm_l1_timeout_show() argument
492 return sprintf(buf, "%d\n", udev->l1_params.timeout); in usb2_lpm_l1_timeout_show()
497 const char *buf, size_t count) in usb2_lpm_l1_timeout_store() argument
502 if (kstrtou16(buf, 0, &timeout)) in usb2_lpm_l1_timeout_store()
512 struct device_attribute *attr, char *buf) in usb2_lpm_besl_show() argument
515 return sprintf(buf, "%d\n", udev->l1_params.besl); in usb2_lpm_besl_show()
520 const char *buf, size_t count) in usb2_lpm_besl_store() argument
525 if (kstrtou8(buf, 0, &besl) || besl > 15) in usb2_lpm_besl_store()
535 struct device_attribute *attr, char *buf) in usb3_hardware_lpm_u1_show() argument
549 return sprintf(buf, "%s\n", p); in usb3_hardware_lpm_u1_show()
554 struct device_attribute *attr, char *buf) in usb3_hardware_lpm_u2_show() argument
568 return sprintf(buf, "%s\n", p); in usb3_hardware_lpm_u2_show()
645 char *buf) \
650 return sprintf(buf, format_string, \
662 char *buf) \
667 return sprintf(buf, format_string, udev->descriptor.field); \
680 struct device_attribute *attr, char *buf) in authorized_show() argument
683 return snprintf(buf, PAGE_SIZE, "%u\n", usb_dev->authorized); in authorized_show()
692 struct device_attribute *attr, const char *buf, in authorized_store() argument
698 result = sscanf(buf, "%u\n", &val); in authorized_store()
712 const char *buf, size_t count) in remove_store() argument
812 char *buf, loff_t off, size_t count) in read_descriptors() argument
838 memcpy(buf, src + off, n); in read_descriptors()
840 buf += n; in read_descriptors()
891 char *buf) \
895 return sprintf(buf, format_string, \
910 char *buf) \
914 return sprintf(buf, format_string, \
927 char *buf) in interface_show() argument
936 return sprintf(buf, "%s\n", string); in interface_show()
941 char *buf) in modalias_show() argument
951 return sprintf(buf, "usb:v%04Xp%04Xd%04Xdc%02Xdsc%02Xdp%02X" in modalias_show()
968 char *buf) in supports_autosuspend_show() argument
977 return sprintf(buf, "%u\n", s); in supports_autosuspend_show()
986 struct device_attribute *attr, char *buf) in interface_authorized_show() argument
990 return sprintf(buf, "%u\n", intf->authorized); in interface_authorized_show()
997 struct device_attribute *attr, const char *buf, size_t count) in interface_authorized_store() argument
1002 if (strtobool(buf, &val) != 0) in interface_authorized_store()