• Home
  • Raw
  • Download

Lines Matching refs:buf

101 			     char *buf)  in pm_async_show()  argument
103 return sprintf(buf, "%d\n", pm_async_enabled); in pm_async_show()
107 const char *buf, size_t n) in pm_async_store() argument
111 if (kstrtoul(buf, 10, &val)) in pm_async_store()
125 char *buf) in mem_sleep_show() argument
127 char *s = buf; in mem_sleep_show()
141 if (s != buf) in mem_sleep_show()
144 return (s - buf); in mem_sleep_show()
147 static suspend_state_t decode_suspend_state(const char *buf, size_t n) in decode_suspend_state() argument
153 p = memchr(buf, '\n', n); in decode_suspend_state()
154 len = p ? p - buf : n; in decode_suspend_state()
159 if (label && len == strlen(label) && !strncmp(buf, label, len)) in decode_suspend_state()
167 const char *buf, size_t n) in mem_sleep_store() argument
181 state = decode_suspend_state(buf, n); in mem_sleep_store()
208 char *buf) in pm_test_show() argument
210 char *s = buf; in pm_test_show()
221 if (s != buf) in pm_test_show()
225 return (s - buf); in pm_test_show()
229 const char *buf, size_t n) in pm_test_store() argument
237 p = memchr(buf, '\n', n); in pm_test_store()
238 len = p ? p - buf : n; in pm_test_store()
244 if (*s && len == strlen(*s) && !strncmp(buf, *s, len)) { in pm_test_store()
280 struct kobj_attribute *attr, char *buf) \
282 return sprintf(buf, "%d\n", suspend_stats._name); \
298 struct kobj_attribute *attr, char *buf) in last_failed_dev_show() argument
307 return sprintf(buf, "%s\n", last_failed_dev); in last_failed_dev_show()
312 struct kobj_attribute *attr, char *buf) in last_failed_errno_show() argument
321 return sprintf(buf, "%d\n", last_failed_errno); in last_failed_errno_show()
326 struct kobj_attribute *attr, char *buf) in last_failed_step_show() argument
337 return sprintf(buf, "%s\n", last_failed_step); in last_failed_step_show()
443 struct kobj_attribute *attr, char *buf) in pm_print_times_show() argument
445 return sprintf(buf, "%d\n", pm_print_times_enabled); in pm_print_times_show()
450 const char *buf, size_t n) in pm_print_times_store() argument
454 if (kstrtoul(buf, 10, &val)) in pm_print_times_store()
473 char *buf) in pm_wakeup_irq_show() argument
475 return pm_wakeup_irq ? sprintf(buf, "%u\n", pm_wakeup_irq) : -ENODATA; in pm_wakeup_irq_show()
483 struct kobj_attribute *attr, char *buf) in pm_debug_messages_show() argument
485 return sprintf(buf, "%d\n", pm_debug_messages_on); in pm_debug_messages_show()
490 const char *buf, size_t n) in pm_debug_messages_store() argument
494 if (kstrtoul(buf, 10, &val)) in pm_debug_messages_store()
553 char *buf) in state_show() argument
555 char *s = buf; in state_show()
566 if (s != buf) in state_show()
569 return (s - buf); in state_show()
572 static suspend_state_t decode_state(const char *buf, size_t n) in decode_state() argument
580 p = memchr(buf, '\n', n); in decode_state()
581 len = p ? p - buf : n; in decode_state()
584 if (len == 4 && str_has_prefix(buf, "disk")) in decode_state()
591 if (label && len == strlen(label) && !strncmp(buf, label, len)) in decode_state()
600 const char *buf, size_t n) in state_store() argument
614 state = decode_state(buf, n); in state_store()
664 char *buf) in wakeup_count_show() argument
669 sprintf(buf, "%u\n", val) : -EINTR; in wakeup_count_show()
674 const char *buf, size_t n) in wakeup_count_store() argument
689 if (sscanf(buf, "%u", &val) == 1) { in wakeup_count_store()
706 char *buf) in autosleep_show() argument
711 return sprintf(buf, "off\n"); in autosleep_show()
715 return sprintf(buf, "%s\n", pm_states[state] ? in autosleep_show()
719 return sprintf(buf, "disk\n"); in autosleep_show()
721 return sprintf(buf, "error"); in autosleep_show()
727 const char *buf, size_t n) in autosleep_store() argument
729 suspend_state_t state = decode_state(buf, n); in autosleep_store()
733 && strcmp(buf, "off") && strcmp(buf, "off\n")) in autosleep_store()
749 char *buf) in wake_lock_show() argument
751 return pm_show_wakelocks(buf, true); in wake_lock_show()
756 const char *buf, size_t n) in wake_lock_store() argument
758 int error = pm_wake_lock(buf); in wake_lock_store()
766 char *buf) in wake_unlock_show() argument
768 return pm_show_wakelocks(buf, false); in wake_unlock_show()
773 const char *buf, size_t n) in wake_unlock_store() argument
775 int error = pm_wake_unlock(buf); in wake_unlock_store()
788 char *buf) in pm_trace_show() argument
790 return sprintf(buf, "%d\n", pm_trace_enabled); in pm_trace_show()
795 const char *buf, size_t n) in pm_trace_store() argument
799 if (sscanf(buf, "%d", &val) == 1) { in pm_trace_store()
814 char *buf) in pm_trace_dev_match_show() argument
816 return show_trace_dev_match(buf, PAGE_SIZE); in pm_trace_dev_match_show()
825 struct kobj_attribute *attr, char *buf) in pm_freeze_timeout_show() argument
827 return sprintf(buf, "%u\n", freeze_timeout_msecs); in pm_freeze_timeout_show()
832 const char *buf, size_t n) in pm_freeze_timeout_store() argument
836 if (kstrtoul(buf, 10, &val)) in pm_freeze_timeout_store()