Lines Matching refs:buf
102 char *buf) in control_show() argument
104 return sprintf(buf, "%s\n", in control_show()
109 const char * buf, size_t n) in control_store() argument
114 cp = memchr(buf, '\n', n); in control_store()
116 len = cp - buf; in control_store()
118 if (len == sizeof ctrl_auto - 1 && strncmp(buf, ctrl_auto, len) == 0) in control_store()
120 else if (len == sizeof ctrl_on - 1 && strncmp(buf, ctrl_on, len) == 0) in control_store()
131 struct device_attribute *attr, char *buf) in rtpm_active_time_show() argument
136 ret = sprintf(buf, "%i\n", jiffies_to_msecs(dev->power.active_jiffies)); in rtpm_active_time_show()
144 struct device_attribute *attr, char *buf) in rtpm_suspended_time_show() argument
149 ret = sprintf(buf, "%i\n", in rtpm_suspended_time_show()
158 struct device_attribute *attr, char *buf) in rtpm_status_show() argument
184 return sprintf(buf, p); in rtpm_status_show()
190 struct device_attribute *attr, char *buf) in autosuspend_delay_ms_show() argument
194 return sprintf(buf, "%d\n", dev->power.autosuspend_delay); in autosuspend_delay_ms_show()
198 struct device_attribute *attr, const char *buf, size_t n) in autosuspend_delay_ms_store() argument
205 if (kstrtol(buf, 10, &delay) != 0 || delay != (int) delay) in autosuspend_delay_ms_store()
219 char *buf) in pm_qos_resume_latency_show() argument
221 return sprintf(buf, "%d\n", dev_pm_qos_requested_resume_latency(dev)); in pm_qos_resume_latency_show()
226 const char *buf, size_t n) in pm_qos_resume_latency_store() argument
231 if (kstrtos32(buf, 0, &value)) in pm_qos_resume_latency_store()
247 char *buf) in pm_qos_latency_tolerance_show() argument
252 return sprintf(buf, "auto\n"); in pm_qos_latency_tolerance_show()
254 return sprintf(buf, "any\n"); in pm_qos_latency_tolerance_show()
256 return sprintf(buf, "%d\n", value); in pm_qos_latency_tolerance_show()
261 const char *buf, size_t n) in pm_qos_latency_tolerance_store() argument
266 if (kstrtos32(buf, 0, &value)) { in pm_qos_latency_tolerance_store()
267 if (!strcmp(buf, "auto") || !strcmp(buf, "auto\n")) in pm_qos_latency_tolerance_store()
269 else if (!strcmp(buf, "any") || !strcmp(buf, "any\n")) in pm_qos_latency_tolerance_store()
281 char *buf) in pm_qos_no_power_off_show() argument
283 return sprintf(buf, "%d\n", !!(dev_pm_qos_requested_flags(dev) in pm_qos_no_power_off_show()
289 const char *buf, size_t n) in pm_qos_no_power_off_store() argument
293 if (kstrtoint(buf, 0, &ret)) in pm_qos_no_power_off_store()
308 char *buf) in pm_qos_remote_wakeup_show() argument
310 return sprintf(buf, "%d\n", !!(dev_pm_qos_requested_flags(dev) in pm_qos_remote_wakeup_show()
316 const char *buf, size_t n) in pm_qos_remote_wakeup_store() argument
320 if (kstrtoint(buf, 0, &ret)) in pm_qos_remote_wakeup_store()
338 wake_show(struct device * dev, struct device_attribute *attr, char * buf) in wake_show() argument
340 return sprintf(buf, "%s\n", device_can_wakeup(dev) in wake_show()
347 const char * buf, size_t n) in wake_store() argument
355 cp = memchr(buf, '\n', n); in wake_store()
357 len = cp - buf; in wake_store()
359 && strncmp(buf, _enabled, sizeof _enabled - 1) == 0) in wake_store()
362 && strncmp(buf, _disabled, sizeof _disabled - 1) == 0) in wake_store()
372 struct device_attribute *attr, char *buf) in wakeup_count_show() argument
383 return enabled ? sprintf(buf, "%lu\n", count) : sprintf(buf, "\n"); in wakeup_count_show()
389 struct device_attribute *attr, char *buf) in wakeup_active_count_show() argument
400 return enabled ? sprintf(buf, "%lu\n", count) : sprintf(buf, "\n"); in wakeup_active_count_show()
407 char *buf) in wakeup_abort_count_show() argument
418 return enabled ? sprintf(buf, "%lu\n", count) : sprintf(buf, "\n"); in wakeup_abort_count_show()
425 char *buf) in wakeup_expire_count_show() argument
436 return enabled ? sprintf(buf, "%lu\n", count) : sprintf(buf, "\n"); in wakeup_expire_count_show()
442 struct device_attribute *attr, char *buf) in wakeup_active_show() argument
453 return enabled ? sprintf(buf, "%u\n", active) : sprintf(buf, "\n"); in wakeup_active_show()
459 struct device_attribute *attr, char *buf) in wakeup_total_time_show() argument
470 return enabled ? sprintf(buf, "%lld\n", msec) : sprintf(buf, "\n"); in wakeup_total_time_show()
476 struct device_attribute *attr, char *buf) in wakeup_max_time_show() argument
487 return enabled ? sprintf(buf, "%lld\n", msec) : sprintf(buf, "\n"); in wakeup_max_time_show()
493 struct device_attribute *attr, char *buf) in wakeup_last_time_show() argument
504 return enabled ? sprintf(buf, "%lld\n", msec) : sprintf(buf, "\n"); in wakeup_last_time_show()
512 char *buf) in wakeup_prevent_sleep_time_show() argument
523 return enabled ? sprintf(buf, "%lld\n", msec) : sprintf(buf, "\n"); in wakeup_prevent_sleep_time_show()
533 struct device_attribute *attr, char *buf) in rtpm_usagecount_show() argument
535 return sprintf(buf, "%d\n", atomic_read(&dev->power.usage_count)); in rtpm_usagecount_show()
539 struct device_attribute *attr, char *buf) in rtpm_children_show() argument
541 return sprintf(buf, "%d\n", dev->power.ignore_children ? in rtpm_children_show()
546 struct device_attribute *attr, char *buf) in rtpm_enabled_show() argument
549 return sprintf(buf, "disabled & forbidden\n"); in rtpm_enabled_show()
551 return sprintf(buf, "disabled\n"); in rtpm_enabled_show()
553 return sprintf(buf, "forbidden\n"); in rtpm_enabled_show()
554 return sprintf(buf, "enabled\n"); in rtpm_enabled_show()
563 char *buf) in async_show() argument
565 return sprintf(buf, "%s\n", in async_show()
571 const char *buf, size_t n) in async_store() argument
576 cp = memchr(buf, '\n', n); in async_store()
578 len = cp - buf; in async_store()
579 if (len == sizeof _enabled - 1 && strncmp(buf, _enabled, len) == 0) in async_store()
582 strncmp(buf, _disabled, len) == 0) in async_store()