Lines Matching defs:buf

1069 static int parse_strtoul(const char *buf,
1074 *value = simple_strtoul(skip_spaces(buf), &endp, 0);
1319 char *buf)
1334 return snprintf(buf, PAGE_SIZE, "%d\n",
1340 const char *buf, size_t count)
1347 if (parse_strtoul(buf, 1, &t))
1390 static int tpacpi_rfk_procfs_write(const enum tpacpi_rfk_id id, char *buf)
1399 while ((cmd = strsep(&buf, ","))) {
1425 static ssize_t interface_version_show(struct device_driver *drv, char *buf)
1427 return snprintf(buf, PAGE_SIZE, "0x%08x\n", TPACPI_SYSFS_VERSION);
1432 static ssize_t debug_level_show(struct device_driver *drv, char *buf)
1434 return snprintf(buf, PAGE_SIZE, "0x%04x\n", dbg_level);
1437 static ssize_t debug_level_store(struct device_driver *drv, const char *buf,
1442 if (parse_strtoul(buf, 0xffff, &t))
1452 static ssize_t version_show(struct device_driver *drv, char *buf)
1454 return snprintf(buf, PAGE_SIZE, "%s v%s\n",
1464 static ssize_t wlsw_emulstate_show(struct device_driver *drv, char *buf)
1466 return snprintf(buf, PAGE_SIZE, "%d\n", !!tpacpi_wlsw_emulstate);
1469 static ssize_t wlsw_emulstate_store(struct device_driver *drv, const char *buf,
1474 if (parse_strtoul(buf, 1, &t))
1487 static ssize_t bluetooth_emulstate_show(struct device_driver *drv, char *buf)
1489 return snprintf(buf, PAGE_SIZE, "%d\n", !!tpacpi_bluetooth_emulstate);
1493 const char *buf, size_t count)
1497 if (parse_strtoul(buf, 1, &t))
1507 static ssize_t wwan_emulstate_show(struct device_driver *drv, char *buf)
1509 return snprintf(buf, PAGE_SIZE, "%d\n", !!tpacpi_wwan_emulstate);
1512 static ssize_t wwan_emulstate_store(struct device_driver *drv, const char *buf,
1517 if (parse_strtoul(buf, 1, &t))
1527 static ssize_t uwb_emulstate_show(struct device_driver *drv, char *buf)
1529 return snprintf(buf, PAGE_SIZE, "%d\n", !!tpacpi_uwb_emulstate);
1532 static ssize_t uwb_emulstate_store(struct device_driver *drv, const char *buf,
1537 if (parse_strtoul(buf, 1, &t))
2728 char *buf)
2739 return snprintf(buf, PAGE_SIZE, "%d\n", status);
2744 const char *buf, size_t count)
2751 if (parse_strtoul(buf, 1, &t))
2765 char *buf)
2767 return snprintf(buf, PAGE_SIZE, "0x%08x\n", hotkey_user_mask);
2772 const char *buf, size_t count)
2777 if (parse_strtoul(buf, 0xffffffffUL, &t))
2801 char *buf)
2803 return sprintf(buf, "0\n");
2811 char *buf)
2815 return snprintf(buf, PAGE_SIZE, "0x%08x\n", hotkey_orig_mask);
2823 char *buf)
2825 return snprintf(buf, PAGE_SIZE, "0x%08x\n",
2834 char *buf)
2836 return snprintf(buf, PAGE_SIZE, "0x%08x\n",
2845 char *buf)
2847 return snprintf(buf, PAGE_SIZE, "0x%08x\n",
2859 char *buf)
2861 return snprintf(buf, PAGE_SIZE, "0x%08x\n", hotkey_source_mask);
2866 const char *buf, size_t count)
2872 if (parse_strtoul(buf, 0xffffffffUL, &t) ||
2910 char *buf)
2912 return snprintf(buf, PAGE_SIZE, "%d\n", hotkey_poll_freq);
2917 const char *buf, size_t count)
2921 if (parse_strtoul(buf, 25, &t))
2944 char *buf)
2954 return snprintf(buf, PAGE_SIZE, "%d\n",
2970 char *buf)
2977 return snprintf(buf, PAGE_SIZE, "%d\n", !!s);
2992 char *buf)
2994 return snprintf(buf, PAGE_SIZE, "%d\n", hotkey_wakeup_reason);
3008 char *buf)
3010 return snprintf(buf, PAGE_SIZE, "%d\n", hotkey_autosleep_ack);
3037 char *buf)
3045 return snprintf(buf, PAGE_SIZE, "%d\n", current_mode);
3050 const char *buf, size_t count)
3055 if (parse_strtoul(buf, LAYFLAT_MODE, &t))
4286 static int hotkey_write(char *buf)
4301 while ((cmd = strsep(&buf, ","))) {
4425 char *buf)
4428 attr, buf);
4433 const char *buf, size_t count)
4436 attr, buf, count);
4607 static int bluetooth_write(char *buf)
4609 return tpacpi_rfk_procfs_write(TPACPI_RFK_BLUETOOTH_SW_ID, buf);
4681 char *buf)
4684 attr, buf);
4689 const char *buf, size_t count)
4692 attr, buf, count);
4795 static int wan_write(char *buf)
4797 return tpacpi_rfk_procfs_write(TPACPI_RFK_WWAN_SW_ID, buf);
5212 static int video_write(char *buf)
5228 while ((cmd = strsep(&buf, ","))) {
5464 static int kbdlight_write(char *buf)
5472 while ((cmd = strsep(&buf, ","))) {
5639 static int light_write(char *buf)
5647 while ((cmd = strsep(&buf, ","))) {
5673 const char *buf, size_t count)
5678 if (parse_strtoul(buf, 21, &cmos_cmd))
5727 static int cmos_write(char *buf)
5732 while ((cmd = strsep(&buf, ","))) {
6112 static int led_write(char *buf)
6121 while ((cmd = strsep(&buf, ","))) {
6200 static int beep_write(char *buf)
6208 while ((cmd = strsep(&buf, ","))) {
6370 char *buf)
6384 return snprintf(buf, PAGE_SIZE, "%d\n", value);
7104 static int brightness_write(char *buf)
7114 while ((cmd = strsep(&buf, ","))) {
7838 static int volume_write(char *buf)
7866 while ((cmd = strsep(&buf, ","))) {
8581 char *buf)
8597 return snprintf(buf, PAGE_SIZE, "%d\n", mode);
8602 const char *buf, size_t count)
8607 if (parse_strtoul(buf, 2, &t))
8647 char *buf)
8663 return snprintf(buf, PAGE_SIZE, "%u\n", (status * 255) / 7);
8668 const char *buf, size_t count)
8674 if (parse_strtoul(buf, 255, &s))
8707 char *buf)
8716 return snprintf(buf, PAGE_SIZE, "%u\n", speed);
8724 char *buf)
8733 return snprintf(buf, PAGE_SIZE, "%u\n", speed);
8739 static ssize_t fan_watchdog_show(struct device_driver *drv, char *buf)
8741 return snprintf(buf, PAGE_SIZE, "%u\n", fan_watchdog_maxinterval);
8744 static ssize_t fan_watchdog_store(struct device_driver *drv, const char *buf,
8749 if (parse_strtoul(buf, 120, &t))
9176 static int fan_write(char *buf)
9181 while (!rc && (cmd = strsep(&buf, ","))) {
9543 const char *buf, size_t count)
9565 rval = kstrtoul(buf, 10, &value);
9611 char *buf)
9633 return sprintf(buf, "%d\n", ret);
9638 char *buf)
9640 return tpacpi_battery_show(THRESHOLD_START, device, buf);
9645 char *buf)
9647 return tpacpi_battery_show(THRESHOLD_STOP, device, buf);
9652 const char *buf, size_t count)
9654 return tpacpi_battery_store(THRESHOLD_START, dev, buf, count);
9659 const char *buf, size_t count)
9661 return tpacpi_battery_store(THRESHOLD_STOP, dev, buf, count);
9825 static int lcdshadow_write(char *buf)
9833 while ((cmd = strsep(&buf, ","))) {
9906 char *buf)
9908 return snprintf(buf, PAGE_SIZE, "%d\n", dytc_lapmode);