Lines Matching refs:buf
130 char *buf; member
150 static ssize_t test_fw_misc_read(struct file *f, char __user *buf, in test_fw_misc_read() argument
157 rc = simple_read_from_buffer(buf, size, offset, in test_fw_misc_read()
251 const char *buf, size_t count) in reset_store() argument
279 char *buf) in config_show() argument
285 len += scnprintf(buf, PAGE_SIZE - len, in config_show()
290 len += scnprintf(buf + len, PAGE_SIZE - len, in config_show()
294 len += scnprintf(buf + len, PAGE_SIZE - len, in config_show()
297 len += scnprintf(buf + len, PAGE_SIZE - len, in config_show()
300 len += scnprintf(buf + len, PAGE_SIZE - len, in config_show()
305 len += scnprintf(buf + len, PAGE_SIZE - len, in config_show()
308 len += scnprintf(buf + len, PAGE_SIZE - len, in config_show()
310 len += scnprintf(buf + len, PAGE_SIZE - len, in config_show()
312 len += scnprintf(buf + len, PAGE_SIZE - len, in config_show()
315 len += scnprintf(buf + len, PAGE_SIZE - len, in config_show()
318 len += scnprintf(buf + len, PAGE_SIZE - len, in config_show()
321 len += scnprintf(buf + len, PAGE_SIZE - len, in config_show()
325 len += scnprintf(buf + len, PAGE_SIZE - len, in config_show()
336 const char *buf, size_t count) in config_name_store() argument
342 ret = __kstrncpy(&test_fw_config->name, buf, count, GFP_KERNEL); in config_name_store()
363 static inline int __test_dev_config_update_bool(const char *buf, size_t size, in __test_dev_config_update_bool() argument
368 if (kstrtobool(buf, cfg) < 0) in __test_dev_config_update_bool()
376 static int test_dev_config_update_bool(const char *buf, size_t size, in test_dev_config_update_bool() argument
382 ret = __test_dev_config_update_bool(buf, size, cfg); in test_dev_config_update_bool()
388 static ssize_t test_dev_config_show_bool(char *buf, bool val) in test_dev_config_show_bool() argument
390 return snprintf(buf, PAGE_SIZE, "%d\n", val); in test_dev_config_show_bool()
394 const char *buf, in __test_dev_config_update_size_t() argument
401 ret = kstrtol(buf, 10, &new); in __test_dev_config_update_size_t()
411 static ssize_t test_dev_config_show_size_t(char *buf, size_t val) in test_dev_config_show_size_t() argument
413 return snprintf(buf, PAGE_SIZE, "%zu\n", val); in test_dev_config_show_size_t()
416 static ssize_t test_dev_config_show_int(char *buf, int val) in test_dev_config_show_int() argument
418 return snprintf(buf, PAGE_SIZE, "%d\n", val); in test_dev_config_show_int()
421 static int __test_dev_config_update_u8(const char *buf, size_t size, u8 *cfg) in __test_dev_config_update_u8() argument
426 ret = kstrtou8(buf, 10, &val); in __test_dev_config_update_u8()
436 static int test_dev_config_update_u8(const char *buf, size_t size, u8 *cfg) in test_dev_config_update_u8() argument
441 ret = __test_dev_config_update_u8(buf, size, cfg); in test_dev_config_update_u8()
447 static ssize_t test_dev_config_show_u8(char *buf, u8 val) in test_dev_config_show_u8() argument
449 return snprintf(buf, PAGE_SIZE, "%u\n", val); in test_dev_config_show_u8()
454 char *buf) in config_name_show() argument
456 return config_test_show_str(buf, test_fw_config->name); in config_name_show()
462 const char *buf, size_t count) in config_upload_name_store() argument
468 tst = upload_lookup_name(buf); in config_upload_name_store()
480 char *buf) in config_upload_name_show() argument
482 return config_test_show_str(buf, test_fw_config->upload_name); in config_upload_name_show()
488 const char *buf, size_t count) in config_num_requests_store() argument
500 rc = __test_dev_config_update_u8(buf, count, in config_num_requests_store()
510 char *buf) in config_num_requests_show() argument
512 return test_dev_config_show_u8(buf, test_fw_config->num_requests); in config_num_requests_show()
518 const char *buf, size_t count) in config_into_buf_store() argument
520 return test_dev_config_update_bool(buf, in config_into_buf_store()
527 char *buf) in config_into_buf_show() argument
529 return test_dev_config_show_bool(buf, test_fw_config->into_buf); in config_into_buf_show()
535 const char *buf, size_t count) in config_buf_size_store() argument
547 rc = __test_dev_config_update_size_t(buf, count, in config_buf_size_store()
557 char *buf) in config_buf_size_show() argument
559 return test_dev_config_show_size_t(buf, test_fw_config->buf_size); in config_buf_size_show()
565 const char *buf, size_t count) in config_file_offset_store() argument
577 rc = __test_dev_config_update_size_t(buf, count, in config_file_offset_store()
587 char *buf) in config_file_offset_show() argument
589 return test_dev_config_show_size_t(buf, test_fw_config->file_offset); in config_file_offset_show()
595 const char *buf, size_t count) in config_partial_store() argument
597 return test_dev_config_update_bool(buf, in config_partial_store()
604 char *buf) in config_partial_show() argument
606 return test_dev_config_show_bool(buf, test_fw_config->partial); in config_partial_show()
612 const char *buf, size_t count) in config_sync_direct_store() argument
614 int rc = test_dev_config_update_bool(buf, count, in config_sync_direct_store()
626 char *buf) in config_sync_direct_show() argument
628 return test_dev_config_show_bool(buf, test_fw_config->sync_direct); in config_sync_direct_show()
634 const char *buf, size_t count) in config_send_uevent_store() argument
636 return test_dev_config_update_bool(buf, count, in config_send_uevent_store()
642 char *buf) in config_send_uevent_show() argument
644 return test_dev_config_show_bool(buf, test_fw_config->send_uevent); in config_send_uevent_show()
650 const char *buf, size_t count) in config_read_fw_idx_store() argument
652 return test_dev_config_update_u8(buf, count, in config_read_fw_idx_store()
658 char *buf) in config_read_fw_idx_show() argument
660 return test_dev_config_show_u8(buf, test_fw_config->read_fw_idx); in config_read_fw_idx_show()
667 const char *buf, size_t count) in trigger_request_store() argument
672 name = kstrndup(buf, count, GFP_KERNEL); in trigger_request_store()
706 const char *buf, size_t count) in trigger_request_platform_store() argument
720 name = kstrndup(buf, count, GFP_KERNEL); in trigger_request_platform_store()
768 const char *buf, size_t count) in trigger_async_request_store() argument
773 name = kstrndup(buf, count, GFP_KERNEL); in trigger_async_request_store()
813 const char *buf, size_t count) in trigger_custom_fallback_store() argument
818 name = kstrndup(buf, count, GFP_KERNEL); in trigger_custom_fallback_store()
923 const char *buf, size_t count) in trigger_batched_requests_store() argument
1026 const char *buf, size_t count) in trigger_batched_requests_async_store() argument
1106 kfree(tst->buf); in upload_release()
1201 memset(tst->buf, 0, TEST_UPLOAD_MAX_SIZE); in test_fw_upload_prepare()
1236 memcpy(tst->buf + offset, data + offset, blk_size); in test_fw_upload_write()
1293 const char *buf, size_t count) in upload_register_store() argument
1300 name = kstrndup(buf, count, GFP_KERNEL); in upload_register_store()
1318 tst->buf = kzalloc(TEST_UPLOAD_MAX_SIZE, GFP_KERNEL); in upload_register_store()
1319 if (!tst->buf) { in upload_register_store()
1337 kfree(tst->buf); in upload_register_store()
1352 const char *buf, size_t count) in upload_unregister_store() argument
1358 tst = upload_lookup_name(buf); in upload_unregister_store()
1378 char *buf) in test_result_show() argument
1380 return test_dev_config_show_int(buf, test_fw_config->test_result); in test_result_show()
1386 const char *buf, size_t count) in release_all_firmware_store() argument
1395 char *buf) in read_firmware_show() argument
1428 memcpy(buf, req->fw->data, req->fw->size); in read_firmware_show()
1440 char *buf) in upload_read_show() argument
1469 memcpy(buf, tst->buf, tst->size); in upload_read_show()