Lines Matching refs:buf
53 char *buf = b; in nouveau_sysfs_pstate_get() local
75 snappendf(buf, cnt, "%02x:", attr.state); in nouveau_sysfs_pstate_get()
77 snappendf(buf, cnt, "%s:", info.pwrsrc == 0 ? "DC" : in nouveau_sysfs_pstate_get()
90 snappendf(buf, cnt, " %s %d", attr.name, attr.min); in nouveau_sysfs_pstate_get()
92 snappendf(buf, cnt, "-%d", attr.max); in nouveau_sysfs_pstate_get()
93 snappendf(buf, cnt, " %s", attr.unit); in nouveau_sysfs_pstate_get()
98 snappendf(buf, cnt, " AC"); in nouveau_sysfs_pstate_get()
100 snappendf(buf, cnt, " DC"); in nouveau_sysfs_pstate_get()
102 snappendf(buf, cnt, " *"); in nouveau_sysfs_pstate_get()
105 snappendf(buf, cnt, " AC"); in nouveau_sysfs_pstate_get()
107 snappendf(buf, cnt, " DC"); in nouveau_sysfs_pstate_get()
110 snappendf(buf, cnt, "\n"); in nouveau_sysfs_pstate_get()
118 const char *buf, size_t count) in nouveau_sysfs_pstate_set() argument
125 if ((tmp = strchr(buf, '\n'))) in nouveau_sysfs_pstate_set()
128 if (!strncasecmp(buf, "dc:", 3)) { in nouveau_sysfs_pstate_set()
130 buf += 3; in nouveau_sysfs_pstate_set()
132 if (!strncasecmp(buf, "ac:", 3)) { in nouveau_sysfs_pstate_set()
134 buf += 3; in nouveau_sysfs_pstate_set()
137 if (!strcasecmp(buf, "none")) in nouveau_sysfs_pstate_set()
140 if (!strcasecmp(buf, "auto")) in nouveau_sysfs_pstate_set()
143 ret = kstrtol(buf, 16, &value); in nouveau_sysfs_pstate_set()