Lines Matching refs:buf
67 family_show(struct device *dev, struct device_attribute *attr, char *buf) in family_show() argument
74 return cdev->hw_ops->family(cdev, buf); in family_show()
79 stepping_show(struct device *dev, struct device_attribute *attr, char *buf) in stepping_show() argument
86 return cdev->hw_ops->stepping(cdev, buf); in stepping_show()
91 state_show(struct device *dev, struct device_attribute *attr, char *buf) in state_show() argument
98 return scnprintf(buf, PAGE_SIZE, "%s\n", in state_show()
104 const char *buf, size_t count) in state_store() argument
112 if (sysfs_streq(buf, "boot")) { in state_store()
116 if (sysfs_streq(buf, "reset")) { in state_store()
121 if (sysfs_streq(buf, "shutdown")) { in state_store()
134 struct device_attribute *attr, char *buf) in shutdown_status_show() argument
141 return scnprintf(buf, PAGE_SIZE, "%s\n", in shutdown_status_show()
148 struct device_attribute *attr, char *buf) in heartbeat_enable_show() argument
155 return scnprintf(buf, PAGE_SIZE, "%d\n", cdev->sysfs_heartbeat_enable); in heartbeat_enable_show()
161 const char *buf, size_t count) in heartbeat_enable_store() argument
171 ret = kstrtoint(buf, 10, &enable); in heartbeat_enable_store()
187 cmdline_show(struct device *dev, struct device_attribute *attr, char *buf) in cmdline_show() argument
198 return scnprintf(buf, PAGE_SIZE, "%s\n", cmdline); in cmdline_show()
204 const char *buf, size_t count) in cmdline_store() argument
220 strncpy(cdev->cmdline, buf, count); in cmdline_store()
233 firmware_show(struct device *dev, struct device_attribute *attr, char *buf) in firmware_show() argument
244 return scnprintf(buf, PAGE_SIZE, "%s\n", firmware); in firmware_show()
250 const char *buf, size_t count) in firmware_store() argument
265 strncpy(cdev->firmware, buf, count); in firmware_store()
278 ramdisk_show(struct device *dev, struct device_attribute *attr, char *buf) in ramdisk_show() argument
289 return scnprintf(buf, PAGE_SIZE, "%s\n", ramdisk); in ramdisk_show()
295 const char *buf, size_t count) in ramdisk_store() argument
311 strncpy(cdev->ramdisk, buf, count); in ramdisk_store()
324 bootmode_show(struct device *dev, struct device_attribute *attr, char *buf) in bootmode_show() argument
335 return scnprintf(buf, PAGE_SIZE, "%s\n", bootmode); in bootmode_show()
341 const char *buf, size_t count) in bootmode_store() argument
348 if (!sysfs_streq(buf, "linux") && !sysfs_streq(buf, "flash")) in bootmode_store()
360 strncpy(cdev->bootmode, buf, count); in bootmode_store()
374 char *buf) in log_buf_addr_show() argument
381 return scnprintf(buf, PAGE_SIZE, "%p\n", cdev->log_buf_addr); in log_buf_addr_show()
386 const char *buf, size_t count) in log_buf_addr_store() argument
395 ret = kstrtoul(buf, 16, &addr); in log_buf_addr_store()
408 char *buf) in log_buf_len_show() argument
415 return scnprintf(buf, PAGE_SIZE, "%p\n", cdev->log_buf_len); in log_buf_len_show()
420 const char *buf, size_t count) in log_buf_len_store() argument
429 ret = kstrtoul(buf, 16, &addr); in log_buf_len_store()