• 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()
203 struct kobj_attribute *attr, char *buf) in sync_on_suspend_show() argument
205 return sprintf(buf, "%d\n", sync_on_suspend_enabled); in sync_on_suspend_show()
210 const char *buf, size_t n) in sync_on_suspend_store() argument
214 if (kstrtoul(buf, 10, &val)) in sync_on_suspend_store()
240 char *buf) in pm_test_show() argument
242 char *s = buf; in pm_test_show()
253 if (s != buf) in pm_test_show()
257 return (s - buf); in pm_test_show()
261 const char *buf, size_t n) in pm_test_store() argument
269 p = memchr(buf, '\n', n); in pm_test_store()
270 len = p ? p - buf : n; in pm_test_store()
276 if (*s && len == strlen(*s) && !strncmp(buf, *s, len)) { in pm_test_store()
312 struct kobj_attribute *attr, char *buf) \
314 return sprintf(buf, "%d\n", suspend_stats._name); \
330 struct kobj_attribute *attr, char *buf) in last_failed_dev_show() argument
339 return sprintf(buf, "%s\n", last_failed_dev); in last_failed_dev_show()
344 struct kobj_attribute *attr, char *buf) in last_failed_errno_show() argument
353 return sprintf(buf, "%d\n", last_failed_errno); in last_failed_errno_show()
358 struct kobj_attribute *attr, char *buf) in last_failed_step_show() argument
369 return sprintf(buf, "%s\n", last_failed_step); in last_failed_step_show()
475 struct kobj_attribute *attr, char *buf) in pm_print_times_show() argument
477 return sprintf(buf, "%d\n", pm_print_times_enabled); in pm_print_times_show()
482 const char *buf, size_t n) in pm_print_times_store() argument
486 if (kstrtoul(buf, 10, &val)) in pm_print_times_store()
505 char *buf) in pm_wakeup_irq_show() argument
510 return sprintf(buf, "%u\n", pm_wakeup_irq()); in pm_wakeup_irq_show()
518 struct kobj_attribute *attr, char *buf) in pm_debug_messages_show() argument
520 return sprintf(buf, "%d\n", pm_debug_messages_on); in pm_debug_messages_show()
525 const char *buf, size_t n) in pm_debug_messages_store() argument
529 if (kstrtoul(buf, 10, &val)) in pm_debug_messages_store()
595 char *buf) in state_show() argument
597 char *s = buf; in state_show()
608 if (s != buf) in state_show()
611 return (s - buf); in state_show()
614 static suspend_state_t decode_state(const char *buf, size_t n) in decode_state() argument
622 p = memchr(buf, '\n', n); in decode_state()
623 len = p ? p - buf : n; in decode_state()
626 if (len == 4 && str_has_prefix(buf, "disk")) in decode_state()
633 if (label && len == strlen(label) && !strncmp(buf, label, len)) in decode_state()
642 const char *buf, size_t n) in state_store() argument
656 state = decode_state(buf, n); in state_store()
706 char *buf) in wakeup_count_show() argument
711 sprintf(buf, "%u\n", val) : -EINTR; in wakeup_count_show()
716 const char *buf, size_t n) in wakeup_count_store() argument
731 if (sscanf(buf, "%u", &val) == 1) { in wakeup_count_store()
748 char *buf) in autosleep_show() argument
753 return sprintf(buf, "off\n"); in autosleep_show()
757 return sprintf(buf, "%s\n", pm_states[state] ? in autosleep_show()
761 return sprintf(buf, "disk\n"); in autosleep_show()
763 return sprintf(buf, "error"); in autosleep_show()
769 const char *buf, size_t n) in autosleep_store() argument
771 suspend_state_t state = decode_state(buf, n); in autosleep_store()
775 && strcmp(buf, "off") && strcmp(buf, "off\n")) in autosleep_store()
791 char *buf) in wake_lock_show() argument
793 return pm_show_wakelocks(buf, true); in wake_lock_show()
798 const char *buf, size_t n) in wake_lock_store() argument
800 int error = pm_wake_lock(buf); in wake_lock_store()
808 char *buf) in wake_unlock_show() argument
810 return pm_show_wakelocks(buf, false); in wake_unlock_show()
815 const char *buf, size_t n) in wake_unlock_store() argument
817 int error = pm_wake_unlock(buf); in wake_unlock_store()
830 char *buf) in pm_trace_show() argument
832 return sprintf(buf, "%d\n", pm_trace_enabled); in pm_trace_show()
837 const char *buf, size_t n) in pm_trace_store() argument
841 if (sscanf(buf, "%d", &val) == 1) { in pm_trace_store()
856 char *buf) in pm_trace_dev_match_show() argument
858 return show_trace_dev_match(buf, PAGE_SIZE); in pm_trace_dev_match_show()
867 struct kobj_attribute *attr, char *buf) in pm_freeze_timeout_show() argument
869 return sprintf(buf, "%u\n", freeze_timeout_msecs); in pm_freeze_timeout_show()
874 const char *buf, size_t n) in pm_freeze_timeout_store() argument
878 if (kstrtoul(buf, 10, &val)) in pm_freeze_timeout_store()